Skip to content

Instantly share code, notes, and snippets.

@brianmhess
Created March 4, 2015 19:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianmhess/4fa2cafd73f483a8c8b0 to your computer and use it in GitHub Desktop.
Save brianmhess/4fa2cafd73f483a8c8b0 to your computer and use it in GitHub Desktop.
package org.apache.cassandra.triggers;
import java.nio.ByteBuffer;
import java.util.Collection;
import org.apache.cassandra.db.ColumnFamily;
import org.apache.cassandra.db.Mutation;
import org.apache.cassandra.db.Cell;
public class FWWTrigger implements ITrigger {
public Collection<Mutation> augment(ByteBuffer partitionKey, ColumnFamily update) {
ColumnFamily tupdate = update.cloneMe();
update.clear();
for (Cell tcell : tupdate)
update.addColumn(tcell.withUpdatedTimestamp(tcell.timestamp() * -1));
return null;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment