long old = System.currentTimeMillis();
bTree = new BTree(BTREE_DEGREE, file, fTrace);
for (int i = 0; i < checkpointsNum; i++) {
- TmfCheckpoint checkpoint = new TmfCheckpoint(new TmfTimestamp(12345 + i), new TmfLongLocation(123456L + i), i);
+ TmfCheckpoint checkpoint = new TmfCheckpoint(TmfTimestamp.fromSeconds(12345 + i), new TmfLongLocation(123456L + i), i);
bTree.insert(checkpoint);
}
long old = System.currentTimeMillis();
array = new FlatArray(file, fTrace);
for (int i = 0; i < checkpointsNum; i++) {
- TmfCheckpoint checkpoint = new TmfCheckpoint(new TmfTimestamp(12345 + i), new TmfLongLocation(123456L + i), i);
+ TmfCheckpoint checkpoint = new TmfCheckpoint(TmfTimestamp.fromSeconds(12345 + i), new TmfLongLocation(123456L + i), i);
array.insert(checkpoint);
}
bTree = new BTree(BTREE_DEGREE, file, fTrace);
for (int i = 0; i < checkpointsNum; i++) {
Integer randomCheckpoint = list.get(i);
- TmfCheckpoint checkpoint = new TmfCheckpoint(new TmfTimestamp(12345 + randomCheckpoint), new TmfLongLocation(123456L + randomCheckpoint), 0);
+ TmfCheckpoint checkpoint = new TmfCheckpoint(TmfTimestamp.fromSeconds(12345 + randomCheckpoint), new TmfLongLocation(123456L + randomCheckpoint), 0);
BTreeCheckpointVisitor treeVisitor = new BTreeCheckpointVisitor(checkpoint);
bTree.accept(treeVisitor);
assertEquals(randomCheckpoint.intValue(), treeVisitor.getCheckpoint().getCheckpointRank());
array = new FlatArray(file, fTrace);
for (int i = 0; i < checkpointsNum; i++) {
Integer randomCheckpoint = list.get(i);
- TmfCheckpoint checkpoint = new TmfCheckpoint(new TmfTimestamp(12345 + randomCheckpoint), new TmfLongLocation(123456L + randomCheckpoint), 0);
+ TmfCheckpoint checkpoint = new TmfCheckpoint(TmfTimestamp.fromSeconds(12345 + randomCheckpoint), new TmfLongLocation(123456L + randomCheckpoint), 0);
long found = array.binarySearch(checkpoint);
assertEquals(randomCheckpoint.intValue(), found);
}