131132133134135136137138
/** * Constructor. Configuration must be provided on construction. */ protected AbstractBrokerFactory(OpenJPAConfiguration config) { _conf = config; _pcClassLoaders = new ConcurrentReferenceHashSet( ConcurrentReferenceHashSet.WEAK); }
471472473474475476477478479480481
if (factory != null) return factory; // reset these transient fields to empty values _transactional = new ConcurrentHashMap(); _brokers = new ConcurrentReferenceHashSet( ConcurrentReferenceHashSet.WEAK); makeReadOnly(); return this; }
461462463464465466467468469470471
355356357358359360361
* Individual query results will be registered as types changed * listeners. We want such query results to be gc'd once * the only reference is held by the list of expiration listeners. */ protected Collection newListenerCollection() { return new ConcurrentReferenceHashSet (ConcurrentReferenceHashSet.WEAK); }
487488489490491492493494495
if (FinalizingBrokerImpl.class.isAssignableFrom( bv.getTemplateBrokerType(_conf))) { return MapBackedSet.decorate(new ConcurrentHashMap(), new Object() { }); } else { return new ConcurrentReferenceHashSet( ConcurrentReferenceHashSet.WEAK); } }
823824825826827828829830831832
/** * Method insures that deserialized EMF has this reference re-instantiated */ private Collection getPcClassLoaders() { if (_pcClassLoaders == null) _pcClassLoaders = new ConcurrentReferenceHashSet( ConcurrentReferenceHashSet.WEAK); return _pcClassLoaders; }