The way to do it is by creating a class that implements me.prettyprint.hector.api.ClockResolution
// Define my own clock resolution.
class SequentialClockResolution implements ClockResolution {
@Override
public long createClock() {
return System.currentTimeMillis() * -1;
}
}
And now we have to tell Hector to use it.
CassandraHostConfigurator cassandraHostConfigurator = new CassandraHostConfigurator("localhost");
cassandraHostConfigurator.setClockResolution(new SequentialClockResolution());
cassandraHostConfigurator.setClockResolution(new SequentialClockResolution());
As an additional information, this is the class diagram involved in ClockResolution.