You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@labs.apache.org by el...@apache.org on 2012/08/15 07:27:33 UTC
svn commit: r1373214 - in
/labs/mavibot/trunk/mavibot/src/main/java/org/apache/mavibot/btree:
Addition.java Deletion.java Modification.java
Author: elecharny
Date: Wed Aug 15 05:27:32 2012
New Revision: 1373214
URL: http://svn.apache.org/viewvc?rev=1373214&view=rev
Log:
Added the classes used by the journal
Added:
labs/mavibot/trunk/mavibot/src/main/java/org/apache/mavibot/btree/Addition.java
labs/mavibot/trunk/mavibot/src/main/java/org/apache/mavibot/btree/Deletion.java
labs/mavibot/trunk/mavibot/src/main/java/org/apache/mavibot/btree/Modification.java
Added: labs/mavibot/trunk/mavibot/src/main/java/org/apache/mavibot/btree/Addition.java
URL: http://svn.apache.org/viewvc/labs/mavibot/trunk/mavibot/src/main/java/org/apache/mavibot/btree/Addition.java?rev=1373214&view=auto
==============================================================================
--- labs/mavibot/trunk/mavibot/src/main/java/org/apache/mavibot/btree/Addition.java (added)
+++ labs/mavibot/trunk/mavibot/src/main/java/org/apache/mavibot/btree/Addition.java Wed Aug 15 05:27:32 2012
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.mavibot.btree;
+
+
+/**
+ * A class used to store an Addition modification done on a BTree.
+ *
+ * @author <a href="mailto:labs@labs.apache.org">Mavibot labs Project</a>
+ *
+ * @param <K> The key type
+ * @param <V> The value type
+ */
+public class Addition<K, V> extends Modification<K, V>
+{
+ /**
+ * Create a new Addition instance.
+ *
+ * @param key The key being added
+ * @param value The value being added
+ */
+ public Addition( K key, V value )
+ {
+ super( key, value );
+ }
+}
Added: labs/mavibot/trunk/mavibot/src/main/java/org/apache/mavibot/btree/Deletion.java
URL: http://svn.apache.org/viewvc/labs/mavibot/trunk/mavibot/src/main/java/org/apache/mavibot/btree/Deletion.java?rev=1373214&view=auto
==============================================================================
--- labs/mavibot/trunk/mavibot/src/main/java/org/apache/mavibot/btree/Deletion.java (added)
+++ labs/mavibot/trunk/mavibot/src/main/java/org/apache/mavibot/btree/Deletion.java Wed Aug 15 05:27:32 2012
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.mavibot.btree;
+
+
+/**
+ * A class used to store a Delete modification done on a BTree.
+ *
+ * @author <a href="mailto:labs@labs.apache.org">Mavibot labs Project</a>
+ *
+ * @param <K> The key type
+ * @param <V> The value type
+ */
+public class Deletion<K, V> extends Modification<K, V>
+{
+ /**
+ * Create a new Deletion instance.
+ *
+ * @param key The key to be deleted
+ */
+ public Deletion( K key )
+ {
+ super( key, null );
+ }
+}
Added: labs/mavibot/trunk/mavibot/src/main/java/org/apache/mavibot/btree/Modification.java
URL: http://svn.apache.org/viewvc/labs/mavibot/trunk/mavibot/src/main/java/org/apache/mavibot/btree/Modification.java?rev=1373214&view=auto
==============================================================================
--- labs/mavibot/trunk/mavibot/src/main/java/org/apache/mavibot/btree/Modification.java (added)
+++ labs/mavibot/trunk/mavibot/src/main/java/org/apache/mavibot/btree/Modification.java Wed Aug 15 05:27:32 2012
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.mavibot.btree;
+
+
+/**
+ * An abstract class used to store a modification done on a BTree.
+ *
+ * @author <a href="mailto:labs@labs.apache.org">Mavibot labs Project</a>
+ *
+ * @param <K> The key type
+ * @param <V> The value type
+ */
+public abstract class Modification<K, V> extends Tuple<K, V>
+{
+ /** The byte used to define an Addition in the serialized journal */
+ public static final byte ADDITION = 0;
+
+ /** The byte used to define a Deletion in the serialized journal */
+ public static final byte DELETION = 1;
+
+
+ /**
+ * Create a new Modification instance.
+ *
+ * @param key The key being modified
+ * @param value The value being modified
+ */
+ protected Modification( K key, V value )
+ {
+ super( key, value );
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org