use of org.apache.ignite.internal.processors.cache.persistence.DbCheckpointListener in project ignite by apache.
the class IgnitePersistentStoreSchemaLoadTest method checkpointLatch.
/**
* @param node Node whose checkpoint to wait for.
* @return Latch released when checkpoint happens.
*/
private CountDownLatch checkpointLatch(IgniteEx node) {
final CountDownLatch cnt = new CountDownLatch(1);
GridCacheDatabaseSharedManager db = (GridCacheDatabaseSharedManager) node.context().cache().context().database();
db.addCheckpointListener(new DbCheckpointListener() {
@Override
public void onCheckpointBegin(Context ctx) {
cnt.countDown();
}
});
return cnt;
}
Aggregations