public abstract class RemoteCacheTask<T> extends Object implements Callable<T>, com.hazelcast.core.HazelcastInstanceAware, Serializable
Base class for remote cache tasks.
Modifier and Type | Field and Description |
---|---|
static int |
TaskDebug |
static int |
TaskTiming |
Constructor and Description |
---|
RemoteCacheTask()
Default constructor
|
RemoteCacheTask(String mapName,
String key,
boolean debug,
boolean timingDebug)
Class constructor
|
RemoteCacheTask(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 |
runRemoteTask(com.hazelcast.core.IMap<String,ClusterFileState> stateCache,
String key)
Run a remote task
|
void |
setHazelcastInstance(com.hazelcast.core.HazelcastInstance hcInstance)
Set the Hazelcast instance
|
public static final int TaskDebug
public static final int TaskTiming
public RemoteCacheTask()
public RemoteCacheTask(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()
Copyright © 2005–2017 Alfresco Software. All rights reserved.