com.hazelcast.spi.impl.waitnotifyservice.impl
Class WaitNotifyServiceImpl
java.lang.Object
com.hazelcast.spi.impl.waitnotifyservice.impl.WaitNotifyServiceImpl
- All Implemented Interfaces:
- InternalWaitNotifyService, WaitNotifyService
public class WaitNotifyServiceImpl
- extends Object
- implements InternalWaitNotifyService
WaitNotifyServiceImpl
public WaitNotifyServiceImpl(NodeEngineImpl nodeEngine)
await
public void await(WaitSupport waitSupport)
- Description copied from interface:
WaitNotifyService
- Causes the current operation to wait in WaitNotifyService until it is notified
by a
Notifier
operation or timeout specified by
WaitSupport.getWaitTimeout()
passes.
WaitSupport
operation will be registered using WaitNotifyKey
returned from method WaitSupport.getWaitKey()
.
When operation is notified, it's re-executed by related scheduled mechanism.
If wait time-outs, WaitSupport.onWaitExpire()
method is called.
This method should be called in the thread executes the actual WaitSupport
operation.
- Specified by:
await
in interface WaitNotifyService
- Parameters:
waitSupport
- operation which will wait for notification
notify
public void notify(Notifier notifier)
- Description copied from interface:
WaitNotifyService
- Notifies the waiting
WaitSupport
operation to wake-up and continue executing.
A waiting operation registered with the Notifier.getNotifiedKey()
will be notified and deregistered.
This method has no effect if there isn't any operation registered
for related WaitNotifyKey
.
This method should be called in the thread executes the actual Notifier
operation.
- Specified by:
notify
in interface WaitNotifyService
- Parameters:
notifier
- operation which will notify a corresponding waiting operation
getAwaitQueueCount
public int getAwaitQueueCount()
getTotalWaitingOperationCount
public int getTotalWaitingOperationCount()
onMemberLeft
public void onMemberLeft(MemberImpl leftMember)
onClientDisconnected
public void onClientDisconnected(String clientUuid)
onPartitionMigrate
public void onPartitionMigrate(Address thisAddress,
MigrationInfo migrationInfo)
cancelWaitingOps
public void cancelWaitingOps(String serviceName,
Object objectId,
Throwable cause)
- Specified by:
cancelWaitingOps
in interface InternalWaitNotifyService
reset
public void reset()
shutdown
public void shutdown()
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.