List of usage examples for org.apache.commons.collections.map ReferenceIdentityMap ReferenceIdentityMap
public ReferenceIdentityMap(int keyType, int valueType, boolean purgeValues)
ReferenceIdentityMap that will use the specified types of references. From source file:org.apache.ojb.broker.core.IdentityFactoryImpl.java
public IdentityFactoryImpl(PersistenceBroker broker) { this.broker = broker; this.objectToIdentityMap = new ReferenceIdentityMap(ReferenceIdentityMap.WEAK, ReferenceIdentityMap.HARD, true);//w w w . j ava 2s. co m this.transientSequenceManager = new SequenceManagerTransientImpl(broker); broker.addListener(this, true); }
From source file:org.apache.ojb.broker.metadata.fieldaccess.AnonymousPersistentField.java
protected void putToFieldCache(Object key, Object value) { if (key != null) { if (fkCache == null) { fkCache = new ReferenceIdentityMap(ReferenceIdentityMap.WEAK, ReferenceIdentityMap.HARD, true); }//from ww w . java2 s . c o m if (value != null) fkCache.put(key, value); else fkCache.remove(key); } }