public class ServantHolder extends 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 Map<String,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(String session) |
ServantHolder(String session,
int servantsPerSession) |
Modifier and Type | Method and Description |
---|---|
void |
acquireLock(String key)
Acquires the given lock or if necessary creates a new one.
|
void |
addClientId(String clientId) |
Ice.Object |
get(Ice.Identity id) |
Set<String> |
getClientIds() |
Ice.Identity |
getIdentity(String idName)
Constructs an
Identity from the current session
and from the given String which for
stateful services are defined by UUIDs. |
List<String> |
getServantList() |
String |
getSession() |
String |
getStatefulServiceCount() |
Object |
getUntied(Ice.Identity id) |
void |
put(Ice.Identity id,
Ice.Object servant) |
void |
releaseLock(String key)
Releases the given lock if found, otherwise throws an
InternalException |
Ice.Object |
remove(Ice.Identity id) |
void |
removeClientId(String clientId) |
public ServantHolder(String session)
public ServantHolder(String session, int servantsPerSession)
public String getSession()
public Ice.Identity getIdentity(String idName)
Identity
from the current session
and from the given String
which for
stateful services are defined by UUIDs.public void addClientId(String clientId)
public void removeClientId(String clientId)
public void acquireLock(String key)
key
- the lock's keypublic void releaseLock(String key)
InternalException
key
- the lock's keypublic Ice.Object get(Ice.Identity id)
public Object getUntied(Ice.Identity id)
public void put(Ice.Identity id, Ice.Object servant) throws omero.OverUsageException
omero.OverUsageException
public Ice.Object remove(Ice.Identity id)
public String getStatefulServiceCount()
Version: 5.3.5-ice35-b73
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.