public class TaskDefinition<V> extends Object implements IdentifiedDataSerializable
Modifier and Type | Class and Description |
---|---|
static class |
TaskDefinition.Type |
Constructor and Description |
---|
TaskDefinition() |
TaskDefinition(TaskDefinition.Type type,
String name,
Callable<V> command,
long initialDelay,
long period,
TimeUnit unit) |
TaskDefinition(TaskDefinition.Type type,
String name,
Callable<V> command,
long delay,
TimeUnit unit) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Callable<V> |
getCommand() |
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
int |
getId()
Returns type identifier for this class.
|
long |
getInitialDelay() |
String |
getName() |
long |
getPeriod() |
TaskDefinition.Type |
getType() |
TimeUnit |
getUnit() |
int |
hashCode() |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
String |
toString() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public TaskDefinition()
public TaskDefinition(TaskDefinition.Type type, String name, Callable<V> command, long delay, TimeUnit unit)
public TaskDefinition(TaskDefinition.Type type, String name, Callable<V> command, long initialDelay, long period, TimeUnit unit)
public TaskDefinition.Type getType()
public String getName()
public long getInitialDelay()
public long getPeriod()
public TimeUnit getUnit()
public int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getId()
IdentifiedDataSerializable
getId
in interface IdentifiedDataSerializable
public 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.Copyright © 2021 Hazelcast, Inc.. All Rights Reserved.