public class OperationParkerImpl extends Object implements OperationParker, LiveOperationsTracker, MetricsProvider
SERVICE_NAME| Constructor and Description |
|---|
OperationParkerImpl(NodeEngineImpl nodeEngine) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelParkedOperations(String serviceName,
Object objectId,
Throwable cause) |
int |
getParkQueueCount() |
int |
getTotalParkedOperationCount() |
int |
getTotalValidWaitingOperationCount() |
void |
onClientDisconnected(String clientUuid) |
void |
onMemberLeft(MemberImpl leftMember) |
void |
onPartitionMigrate(Address thisAddress,
MigrationInfo migrationInfo)
Invalidates all parked operations for the migrated partition and sends a
PartitionMigratingException as a
response. |
void |
park(BlockingOperation op)
Parks the Operation until it is unparked by a
OperationParker.unpark(Notifier) call or by a timeout specified by the
BlockingOperation.getWaitTimeout(). |
void |
populate(LiveOperations liveOperations)
Populate the LiveOperations
|
void |
provideMetrics(MetricsRegistry registry) |
void |
reset() |
void |
shutdown() |
String |
toString() |
void |
unpark(Notifier notifier)
Unparks the parked
BlockingOperation operation by rescheduling it on the
OperationExecutor
A parked operation registered with the Notifier.getNotifiedKey() will be notified and deregistered. |
public OperationParkerImpl(NodeEngineImpl nodeEngine)
public void provideMetrics(MetricsRegistry registry)
provideMetrics in interface MetricsProviderpublic void populate(LiveOperations liveOperations)
LiveOperationsTrackerpopulate in interface LiveOperationsTrackerliveOperations - the LiveOperations to populate.public void park(BlockingOperation op)
OperationParkerOperationParker.unpark(Notifier) call or by a timeout specified by the
BlockingOperation.getWaitTimeout(). After the BlockingOperation is parked, this method returns;
it doesn't wait.
BlockingOperation operation will be registered using WaitNotifyKey
returned from method BlockingOperation.getWaitKey().
If wait time-outs, BlockingOperation.onWaitExpire() method is called.
This method should be called in the thread executes the actual BlockingOperation operation.park in interface OperationParkerop - operation which will wait for notificationpublic void unpark(Notifier notifier)
OperationParkerBlockingOperation operation by rescheduling it on the
OperationExecutor
A parked 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 that executes the actual Notifier operation.unpark in interface OperationParkernotifier - operation which will unpark a corresponding waiting operationpublic int getParkQueueCount()
public int getTotalParkedOperationCount()
public int getTotalValidWaitingOperationCount()
public void onMemberLeft(MemberImpl leftMember)
public void onClientDisconnected(String clientUuid)
public void onPartitionMigrate(Address thisAddress, MigrationInfo migrationInfo)
PartitionMigratingException as a
response.
Invoked on the migration destination. This is executed under partition migration lock!public void cancelParkedOperations(String serviceName, Object objectId, Throwable cause)
cancelParkedOperations in interface OperationParkerpublic void reset()
public void shutdown()
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.