/** Remove the field values from a struct of the correct type */ public boolean removeFieldValues(Object[] fieldValues) { return super.remove(fieldValues); }
/** * Removes all of the elements in <tt>collection</tt> from the set. * * @param collection a <code>Collection</code> value * @return true if the set was modified by the remove all operation. */ public boolean removeAll(Collection collection) { boolean changed = false; // GemStone changes BEGIN for (Object o : collection) { if (remove(o)) { changed = true; } } /* (original code) int size = collection.size(); Iterator it; it = collection.iterator(); while (size-- > 0) { if (remove(it.next())) { changed = true; } } */ // GemStone changes END return changed; }
public final Object removeAt(final int index) { final Object removed = this.list.remove(index); if (removed != null && this.set != null) { if (this.list.size() < MIN_SET_SIZE) { this.set = null; } else { this.set.remove(removed); } } return removed; }
public boolean removeAll(StructSet ss) { boolean modified = false; if (!this.structType.equals(ss.structType)) { return false; // nothing // modified } for (Iterator itr = ss.fieldValuesIterator(); itr.hasNext();) { Object[] vals = (Object[]) itr.next(); if (super.remove(vals)) { modified = true; } } return modified; }
/** * Remove all new elements added to {@link SetWithCheckpoint} after this * checkpoint was captured. */ public void removeAllChanged() { final int origSize = list.size(); if (set != null) { // check if newSize will go below required minimum set size if (this.cpPos < MIN_SET_SIZE) { // SubList clear is more efficient since it avoids range check etc. // in each call to remove as above list.subList(this.cpPos, origSize).clear(); set = null; } else { for (int index = origSize - 1; index >= this.cpPos; index--) { final Object removed = list.remove(index); set.remove(removed); } } } else { // SubList clear is more efficient since it avoids range check etc. // in each call to remove as above list.subList(this.cpPos, origSize).clear(); } }
@Override protected void removeMemberFromLists(final InternalDistributedMember member, final boolean departed) { synchronized (this) { if (this.waiters != null) { this.waiters.remove(member); } if (departed) { this.grantedMembers.remove(member); } } checkWaiters(); }
@Override protected void removeMemberFromLists(final InternalDistributedMember member, final boolean departed) { synchronized (this) { if (this.waiters != null) { this.waiters.remove(member); } if (departed) { this.grantedMembers.remove(member); } } checkWaiters(); } }
@Override protected void removeMemberFromLists(final InternalDistributedMember member, final boolean departed) { synchronized (this) { if (this.waiters != null) { this.waiters.remove(member); } if (departed) { this.grantedMembers.remove(member); } } checkWaiters(); } }
/** * Returns a private-memory list containing the identities of all * the other known distribution managers not including me. */ public Set getOtherDistributionManagerIds() { // We return a modified copy of the list, so // collect the old list and copy under the lock. THashSet result = new THashSet(getDistributionManagerIds()); InternalDistributedMember me = getDistributionManagerId(); result.remove(me); // It's okay for my own id to not be in the list of all ids yet. return result; } @Override
return; // already removed this.clientSockets.remove(transport); if (this.clientSockets.isEmpty()) { if (this.connectionIds.isEmpty()) {
final THashSet remainingRecipients = new THashSet(recipients); for (TXBatchResponse batchResponse : batchResponses) { remainingRecipients.remove(batchResponse.recipient);