public interface ClientEntityFactory<E extends org.terracotta.connection.entity.Entity,C>
Such factory is created with EntityService.newClientEntityFactory(String, Class, long, Object)
Modifier and Type | Method and Description |
---|---|
void |
create()
Creates the entity and validate that it can be effectively fetched
|
void |
destroy()
Destroy the entity matching the factory entity identifier and type
|
C |
getConfiguration() |
java.lang.String |
getEntityIdentifier() |
java.lang.Class<E> |
getEntityType() |
long |
getEntityVersion() |
E |
retrieve() |
java.lang.String getEntityIdentifier()
java.lang.Class<E> getEntityType()
long getEntityVersion()
C getConfiguration()
void create() throws org.terracotta.exception.EntityAlreadyExistsException
org.terracotta.exception.EntityAlreadyExistsException
- If the entity has already been createdE retrieve() throws org.terracotta.exception.EntityNotFoundException
org.terracotta.exception.EntityNotFoundException
- If the entity has not been created yetvoid destroy() throws org.terracotta.exception.EntityNotFoundException, EntityBusyException
org.terracotta.exception.EntityNotFoundException
- If the entity does not exist on the serverEntityBusyException
- If the entity is used and thus cannot be destroyed