AddCacheConfigOperation, which is used in conjunction with
InvocationUtil.invokeOnStableClusterSerial(NodeEngine,
java.util.function.Supplier, int) to reliably broadcast the CacheConfig to all members of the cluster.@Deprecated public class CacheCreateConfigOperation extends AbstractNamedOperation implements IdentifiedDataSerializable
This configuration is created using the following algorithm;
CacheCreateConfigOperation operation to the calculated partition which will force all
clusters to be single threaded.ICacheService.putCacheConfigIfAbsent(com.hazelcast.config.CacheConfig) is called.
This operation's purpose is to pass the required parameters into
ICacheService.putCacheConfigIfAbsent(com.hazelcast.config.CacheConfig).
Caveat: This operation does not return a response when createAlsoOnOthers is true and there are at least one
remote members on which the new CacheConfig needs to be created. When this operation returns null with createAlsoOnOthers == true, it is impossible to tell whether it is because the CacheConfig was not already registered
or due to sending out the operation to other remote members.
nameGENERIC_PARTITION_ID| Constructor and Description |
|---|
CacheCreateConfigOperation()
Deprecated.
|
CacheCreateConfigOperation(CacheConfig config,
boolean createAlsoOnOthers)
Deprecated.
|
CacheCreateConfigOperation(CacheConfig config,
boolean createAlsoOnOthers,
boolean ignoreLocal)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getClassId()
Deprecated.
Returns type identifier for this class.
|
int |
getFactoryId()
Deprecated.
Returns DataSerializableFactory factory ID for this class.
|
Object |
getResponse()
Deprecated.
Called if and only if
Operation.returnsResponse() returned true,
shortly after Operation.run() returns. |
String |
getServiceName()
Deprecated.
|
void |
onExecutionFailure(Throwable e)
Deprecated.
Called when an
Exception/Error is thrown during
operation execution. |
protected void |
readInternal(ObjectDataInput in)
Deprecated.
|
boolean |
returnsResponse()
Deprecated.
Method is intended to be overridden.
|
void |
run()
Deprecated.
Runs the operation.
|
protected void |
writeInternal(ObjectDataOutput out)
Deprecated.
|
getName, toStringafterRun, beforeRun, call, executedLocally, getCallerAddress, getCallerUuid, getCallId, getCallTimeout, getClientCallId, getConnection, getInvocationTime, getLogger, getNodeEngine, getOperationResponseHandler, getPartitionId, getReplicaIndex, getService, getWaitTimeout, isUrgent, logError, onInvocationException, onSetCallId, readData, requiresExplicitServiceName, sendResponse, setCallerUuid, setClientCallId, setNodeEngine, setOperationResponseHandler, setPartitionId, setReplicaIndex, setService, setServiceName, setValidateTarget, setWaitTimeout, toString, validatesTarget, writeDataclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitreadData, writeDatapublic CacheCreateConfigOperation()
public CacheCreateConfigOperation(CacheConfig config, boolean createAlsoOnOthers)
public CacheCreateConfigOperation(CacheConfig config, boolean createAlsoOnOthers, boolean ignoreLocal)
public String getServiceName()
getServiceName in class Operationpublic void run()
throws Exception
OperationOperation.run() or Operation.call() method should be implemented; not both.
Runs after wait-support, supposed to do actual operationrun in class OperationExceptionOperation.call()public void onExecutionFailure(Throwable e)
OperationException/Error is thrown during
operation execution.
By default this method does nothing. Operation implementations can override this behaviour according to their needs.
This method is called on node & thread that's executing the operation.
onExecutionFailure in class Operatione - Exception/Error thrown during operation executionpublic Object getResponse()
OperationOperation.returnsResponse() returned true,
shortly after Operation.run() returns.getResponse in class Operationpublic boolean returnsResponse()
Operationtrue,
Operation.getResponse() will be called right after Operation.run() method.
If it returns false, Operation.sendResponse(Object) must be
called later to finish the operation.
In other words, true is for synchronous operation and
false is for asynchronous one.
Default implementation is synchronous operation (true).
returnsResponse in class Operationprotected void writeInternal(ObjectDataOutput out) throws IOException
writeInternal in class AbstractNamedOperationIOExceptionprotected void readInternal(ObjectDataInput in) throws IOException
readInternal in class AbstractNamedOperationIOExceptionpublic int getClassId()
IdentifiedDataSerializablegetClassId in interface IdentifiedDataSerializablepublic int getFactoryId()
IdentifiedDataSerializablegetFactoryId in interface IdentifiedDataSerializableCopyright © 2019 Hazelcast, Inc.. All rights reserved.