|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgr.uoa.di.madgik.grs.registry.GRSRegistry
public class GRSRegistry
The GRSRegistry
utility class is a statically initialized single instance per JVM that can uniquely register and reference
items registered to it using a unique identifier. The items that can be registered are IBuffer
and IBufferStore
instances. In addition to instantiating the registry, during the static initialization, a LifecycleManager
is also
initialize and set to monitor the lifecycle properties of the registered items
Field Summary | |
---|---|
static GRSRegistry |
Registry
The registry instance used |
Method Summary | |
---|---|
java.lang.String |
add(IBuffer buffer)
Registers the provided IBuffer in the registry and assigns it with a unique id with which it can be referenced |
java.lang.String |
add(IBufferStore store)
Registers the provided IBufferStore in the registry and assigns it with a unique id with which it can be referenced |
IBuffer |
getBuffer(java.lang.String key)
Retrieves the IBuffer entry that is associated with the provided key |
IBufferStore |
getStore(java.lang.String key)
Retrieves the IBufferStore entry that is associated with the provided key |
void |
remove(java.lang.String key)
Removes the entry with the specific key from the registry if found and calls IBuffer.dispose() or IBufferStore.dispose() depending on the nature
of the respective entry |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final GRSRegistry Registry
Method Detail |
---|
public java.lang.String add(IBuffer buffer)
IBuffer
in the registry and assigns it with a unique id with which it can be referenced
buffer
- the IBuffer
to register
IBuffer
was assignedpublic java.lang.String add(IBufferStore store)
IBufferStore
in the registry and assigns it with a unique id with which it can be referenced
store
- the IBufferStore
to register
IBufferStore
was assignedpublic IBuffer getBuffer(java.lang.String key)
IBuffer
entry that is associated with the provided key
key
- the key of the entry to retrieve
IBuffer
associated with the key or null if no IBuffer
is associated with the keypublic IBufferStore getStore(java.lang.String key)
IBufferStore
entry that is associated with the provided key
key
- the key of the entry to retrieve
IBufferStore
associated with the key or null if no IBufferStore
is associated with the keypublic void remove(java.lang.String key)
IBuffer.dispose()
or IBufferStore.dispose()
depending on the nature
of the respective entry
key
- the key of the entry to remove and dispose
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |