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
stateless services are defined by the instance fields #adminKey ,
#configKey , etc. and for stateful services are 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
stateless services are defined by the instance fields #adminKey
,
#configKey
, etc. and for stateful services are UUIDs.public void addClientId(String clientId)
public void removeClientId(String clientId)
public void acquireLock(String key)
key
- public void releaseLock(String key)
InternalException
public 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.1.3-ice35-b52
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.