cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject git commit: Remove unused AtomicSortedColumns methods
Date Fri, 07 Jun 2013 22:14:13 GMT
Updated Branches:
  refs/heads/trunk 6b16c1a57 -> 47ac188a3


Remove unused AtomicSortedColumns methods


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/47ac188a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/47ac188a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/47ac188a

Branch: refs/heads/trunk
Commit: 47ac188a3f73b74e1581c18f986488e005f4921c
Parents: 6b16c1a
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Sat Jun 8 01:13:42 2013 +0300
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Sat Jun 8 01:13:42 2013 +0300

----------------------------------------------------------------------
 .../apache/cassandra/db/AtomicSortedColumns.java   |   38 ---------------
 1 files changed, 0 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/47ac188a/src/java/org/apache/cassandra/db/AtomicSortedColumns.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/AtomicSortedColumns.java b/src/java/org/apache/cassandra/db/AtomicSortedColumns.java
index fa0a82a..f2e621a 100644
--- a/src/java/org/apache/cassandra/db/AtomicSortedColumns.java
+++ b/src/java/org/apache/cassandra/db/AtomicSortedColumns.java
@@ -30,7 +30,6 @@ import org.apache.cassandra.db.index.SecondaryIndexManager;
 import org.apache.cassandra.db.marshal.AbstractType;
 import org.apache.cassandra.utils.Allocator;
 
-
 /**
  * A thread-safe and atomic ISortedColumns implementation.
  * Operations (in particular addAll) on this implemenation are atomic and
@@ -256,11 +255,6 @@ public class AtomicSortedColumns extends ColumnFamily
             this(new SnapTreeMap<ByteBuffer, Column>(comparator), DeletionInfo.LIVE);
         }
 
-        Holder(SortedMap<ByteBuffer, Column> columns)
-        {
-            this(new SnapTreeMap<ByteBuffer, Column>(columns), DeletionInfo.LIVE);
-        }
-
         Holder(SnapTreeMap<ByteBuffer, Column> map, DeletionInfo deletionInfo)
         {
             this.map = map;
@@ -316,37 +310,5 @@ public class AtomicSortedColumns extends ColumnFamily
                 // (Currently, concurrent removal should not happen (only updates), but let
us support that anyway.)
             }
         }
-
-        void retainAll(ColumnFamily columns)
-        {
-            Iterator<Column> iter = map.values().iterator();
-            Iterator<Column> toRetain = columns.iterator();
-            Column current = iter.hasNext() ? iter.next() : null;
-            Column retain = toRetain.hasNext() ? toRetain.next() : null;
-            Comparator<? super ByteBuffer> comparator = map.comparator();
-            while (current != null && retain != null)
-            {
-                int c = comparator.compare(current.name(), retain.name());
-                if (c == 0)
-                {
-                    current = iter.hasNext() ? iter.next() : null;
-                    retain = toRetain.hasNext() ? toRetain.next() : null;
-                }
-                else if (c < 0)
-                {
-                    iter.remove();
-                    current = iter.hasNext() ? iter.next() : null;
-                }
-                else // c > 0
-                {
-                    retain = toRetain.hasNext() ? toRetain.next() : null;
-                }
-            }
-            while (current != null)
-            {
-                iter.remove();
-                current = iter.hasNext() ? iter.next() : null;
-            }
-        }
     }
 }


Mime
View raw message