public abstract class RemoteStateTask
extends java.lang.Object
implements java.util.concurrent.Callable, com.hazelcast.core.HazelcastInstanceAware, java.io.Serializable
Base class for remote file state cache tasks.
| Modifier and Type | Field and Description |
|---|---|
static int |
TaskDebug |
static int |
TaskLockState |
static int |
TaskNoUpdate |
static int |
TaskTiming |
| Constructor and Description |
|---|
RemoteStateTask()
Default constructor
|
RemoteStateTask(java.lang.String mapName,
java.lang.String key,
boolean lockState,
boolean noUpdate,
boolean debug,
boolean timingDebug)
Class constructor
|
RemoteStateTask(java.lang.String mapName,
java.lang.String key,
int options)
Class constructor
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
call()
Run the remote task
|
com.hazelcast.core.HazelcastInstance |
getHazelcastInstance()
Get the Hazelcast instance
|
java.lang.String |
getKey()
Return the file state key
|
java.lang.String |
getMapName()
Return the clustered map name
|
java.lang.String |
getTaskName()
Get the task name
|
boolean |
hasDebug()
Check if debug output is enabled for this remote task
|
boolean |
hasOption(int option)
Check if the specifed task option is enabled
|
boolean |
hasTimingDebug()
Check if the timing debug output is enabled for this remote task
|
protected abstract java.lang.Object |
runRemoteTaskAgainstState(com.hazelcast.core.IMap stateCache,
ClusterFileState fState)
Run a remote task against a file state
|
void |
setHazelcastInstance(com.hazelcast.core.HazelcastInstance hcInstance)
Set the Hazelcast instance
|
public static final int TaskDebug
public static final int TaskLockState
public static final int TaskNoUpdate
public static final int TaskTiming
public RemoteStateTask()
public RemoteStateTask(java.lang.String mapName,
java.lang.String key,
int options)
mapName - Stringkey - Stringoptions - intpublic RemoteStateTask(java.lang.String mapName,
java.lang.String key,
boolean lockState,
boolean noUpdate,
boolean debug,
boolean timingDebug)
mapName - Stringkey - StringlockState - booleannoUpdate - booleandebug - booleantimingDebug - booleanpublic com.hazelcast.core.HazelcastInstance getHazelcastInstance()
public void setHazelcastInstance(com.hazelcast.core.HazelcastInstance hcInstance)
setHazelcastInstance in interface com.hazelcast.core.HazelcastInstanceAwarehcInstance - HazelcastInstancepublic final java.lang.String getMapName()
public final java.lang.String getKey()
public final boolean hasOption(int option)
option - intpublic final boolean hasDebug()
public final boolean hasTimingDebug()
public final java.lang.String getTaskName()
public java.lang.Object call()
throws java.lang.Exception
call in interface java.util.concurrent.Callablejava.lang.Exceptionprotected abstract java.lang.Object runRemoteTaskAgainstState(com.hazelcast.core.IMap stateCache,
ClusterFileState fState)
throws java.lang.Exception
stateCache - IMapfState - ClusterFileStatejava.lang.ExceptionCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.