Permalink
Browse files

added overloaded remove for user specified timestamps

  • Loading branch information...
1 parent e9cb028 commit 093f0c7e7cc2a6d1d1866abd6c3dcb4f7de14524 zznate committed May 6, 2010
@@ -174,6 +174,12 @@ void batchMutate(BatchMutation batchMutation) throws InvalidRequestException,
*/
void remove(String key, ColumnPath columnPath) throws InvalidRequestException,
UnavailableException, TException, TimedOutException;
+
+ /**
+ * Same as two argument version, but the caller must specify their own timestamp
+ */
+ void remove(String key, ColumnPath columnPath, long timestamp) throws InvalidRequestException,
+ UnavailableException, TException, TimedOutException;
/**
* get a description of the specified keyspace
@@ -454,16 +454,24 @@ public Void execute(Cassandra.Client cassandra) throws InvalidRequestException,
@Override
public void remove(final String key, final ColumnPath columnPath) throws InvalidRequestException,
UnavailableException, TException, TimedOutException {
+ remove(key, columnPath, createTimestamp());
+ }
+
+
+
+ @Override
+ public void remove(final String key, final ColumnPath columnPath, final long timestamp)
+ throws InvalidRequestException, UnavailableException, TException,
+ TimedOutException {
Operation<Void> op = new Operation<Void>(OperationType.WRITE) {
@Override
public Void execute(Cassandra.Client cassandra) throws InvalidRequestException, UnavailableException,
TException, TimedOutException {
- cassandra.remove(keyspaceName, key, columnPath, createTimestamp(), consistency);
+ cassandra.remove(keyspaceName, key, columnPath, timestamp, consistency);
return null;
}
};
- operateWithFailover(op);
-
+ operateWithFailover(op);
}
@Override

0 comments on commit 093f0c7

Please sign in to comment.