|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@ThreadSafe public interface DistributedSync
This is an abstraction of a cluster-wide synchronization. Its purpose is to maintain a set of locks that are aware of block and unblock commands issued across a cluster. In addition to these block and unblock phases, sub-phases such as a start processing
| Nested Class Summary | |
|---|---|
static class |
DistributedSync.SyncResponse
|
| Method Summary | |
|---|---|
void |
acquireProcessingLock(boolean exclusive,
long timeout,
TimeUnit timeUnit)
Acquires a processing lock. |
void |
acquireSync()
Acquires the sync. |
DistributedSync.SyncResponse |
blockUntilAcquired(long timeout,
TimeUnit timeUnit)
Blocks until the start of a sync - either by the current RPCManager instance or a remote one - is received. |
DistributedSync.SyncResponse |
blockUntilReleased(long timeout,
TimeUnit timeUnit)
Blocks until an ongoing sync ends. |
void |
releaseProcessingLock()
Releases any processing locks that may be held by the current thread. |
void |
releaseSync()
Releases the sync. |
| Method Detail |
|---|
DistributedSync.SyncResponse blockUntilAcquired(long timeout,
TimeUnit timeUnit)
throws TimeoutException,
InterruptedException
timeout - timeout after which to give uptimeUnit - time unit
TimeoutException - if waiting for the sync times out.
InterruptedException
DistributedSync.SyncResponse blockUntilReleased(long timeout,
TimeUnit timeUnit)
throws TimeoutException,
InterruptedException
timeout - timeout after which to give uptimeUnit - time unit
TimeoutException - if waiting for an ongoing sync to end times out.
InterruptedExceptionvoid acquireSync()
void releaseSync()
void acquireProcessingLock(boolean exclusive,
long timeout,
TimeUnit timeUnit)
throws TimeoutException,
InterruptedException
exclusive - whether the lock is exclusivetimeout - timeout after which to give uptimeUnit - time unit
TimeoutException - if waiting for the lock times out
InterruptedExceptionvoid releaseProcessingLock()
|
Google Analytics | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||