public class ResourceType extends Object implements CatalystSerializable
state machine information.
Given a Resource class, the ResourceType provides information about that resource
necessary to handle state changes and serialization in the cluster. Resource classes provided to
the ResourceType constructor must be annotated with the ResourceTypeInfo annotation.
| Constructor and Description |
|---|
ResourceType() |
ResourceType(Class<? extends Resource> type) |
ResourceType(int id,
Class<? extends ResourceFactory<?>> factory) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object) |
Class<? extends ResourceFactory<?>> |
factory()
Returns the resource instance factory.
|
int |
hashCode() |
int |
id()
Returns the resource type ID.
|
void |
readObject(BufferInput<?> buffer,
Serializer serializer) |
String |
toString() |
void |
writeObject(BufferOutput<?> buffer,
Serializer serializer) |
public ResourceType()
public ResourceType(int id,
Class<? extends ResourceFactory<?>> factory)
public int id()
public Class<? extends ResourceFactory<?>> factory()
public void writeObject(BufferOutput<?> buffer, Serializer serializer)
writeObject in interface CatalystSerializablepublic void readObject(BufferInput<?> buffer, Serializer serializer)
readObject in interface CatalystSerializableCopyright © 2013–2016. All rights reserved.