|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.common.core.utils.handlers.GCUBEServiceClientImpl
org.gcube.common.core.state.GCUBEStatefulResource<String>
org.gcube.common.core.state.GCUBELocalResource
public abstract class GCUBELocalResource
An abstract specialisation of GCUBEStatefulResource for stateful entities that
are locally accessible.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.gcube.common.core.state.GCUBEStatefulResource |
|---|
GCUBEStatefulResource.LOCK, GCUBEStatefulResource.TaskContext |
| Field Summary | |
|---|---|
protected GCUBEServiceContext |
context
The context of the service in which the resource is used. |
| Fields inherited from class org.gcube.common.core.state.GCUBEStatefulResource |
|---|
logger, uuidGen |
| Constructor Summary | |
|---|---|
GCUBELocalResource()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.gcube.common.core.state.GCUBEStatefulResource |
|---|
getID, getLock, getScheduledTasks, getScope, launchTask, onRemove, setID, setPersistenceDelegate, stopTask, store |
| Methods inherited from class org.gcube.common.core.utils.handlers.GCUBEServiceClientImpl |
|---|
getPortTypeMap, setPortTypeMap |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected GCUBEServiceContext context
| Constructor Detail |
|---|
public GCUBELocalResource()
| Method Detail |
|---|
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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||