public class ServantHolder
extends java.lang.Object
Util.stringToIdentity(String)
and
Util.identityToString(Ice.Identity)
the servant tries to make the
two usages equivalent.Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
clientIds
An internal mapping to all client ids from
SessionI for a given
DB session since there is no method on ObjectAdapter to retrieve
all servants. |
Constructor and Description |
---|
ServantHolder(java.lang.String session) |
ServantHolder(java.lang.String session,
int servantsPerSession) |
Modifier and Type | Method and Description |
---|---|
void |
acquireLock(java.lang.String key)
Acquires the given lock or if necessary creates a new one.
|
void |
addClientId(java.lang.String clientId) |
Ice.Object |
get(Ice.Identity id) |
java.util.Set<java.lang.String> |
getClientIds() |
Ice.Identity |
getIdentity(java.lang.String idName)
Constructs an
Identity from the current session
and from the given String which for
stateful services are defined by UUIDs. |
java.util.List<java.lang.String> |
getServantList() |
java.lang.String |
getSession() |
java.lang.String |
getStatefulServiceCount() |
java.lang.Object |
getUntied(Ice.Identity id) |
void |
put(Ice.Identity id,
Ice.Object servant) |
void |
releaseLock(java.lang.String key)
Releases the given lock if found, otherwise throws an
InternalException |
Ice.Object |
remove(Ice.Identity id) |
void |
removeClientId(java.lang.String clientId) |
protected final java.util.Map<java.lang.String,java.lang.Object> clientIds
SessionI
for a given
DB session since there is no method on ObjectAdapter
to retrieve
all servants.public ServantHolder(java.lang.String session)
public ServantHolder(java.lang.String session, int servantsPerSession)
public java.lang.String getSession()
public Ice.Identity getIdentity(java.lang.String idName)
Identity
from the current session
and from the given String
which for
stateful services are defined by UUIDs.public void addClientId(java.lang.String clientId)
public void removeClientId(java.lang.String clientId)
public java.util.Set<java.lang.String> getClientIds()
public void acquireLock(java.lang.String key)
key
- the lock's keypublic void releaseLock(java.lang.String key)
InternalException
key
- the lock's keypublic Ice.Object get(Ice.Identity id)
public java.lang.Object getUntied(Ice.Identity id)
public void put(Ice.Identity id, Ice.Object servant) throws OverUsageException
OverUsageException
public Ice.Object remove(Ice.Identity id)
public java.util.List<java.lang.String> getServantList()
public java.lang.String getStatefulServiceCount()