public abstract class RemoteStateTask<T> extends Object implements Callable<T>, com.hazelcast.core.HazelcastInstanceAware, 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(String mapName,
String key,
boolean lockState,
boolean noUpdate,
boolean debug,
boolean timingDebug)
Class constructor
|
RemoteStateTask(String mapName,
String key,
int options)
Class constructor
|
Modifier and Type | Method and Description |
---|---|
T |
call()
Run the remote task
|
com.hazelcast.core.HazelcastInstance |
getHazelcastInstance()
Get the Hazelcast instance
|
String |
getKey()
Return the file state key
|
String |
getMapName()
Return the clustered map name
|
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 T |
runRemoteTaskAgainstState(com.hazelcast.core.IMap<String,ClusterFileState> 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(String mapName, String key, int options)
mapName
- Stringkey
- Stringoptions
- intpublic com.hazelcast.core.HazelcastInstance getHazelcastInstance()
public void setHazelcastInstance(com.hazelcast.core.HazelcastInstance hcInstance)
setHazelcastInstance
in interface com.hazelcast.core.HazelcastInstanceAware
hcInstance
- HazelcastInstancepublic final String getMapName()
public final String getKey()
public final boolean hasOption(int option)
option
- intpublic final boolean hasDebug()
public final boolean hasTimingDebug()
public final String getTaskName()
protected abstract T runRemoteTaskAgainstState(com.hazelcast.core.IMap<String,ClusterFileState> stateCache, ClusterFileState fState) throws Exception
stateCache
- IMapfState
- ClusterFileStateException
Copyright © 2005–2017 Alfresco Software. All rights reserved.