sync();
}
void sync() throws Exception
{
OperationContext originalTX = OperationContextImpl.getContext();
try
{
// We only want to sync paging here, no need to wait for any other events
OperationContextImpl.clearContext();
for (PagingStore store : storesToSync)
{
store.sync();
}
// We can't perform a commit/sync on the journal before we can assure page files are synced or we may get
// out of sync
OperationContext ctx = OperationContextImpl.getContext();
if (ctx != null)
{
// if null it means there were no operations done before, hence no need to wait any completions
ctx.waitCompletion();
}
}
finally
{
OperationContextImpl.setContext(originalTX);