public void clearAOM() { activeObjectMap.clear(); activeObjectMap = null; }
protected Servant internalKeyToServant(ActiveObjectMap.Key key) { AOMEntry entry = activeObjectMap.get(key); if (entry == null) return null; return activeObjectMap.getServant(entry); }
public Key getKey(Servant value) throws WrongPolicy { AOMEntry entry = servantToEntry.get(value); return getKey(entry); }
Set<Key> keySet = activeObjectMap.keySet(); AOMEntry entry = activeObjectMap.get(key); Servant servant = activeObjectMap.getServant(entry); if (servant != null) boolean remainingActivations = activeObjectMap.hasMultipleIDs(entry);
public final void activateObject(byte[] id, Servant servant) throws WrongPolicy, ServantAlreadyActive, ObjectAlreadyActive { if (isUnique && activeObjectMap.contains(servant)) throw new ServantAlreadyActive(); ActiveObjectMap.Key key = new ActiveObjectMap.Key(id); // Note that this can't happen for system assigned IDs since the POA never hands out the same ID. However, we // make this redundant check here to share the code. if (activeObjectMap.containsKey(key)) throw new ObjectAlreadyActive(); AOMEntry entry = activeObjectMap.get(key); entry.activateObject(); activateServant(key, entry, servant); }
mediator.activeObjectMap.hasMultipleIDs(entry)); mediator.activeObjectMap.remove(key);
Object servant = activeObjectMap.getServant(entry); if (servant != null) if (activeObjectMap.contains((Servant) servant))
protected void putEntry(Key key, AOMEntry value) { super.putEntry(key, value); entryToKey.put(value, key); }
private AOMEntry enterEntry(ActiveObjectMap.Key key) { AOMEntry result = null; boolean failed; do { failed = false; result = activeObjectMap.get(key); try { result.enter(); } catch (Exception exc) { failed = true; } } while (failed); return result; }
POAPolicyMediatorBase_R(Policies policies, POAImpl poa) { super(policies, poa); // assert policies.retainServants() && policies.useActiveObjectMapOnly() if (!policies.retainServants()) throw poa.invocationWrapper().policyMediatorBadPolicyInFactory(); activeObjectMap = ActiveObjectMap.create(poa, !isUnique); }
Set<Key> keySet = activeObjectMap.keySet(); AOMEntry entry = activeObjectMap.get(key); Servant servant = activeObjectMap.getServant(entry); if (servant != null) boolean remainingActivations = activeObjectMap.hasMultipleIDs(entry);
public final void activateObject(byte[] id, Servant servant) throws WrongPolicy, ServantAlreadyActive, ObjectAlreadyActive { if (isUnique && activeObjectMap.contains(servant)) throw new ServantAlreadyActive(); ActiveObjectMap.Key key = new ActiveObjectMap.Key(id); // Note that this can't happen for system assigned IDs since the POA never hands out the same ID. However, we // make this redundant check here to share the code. if (activeObjectMap.containsKey(key)) throw new ObjectAlreadyActive(); AOMEntry entry = activeObjectMap.get(key); entry.activateObject(); activateServant(key, entry, servant); }
mediator.activeObjectMap.hasMultipleIDs(entry)); mediator.activeObjectMap.remove(key);
Object servant = activeObjectMap.getServant(entry); if (servant != null) if (activeObjectMap.contains((Servant) servant))
protected void putEntry(Key key, AOMEntry value) { super.putEntry(key, value); entryToKey.put(value, key); }
private AOMEntry enterEntry(ActiveObjectMap.Key key) { AOMEntry result = null; boolean failed; do { failed = false; result = activeObjectMap.get(key); try { result.enter(); } catch (Exception exc) { failed = true; } } while (failed); return result; }
POAPolicyMediatorBase_R(Policies policies, POAImpl poa) { super(policies, poa); // assert policies.retainServants() && policies.useActiveObjectMapOnly() if (!policies.retainServants()) throw poa.invocationWrapper().policyMediatorBadPolicyInFactory(); activeObjectMap = ActiveObjectMap.create(poa, !isUnique); }
protected Servant internalKeyToServant(ActiveObjectMap.Key key) { AOMEntry entry = activeObjectMap.get(key); if (entry == null) return null; return activeObjectMap.getServant(entry); }
public void clearAOM() { activeObjectMap.clear(); activeObjectMap = null; }
protected void putEntry(Key key, AOMEntry value) { super.putEntry(key, value); Set<Key> set = entryToKeys.get(value); if (set == null) { set = new HashSet<Key>(); entryToKeys.put(value, set); } set.add(key); }