V
- public final class RunnableAdapter<V> extends Object implements IdentifiedDataSerializable, Callable<V>, HazelcastInstanceAware, PartitionAware
Constructor and Description |
---|
RunnableAdapter() |
RunnableAdapter(Runnable task) |
Modifier and Type | Method and Description |
---|---|
V |
call() |
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
int |
getId()
Returns type identifier for this class.
|
Object |
getPartitionKey()
The key that will be used by Hazelcast to specify the partition.
|
Runnable |
getRunnable() |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
void |
setHazelcastInstance(HazelcastInstance hazelcastInstance)
Gets the HazelcastInstance reference when submitting a Runnable/Callable using Hazelcast ExecutorService.
|
void |
setRunnable(Runnable runnable) |
String |
toString() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public RunnableAdapter()
public RunnableAdapter(Runnable task)
public Runnable getRunnable()
public void setRunnable(Runnable runnable)
public Object getPartitionKey()
PartitionAware
getPartitionKey
in interface PartitionAware
public void setHazelcastInstance(HazelcastInstance hazelcastInstance)
HazelcastInstanceAware
setHazelcastInstance
in interface HazelcastInstanceAware
hazelcastInstance
- the HazelcastInstance referencepublic void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- outputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
output stream has been closed.public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
input stream has been closed.public int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getId()
IdentifiedDataSerializable
getId
in interface IdentifiedDataSerializable
Copyright © 2020 Hazelcast, Inc.. All Rights Reserved.