private static void addIntValue(THashMap ncjMetaData, int index, int val) { ncjMetaData.put(index, val); }
private static void addIntValue(THashMap ncjMetaData, int index, int val) { ncjMetaData.put(index, val); }
private static void addIntValue(THashMap ncjMetaData, int index, int val) { ncjMetaData.put(index, val); }
private static void addValue(THashMap ncjMetaData, int index, String val) { if (val == null) { SanityManager.THROWASSERT("Null not allowed for index=" + index); } ncjMetaData.put(index, val); }
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); int size = stream.readInt(); setUp(size); while (size-- > 0) { Object key = stream.readObject(); Object val = stream.readObject(); put(key, val); } }
public Object create() { THashMap map = new THashMap(); for (int i = 0; i < 1000; i++) { Integer x = Integer.valueOf(i); map.put(x,x); } return map; } }
private static void addValue(THashMap ncjMetaData, int index, String val) { if (val == null) { SanityManager.THROWASSERT("Null not allowed for index=" + index); } ncjMetaData.put(index, val); }
private static void addValue(THashMap ncjMetaData, int index, String val) { if (val == null) { SanityManager.THROWASSERT("Null not allowed for index=" + index); } ncjMetaData.put(index, val); }
/** * copies the key/value mappings in <tt>map</tt> into this map. * * @param map a <code>Map</code> value */ public final void putAll(Map map) { ensureCapacity(map.size()); // could optimize this for cases when map instanceof THashMap for (Iterator i = map.entrySet().iterator(); i.hasNext();) { Map.Entry e = (Map.Entry)i.next(); put(e.getKey(),e.getValue()); } }
private static void addToArrayList(THashMap ncjMetaData, int index, String val) { if (val == null) { SanityManager.THROWASSERT("Null not allowed for index=" + index); } final ArrayList<String> valList; Object obj = ncjMetaData.get(index); if (obj == null) { valList = new ArrayList<String>(Local.MAXTABLES.value); ncjMetaData.put(index, valList); } else { valList = (ArrayList<String>)obj; } valList.add(val); }
private static void addToArrayList(THashMap ncjMetaData, int index, String val) { if (val == null) { SanityManager.THROWASSERT("Null not allowed for index=" + index); } final ArrayList<String> valList; Object obj = ncjMetaData.get(index); if (obj == null) { valList = new ArrayList<String>(Local.MAXTABLES.value); ncjMetaData.put(index, valList); } else { valList = (ArrayList<String>)obj; } valList.add(val); }
private static void addToArrayList(THashMap ncjMetaData, int index, String val) { if (val == null) { SanityManager.THROWASSERT("Null not allowed for index=" + index); } final ArrayList<String> valList; Object obj = ncjMetaData.get(index); if (obj == null) { valList = new ArrayList<String>(Local.MAXTABLES.value); ncjMetaData.put(index, valList); } else { valList = (ArrayList<String>)obj; } valList.add(val); }
@Override protected final synchronized void processException( final DistributionMessage msg, final ReplyException ex) { if (this.exceptions == null) { this.exceptions = new THashMap(); } this.exceptions.put(msg.getSender(), ex); super.processException(msg, ex); }
@Override protected final synchronized void processException( final DistributionMessage msg, final ReplyException ex) { if (this.exceptions == null) { this.exceptions = new THashMap(); } this.exceptions.put(msg.getSender(), ex); super.processException(msg, ex); }
@SuppressWarnings("unchecked") public Map<InternalDistributedMember, PersistentMemberID> adviseInitializedPersistentMembers() { initializationGate(); THashMap result = new THashMap(); Profile[] snapshot = this.profiles; for (Profile profile : snapshot) { CacheProfile cp = (CacheProfile)profile; if (cp.persistentID != null && cp.persistenceInitialized) { result.put(cp.getDistributedMember(), cp.persistentID); } } return result; }
/** * Returns the list of all persistent members. * For most cases, adviseInitializedPersistentMembers is more appropriate. These * method includes members that are still in the process of GII. */ @SuppressWarnings("unchecked") public Map<InternalDistributedMember, PersistentMemberID> advisePersistentMembers() { initializationGate(); THashMap result = new THashMap(); Profile[] snapshot = this.profiles; for (Profile profile : snapshot) { CacheProfile cp = (CacheProfile)profile; if (cp.persistentID != null) { result.put(cp.getDistributedMember(), cp.persistentID); } } return result; }
private static void addToTHashSet(THashMap ncjMetaData, int index, String val) { if (val == null) { SanityManager.THROWASSERT("Null not allowed for index=" + index); } final THashSet valSet; Object obj = ncjMetaData.get(index); if (obj == null) { valSet = new THashSet(Local.MAXTABLES.value); ncjMetaData.put(index, valSet); } else { valSet = (THashSet)obj; } valSet.add(val); }
private static void addToTHashSet(THashMap ncjMetaData, int index, String val) { if (val == null) { SanityManager.THROWASSERT("Null not allowed for index=" + index); } final THashSet valSet; Object obj = ncjMetaData.get(index); if (obj == null) { valSet = new THashSet(Local.MAXTABLES.value); ncjMetaData.put(index, valSet); } else { valSet = (THashSet)obj; } valSet.add(val); }
private static void addToTHashSet(THashMap ncjMetaData, int index, String val) { if (val == null) { SanityManager.THROWASSERT("Null not allowed for index=" + index); } final THashSet valSet; Object obj = ncjMetaData.get(index); if (obj == null) { valSet = new THashSet(Local.MAXTABLES.value); ncjMetaData.put(index, valSet); } else { valSet = (THashSet)obj; } valSet.add(val); }
public static THashMap readTHashMap(DataInput in) throws IOException, ClassNotFoundException { InternalDataSerializer.checkIn(in); int size = InternalDataSerializer.readArrayLength(in); if (size == -1) { return null; } else { THashMap map = new THashMap(size); for (int i = 0; i < size; i++) { Object key = DataSerializer.readObject(in); Object value = DataSerializer.readObject(in); map.put(key, value); } if (DEBUG) { InternalDataSerializer.logger.info( LocalizedStrings.DEBUG, "Read THashMap with " + size + " elements: " + map); } return map; } } /**