public static interface Operator.SharedObjectManager
Operator.RuntimeEnvironment
interface
to manage SharedObjects. The lifecycle of a registered SharedObject is maintained by the parent Container.
When the parent Container is removed, suspended, resumed the appropriate methods on the SharedObject will also be called.
SharedObjects are maintained by the key given during Operator.SharedObjectManager.registerSharedObject(java.lang.Object, com.streambase.sb.operator.Operator.SharedObject)
.Modifier and Type | Method and Description |
---|---|
Operator.SharedObject |
getSharedObject(java.lang.Object key)
get the SharedObject from this Container.
|
Operator.SharedObject.State |
getSharedObjectState(java.lang.Object key)
Return the
Operator.SharedObject.State of SharedObject on this Container associated with
the given key or null if there was no mapping |
void |
registerSharedObject(java.lang.Object key,
Operator.SharedObject value)
Add the given SharedObject to this Container.
|
Operator.SharedObject |
removeSharedObject(java.lang.Object key)
Remove the SharedObject from this Container.
|
void registerSharedObject(java.lang.Object key, Operator.SharedObject value) throws AlreadyRegisteredException, StreamBaseException
key
- The key that the SharedObjectManager uses to maintain the SharedObjectvalue
- the SharedObjectjava.lang.IllegalArgumentException
- if there has already been a SharedObject registered with the
given keyAlreadyRegisteredException
- throw if the SharedObject is already registeredStreamBaseException
- thrown by calling the SharedObject.start()Operator.SharedObject
Operator.SharedObject getSharedObject(java.lang.Object key)
key
- Operator.SharedObject
Operator.SharedObject removeSharedObject(java.lang.Object key)
key
- Operator.SharedObject
Operator.SharedObject.State getSharedObjectState(java.lang.Object key)
Operator.SharedObject.State
of SharedObject on this Container associated with
the given key or null if there was no mappingkey
- the key for the SharedObject for this ContainerOperator.SharedObject