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 |
name
GENERIC_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, writeInternal
call, 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, writeData
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getPartitionId
getId
readData, writeData
protected 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 Operation
public final void beforeRun() throws Exception
Operation
Operation.run()
or the Operation.call()
method is called.
runs before wait-supportpublic void afterRun() throws Exception
Operation
Operation.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)
Operation
onInvocationException
in class Operation
throwable
- Exception/Error thrown during
invocationpublic void logError(Throwable e)
Operation
public final ObjectNamespace getServiceNamespace()
ServiceNamespaceAware
ServiceNamespace
which this object belongs to.getServiceNamespace
in interface ServiceNamespaceAware
public int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public 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 © 2021 Hazelcast, Inc.. All Rights Reserved.