Java 类org.apache.commons.collections.ReferenceMap 实例源码

项目:cacheonix-core    文件:StatefulPersistenceContext.java   
/**
 * Constructs a PersistentContext, bound to the given session.
 *
 * @param session The session "owning" this context.
 */
public StatefulPersistenceContext(SessionImplementor session) {
    this.session = session;

    entitiesByKey = new HashMap( INIT_COLL_SIZE );
    entitiesByUniqueKey = new HashMap( INIT_COLL_SIZE );
    proxiesByKey = new ReferenceMap( ReferenceMap.HARD, ReferenceMap.WEAK );
    entitySnapshotsByKey = new HashMap( INIT_COLL_SIZE );

    entityEntries = IdentityMap.instantiateSequenced( INIT_COLL_SIZE );
    collectionEntries = IdentityMap.instantiateSequenced( INIT_COLL_SIZE );
    collectionsByKey = new HashMap( INIT_COLL_SIZE );
    arrayHolders = IdentityMap.instantiate( INIT_COLL_SIZE );

    nullifiableEntityKeys = new HashSet();

    initTransientState();
}
项目:sakai    文件:XmlStringBuffer.java   
/**
 * internal
 *
 * @return  reference map
 */
private ReferenceMap getCache()
{
  if(this.cache == null)
  {
    this.cache = new ReferenceMap();
  }

  return this.cache;
}
项目:sakai    文件:XmlStringBuffer.java   
/**
 * inernal, clear cache
 */
private void clearCache()
{
  if(this.cache == null)
  {
    this.cache = new ReferenceMap();
  }
  else
  {
    this.cache.clear();
  }
}
项目:sakai    文件:XmlStringBuffer.java   
/**
 * internal
 *
 * @return  reference map
 */
private ReferenceMap getCache()
{
  if(this.cache == null)
  {
    this.cache = new ReferenceMap();
  }

  return this.cache;
}
项目:sakai    文件:XmlStringBuffer.java   
/**
 * inernal, clear cache
 */
private void clearCache()
{
  if(this.cache == null)
  {
    this.cache = new ReferenceMap();
  }
  else
  {
    this.cache.clear();
  }
}