public abstract class GCUBELocalResource extends GCUBEStatefulResource<String>
GCUBEStatefulResource for stateful entities that
are locally accessible.GCUBEStatefulResource.LOCK, GCUBEStatefulResource.TaskContext| Modifier and Type | Field and Description |
|---|---|
protected GCUBEServiceContext |
context
The context of the service in which the resource is used.
|
logger, uuidGen| Constructor and Description |
|---|
GCUBELocalResource() |
| Modifier and Type | Method and Description |
|---|---|
void |
addLink()
Increments the number of clients that share the resource.
|
int |
getLinks()
Returns the number of clients that share the resource.
|
GCUBEServiceContext |
getServiceContext()
Returns the context of the service associated with the resource.
|
protected void |
initialise(String id,
Object... params)
Used internally to initialise the resource with a given identifier and from given parameters.
|
void |
removeLink()
Decrements the number of clients that share the resource.
|
void |
setLinks(int links)
Sets the number of clients that share the resource.
|
void |
setServiceContext(GCUBEServiceContext context)
Sets the service context associated with the local resource.
|
getID, getLock, getScheduledTasks, getScope, launchTask, onRemove, setID, setPersistenceDelegate, stopTask, storegetPortTypeMap, setPortTypeMapprotected GCUBEServiceContext context
protected void initialise(String id, Object... params) throws Exception
initialise in class GCUBEStatefulResource<String>id - the identifier, or null if a new one should be generated.params - (optional) the initialisation parameters.Exception - if the resource could not be initialised.public int getLinks()
public void addLink()
public void removeLink()
public void setLinks(int links)
links - the number of clients that share the resource.public GCUBEServiceContext getServiceContext()
getServiceContext in class GCUBEStatefulResource<String>public void setServiceContext(GCUBEServiceContext context)
context - the context.Copyright © 2015. All Rights Reserved.