use of org.apache.geode.internal.cache.wan.parallel.WaitUntilParallelGatewaySenderFlushedCoordinator in project geode by apache.
the class AbstractGatewaySender method waitUntilFlushed.
public boolean waitUntilFlushed(long timeout, TimeUnit unit) throws InterruptedException {
boolean result = false;
if (isParallel()) {
try {
WaitUntilParallelGatewaySenderFlushedCoordinator coordinator = new WaitUntilParallelGatewaySenderFlushedCoordinator(this, timeout, unit, true);
result = coordinator.waitUntilFlushed();
} catch (BucketMovedException | CancelException | RegionDestroyedException e) {
logger.warn(LocalizedStrings.AbstractGatewaySender_CAUGHT_EXCEPTION_ATTEMPTING_WAIT_UNTIL_FLUSHED_RETRYING.toLocalizedString(), e);
throw e;
} catch (Throwable t) {
logger.warn(LocalizedStrings.AbstractGatewaySender_CAUGHT_EXCEPTION_ATTEMPTING_WAIT_UNTIL_FLUSHED_RETURNING.toLocalizedString(), t);
throw new InternalGemFireError(t);
}
return result;
} else {
// Serial senders are currently not supported
throw new UnsupportedOperationException(LocalizedStrings.AbstractGatewaySender_WAIT_UNTIL_FLUSHED_NOT_SUPPORTED_FOR_SERIAL_SENDERS.toLocalizedString());
}
}
Aggregations