/** * Removes all of the elements from this set. */ @Override public void clear() { this.list.clear(); if (this.set != null) { this.set.clear(); } }
@Override public void restoreToNull() { if (!this.valueSet.isEmpty()) { this.values.clear(); this.valueSet.clear(); } }
@Override public void restoreToNull() { if (!this.valueSet.isEmpty()) { this.values.clear(); this.valueSet.clear(); } }
/** * Initialize the original set of recipient <code>Gateway</code>s. * * @param originalGatewaysReceivers * The original recipient <code>Gateway</code>s. */ @Override public void initializeReceipientDSIds( final Collection<Integer> originalGatewaysReceivers) { this.receipientDSIds.clear(); if (originalGatewaysReceivers != null) { this.receipientDSIds.addAll(originalGatewaysReceivers); } }
@Override public void restoreToNull() { if (!this.valueSet.isEmpty()) { this.values.clear(); this.valueSet.clear(); } }
/** * Initialize the original set of recipient <code>Gateway</code>s. * * @param originalGatewaysReceivers * The original recipient <code>Gateway</code>s. */ public void initializeReceipientDSIds( Collection<Integer> originalGatewaysReceivers) { this.receipientDSIds.clear(); if (originalGatewaysReceivers != null) { this.receipientDSIds.addAll(originalGatewaysReceivers); } }
/** * Initialize the original set of recipient <code>Gateway</code>s. * * @param originalGatewaysReceivers * The original recipient <code>Gateway</code>s. */ @Override public void initializeReceipientDSIds( final Collection<Integer> originalGatewaysReceivers) { this.receipientDSIds.clear(); if (originalGatewaysReceivers != null) { this.receipientDSIds.addAll(originalGatewaysReceivers); } }
/** * Initialize the original set of recipient <code>Gateway</code>s. * * @param originalGatewaysReceivers * The original recipient <code>Gateway</code>s. */ @Override public void initializeReceipientDSIds( final Collection<Integer> originalGatewaysReceivers) { this.receipientDSIds.clear(); if (originalGatewaysReceivers != null) { this.receipientDSIds.addAll(originalGatewaysReceivers); } }
private void refreshAllHosts(List<HostAddress> allHosts) { // refresh the new server list // we remove all from the set and re-populate since we would like // to prefer the ones coming as "allServers" with "isServer" flag // correctly set rather than the ones in "secondary-locators" this.controlHostSet.clear(); this.controlHosts.subList(this.locators.size(), this.controlHosts.size()) .clear(); this.controlHostSet.addAll(allHosts); this.controlHostSet.addAll(this.controlHosts); this.controlHosts.addAll(allHosts); }
@Override public void fromData(DataInput in) throws IOException, ClassNotFoundException { super.fromData(in); this.originatingDSId = DataSerializer.readInteger(in); this.receipientDSIds.clear(); int numberOfRecipientGateways = in.readInt(); for (int i = 0; i < numberOfRecipientGateways; i++) { this.receipientDSIds.add(Integer.valueOf(in.readInt())); } }
@SuppressWarnings("unchecked") @Override public void setValue(Object value) { if (SanityManager.DEBUG) { if (value.getClass() != ArrayList.class) { SanityManager.THROWASSERT("value (" + value + ") not an ArrayList but " + value.getClass()); } } this.values = (ArrayList<Object>)value; if (!this.valueSet.isEmpty()) { this.valueSet.clear(); } this.valueSet.addAll(this.values); }
@SuppressWarnings("unchecked") @Override public void setValue(Object value) { if (SanityManager.DEBUG) { if (value.getClass() != ArrayList.class) { SanityManager.THROWASSERT("value (" + value + ") not an ArrayList but " + value.getClass()); } } this.values = (ArrayList<Object>)value; if (!this.valueSet.isEmpty()) { this.valueSet.clear(); } this.valueSet.addAll(this.values); }
@SuppressWarnings("unchecked") @Override public void setValue(Object value) { if (SanityManager.DEBUG) { if (value.getClass() != ArrayList.class) { SanityManager.THROWASSERT("value (" + value + ") not an ArrayList but " + value.getClass()); } } this.values = (ArrayList<Object>)value; if (!this.valueSet.isEmpty()) { this.valueSet.clear(); } this.valueSet.addAll(this.values); }
/** * {@inheritDoc} */ @Override public void close(boolean cleanupOnError) throws StandardException { /* We'll let TableScanResultSet track the time it takes to close up, * so no timing here. */ for (TableScanResultSet scan : this.resultSets) { scan.close(cleanupOnError); } this.scanIndex = -1; this.currentRow = null; this.currentRL = null; this.rowLocations.clear(); super.close(cleanupOnError); this.isOpen = false; }
@SuppressWarnings("unchecked") @Override protected Set<DistributedMember> virtualReset() { assert Thread.holdsLock(this); this.waitLatch.countDown(); final THashSet members = new THashSet(this.grantedMembers.size()); members.addAll(this.grantedMembers); this.grantedMembers.clear(); return members; }
@SuppressWarnings("unchecked") @Override protected Set<DistributedMember> virtualReset() { assert Thread.holdsLock(this); this.waitLatch.countDown(); final THashSet members = new THashSet(this.grantedMembers.size()); members.addAll(this.grantedMembers); this.grantedMembers.clear(); return members; }
@SuppressWarnings("unchecked") @Override protected Set<DistributedMember> virtualReset() { assert Thread.holdsLock(this); this.waitLatch.countDown(); final THashSet members = new THashSet(this.grantedMembers.size()); members.addAll(this.grantedMembers); this.grantedMembers.clear(); return members; }
/** * @see java.io.Externalizable#readExternal * * @exception IOException * Thrown on error reading the object * @exception ClassNotFoundException * Thrown if the class of the object is not found */ @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { this.values = readDVDCollection(in, tListCreator); if (!this.valueSet.isEmpty()) { this.valueSet.clear(); } this.valueSet.addAll(this.values); }
/** * @see java.io.Externalizable#readExternal * * @exception IOException * Thrown on error reading the object * @exception ClassNotFoundException * Thrown if the class of the object is not found */ @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { this.values = readDVDCollection(in, tListCreator); if (!this.valueSet.isEmpty()) { this.valueSet.clear(); } this.valueSet.addAll(this.values); }
/** * @see java.io.Externalizable#readExternal * * @exception IOException * Thrown on error reading the object * @exception ClassNotFoundException * Thrown if the class of the object is not found */ @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { this.values = readDVDCollection(in, tListCreator); if (!this.valueSet.isEmpty()) { this.valueSet.clear(); } this.valueSet.addAll(this.values); }