Created
March 4, 2015 19:34
-
-
Save brianmhess/4fa2cafd73f483a8c8b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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