public abstract class CacheOperation extends AbstractNamedOperation implements PartitionAwareOperation, ServiceNamespaceAware, IdentifiedDataSerializable
| Modifier and Type | Field and Description |
|---|---|
protected ICacheService |
cacheService |
protected boolean |
dontCreateCacheRecordStoreIfNotExist |
protected ICacheRecordStore |
recordStore |
protected Closeable |
tenantContext |
protected CacheWanEventPublisher |
wanEventPublisher |
nameGENERIC_PARTITION_ID| Modifier | Constructor and Description |
|---|---|
protected |
CacheOperation() |
protected |
CacheOperation(String name) |
protected |
CacheOperation(String name,
boolean dontCreateCacheRecordStoreIfNotExist) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterRun()
Is executed called after
Operation.run() or Operation.call() method completes normally and the operation is not
blocked, see CallStatus.WAIT. |
void |
beforeRun()
The beforeRun is called before either the
Operation.run() or the Operation.call() method is called. |
protected void |
beforeRunInternal()
Implementers can override this method to make a specific execution.
|
protected void |
dispose()
Implementers can override to release associated resources upon a
successful execution or failure.
|
int |
getAsyncBackupCount() |
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
String |
getServiceName() |
ObjectNamespace |
getServiceNamespace()
Returns the
ServiceNamespace which this object belongs to. |
int |
getSyncBackupCount() |
void |
logError(Throwable e)
Logs Exception/Error thrown during operation execution.
|
ExceptionAction |
onInvocationException(Throwable throwable)
Called when an Exception/Error is thrown
during an invocation.
|
protected void |
publishWanRemove(Data dataKey) |
protected void |
publishWanUpdate(Data dataKey,
CacheRecord record) |
protected void |
publishWanUpdate(Data dataKey,
Data dataValue,
CacheRecord record) |
protected void |
publishWanUpdate(Data dataKey,
Data dataValue,
Data dataExpiryPolicy,
CacheRecord record) |
getName, readInternal, toString, writeInternalcall, executedLocally, getCallerAddress, getCallerUuid, getCallId, getCallTimeout, getConnection, getInvocationTime, getLogger, getNodeEngine, getOperationResponseHandler, getPartitionId, getReplicaIndex, getResponse, getService, getWaitTimeout, isUrgent, onExecutionFailure, onSetCallId, readData, requiresExplicitServiceName, returnsResponse, run, sendResponse, setCallerUuid, setNodeEngine, setOperationResponseHandler, setPartitionId, setReplicaIndex, setService, setServiceName, setValidateTarget, setWaitTimeout, toString, validatesTarget, writeDataclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetPartitionIdgetIdreadData, writeDataprotected transient boolean dontCreateCacheRecordStoreIfNotExist
protected transient ICacheService cacheService
protected transient ICacheRecordStore recordStore
protected transient CacheWanEventPublisher wanEventPublisher
protected transient Closeable tenantContext
protected CacheOperation()
protected CacheOperation(String name)
protected CacheOperation(String name, boolean dontCreateCacheRecordStoreIfNotExist)
public final String getServiceName()
getServiceName in class Operationpublic final void beforeRun()
throws Exception
OperationOperation.run() or the Operation.call() method is called.
runs before wait-supportpublic void afterRun()
throws Exception
OperationOperation.run() or Operation.call() method completes normally and the operation is not
blocked, see CallStatus.WAIT.
Runs after backups, before wait-notify.protected void dispose()
protected void beforeRunInternal()
public ExceptionAction onInvocationException(Throwable throwable)
OperationonInvocationException in class Operationthrowable - Exception/Error thrown during
invocationpublic void logError(Throwable e)
Operationpublic final ObjectNamespace getServiceNamespace()
ServiceNamespaceAwareServiceNamespace which this object belongs to.getServiceNamespace in interface ServiceNamespaceAwarepublic int getFactoryId()
IdentifiedDataSerializablegetFactoryId in interface IdentifiedDataSerializablepublic final int getSyncBackupCount()
public final int getAsyncBackupCount()
protected final void publishWanUpdate(Data dataKey, CacheRecord record)
protected final void publishWanUpdate(Data dataKey, Data dataValue, CacheRecord record)
protected final void publishWanUpdate(Data dataKey, Data dataValue, Data dataExpiryPolicy, CacheRecord record)
protected final void publishWanRemove(Data dataKey)
Copyright © 2020 Hazelcast, Inc.. All Rights Reserved.