/** * Factory method to create a set from a map. * * @param map the map to decorate, must not be null * @throws IllegalArgumentException if set is null */ public static Set decorate(Map map) { return decorate(map, null); }
/** * Factory method to create a set from a map. * * @param map the map to decorate, must not be null * @throws IllegalArgumentException if set is null */ public static Set decorate(Map map) { return decorate(map, null); }
public Set makeEmptySet() { return MapBackedSet.decorate(new HashedMap()); }
public Set makeEmptySet() { return MapBackedSet.decorate(new LinkedMap()); }
/** * Factory method to create a set from a map. * * @param map the map to decorate, must not be null * @throws IllegalArgumentException if set is null */ public static Set decorate(Map map) { return decorate(map, null); }
/** * Factory method to create a set from a map. * * @param map the map to decorate, must not be null * @throws IllegalArgumentException if set is null */ public static Set decorate(Map map) { return decorate(map, null); }
/** * Factory method to create a set from a map. * * @param map the map to decorate, must not be null * @throws IllegalArgumentException if set is null */ public static Set decorate(Map map) { return decorate(map, null); }
/** * Factory method to create a set from a map. * * @param map the map to decorate, must not be null * @throws IllegalArgumentException if set is null */ public static Set decorate(Map map) { return decorate(map, null); }
@SuppressWarnings("unchecked") private void initializeOperatingSet() { if(_operatingDirty) { _operatingDirty = false; _operating = MapBackedSet.decorate(new IdentityHashMap<Object, Object>()); } }
@SuppressWarnings("unchecked") private void initializeOperatingSet() { if(_operatingDirty) { _operatingDirty = false; _operating = MapBackedSet.decorate(new IdentityHashMap<Object, Object>()); } }
@SuppressWarnings("unchecked") private void initializeOperatingSet() { if(_operatingDirty) { _operatingDirty = false; _operating = MapBackedSet.decorate(new IdentityHashMap<Object, Object>()); } }
/** * Create a new set for storing adds/removes/changes. Takes into account * whether we need to use an identity set or standard set. */ protected Set newSet() { if (_identity == Boolean.TRUE) return MapBackedSet.decorate(new IdentityHashMap()); return new HashSet(); }
/** * Create a new set for storing adds/removes/changes. Takes into account * whether we need to use an identity set or standard set. */ protected Set newSet() { if (_identity == Boolean.TRUE) return MapBackedSet.decorate(new IdentityHashMap()); return new HashSet(); }
/** * Create a new set for storing adds/removes/changes. Takes into account * whether we need to use an identity set or standard set. */ protected Set newSet() { if (_identity == Boolean.TRUE) return MapBackedSet.decorate(new IdentityHashMap()); return new HashSet(); }
/** * Create a new set for storing adds/removes/changes. Takes into account * whether we need to use an identity set or standard set. */ protected Set newSet() { if (_identity == Boolean.TRUE) return MapBackedSet.decorate(new IdentityHashMap()); return new HashSet(); }
/** * Add the given instance to the dirty cache. */ public void addDirty(StateManagerImpl sm) { if (_dirty == null) { if (_orderDirty) _dirty = MapBackedSet.decorate(new LinkedMap()); else _dirty = new HashSet<StateManagerImpl>(); } if (_dirty.add(sm)) removeCleanInternal(sm); }
/** * Add the given instance to the dirty cache. */ public void addDirty(StateManagerImpl sm) { if (_dirty == null) { if (_orderDirty) _dirty = MapBackedSet.decorate(new LinkedMap()); else _dirty = new HashSet<StateManagerImpl>(); } if (_dirty.add(sm)) removeCleanInternal(sm); }
private Set<Broker> newBrokerSet() { BrokerValue bv; if (_conf instanceof OpenJPAConfigurationImpl) bv = ((OpenJPAConfigurationImpl) _conf).brokerPlugin; else bv = (BrokerValue) _conf.getValue(BrokerValue.KEY); if (FinalizingBrokerImpl.class.isAssignableFrom(bv.getTemplateBrokerType(_conf))) { return MapBackedSet.decorate(new ConcurrentHashMap(), new Object() { }); } else { return new ConcurrentReferenceHashSet<Broker>(ConcurrentReferenceHashSet.WEAK); } }
private Set<Broker> newBrokerSet() { BrokerValue bv; if (_conf instanceof OpenJPAConfigurationImpl) bv = ((OpenJPAConfigurationImpl) _conf).brokerPlugin; else bv = (BrokerValue) _conf.getValue(BrokerValue.KEY); if (FinalizingBrokerImpl.class.isAssignableFrom(bv.getTemplateBrokerType(_conf))) { return MapBackedSet.decorate(new ConcurrentHashMap(), new Object() { }); } else { return new ConcurrentReferenceHashSet<Broker>(ConcurrentReferenceHashSet.WEAK); } }
private Set<Broker> newBrokerSet() { BrokerValue bv; if (_conf instanceof OpenJPAConfigurationImpl) bv = ((OpenJPAConfigurationImpl) _conf).brokerPlugin; else bv = (BrokerValue) _conf.getValue(BrokerValue.KEY); if (FinalizingBrokerImpl.class.isAssignableFrom(bv.getTemplateBrokerType(_conf))) { return MapBackedSet.decorate(new ConcurrentHashMap(), new Object() { }); } else { return new ConcurrentReferenceHashSet<Broker>(ConcurrentReferenceHashSet.WEAK); } }