@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; }
/** * 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); } }
final THashSet thriftHosts = new THashSet(); this.mapLock.readLock().lock(); try { continue; thriftHosts.add(ThriftUtils.getHostAddress(ni.getHostName(), ni.getPort()).setServerType(serverType)); thriftHosts.addAll(hostAddrs); thriftHosts.add(hostAddr); filter.setKeepLocators(true); filter.setKeepServers(false); thriftHosts.forEach(filter); thriftHosts.forEach(filter); THashSet allHosts = new THashSet(thriftHosts.size()); for (Set<HostAddress> hostAddrs : this.thriftServers.values()) { allHosts.addAll(hostAddrs);
/** * @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); }
public FetchKeysResponse(InternalDistributedSystem system, LocalRegion region, InternalDistributedMember member) { super(system, member); this.region = region; returnValue = new THashSet(); }
while (!this.stopped) { handlePendingConnections(); if (selectedKeys.isEmpty()) { this.selector.select(1000L); final Set<SelectionKey> newSelectedKeys = this.selector .selectedKeys(); if (newSelectedKeys.size() > 0) { selectedKeys.addAll(newSelectedKeys); newSelectedKeys.clear(); if (selectedKeys.isEmpty()) { continue; Iterator<?> keysIter = selectedKeys.iterator(); while (keysIter.hasNext()) { SelectionKey key = (SelectionKey)keysIter.next();
public void ours() { ourSet.forEach(proc); }
final Map<InternalDistributedMember, ReplyException> exceptions, final boolean revertSelf) { final THashSet revertMembers = new THashSet(originalRecipients); final Class<?> failedExClass = failedEx.getClass(); Throwable cause; revertMembers.remove(entry.getKey()); revertMembers.remove(entry.getKey()); if (revertMembers.isEmpty() && !revertSelf) { return failedEx; if (!revertMembers.isEmpty()) { response = TXCleanupEntryMessage.send(system, dm, this, revertMembers, dataRegion, regionKey, originalOp, destroy, bulkOp, originalValue,
@SuppressWarnings("unchecked") public Set<InternalDistributedMember> getOtherMembers() { final InternalDistributedMember self = this.sys.getDistributedMember(); final THashSet members = new THashSet(this.memberToVMIdMap.size()); for (InternalDistributedMember m : this.memberToVMIdMap.keySet()) { if (!self.equals(m)) { members.add(m); } } return members; }
/** * Does this set contain a Struct of the correct type with the specified * values? */ public boolean containsFieldValues(Object[] fieldValues) { return super.contains(fieldValues); }
/** * For internal use. Just add the Object[] values for a struct with same type */ public boolean addFieldValues(Object[] fieldValues) { return super.add(fieldValues); }
/** * 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
/** Remove the field values from a struct of the correct type */ public boolean removeFieldValues(Object[] fieldValues) { return super.remove(fieldValues); }
columnReferences.putIfAbsent(((ColumnReference)node).getColumnName()); columnReferences.putIfAbsent(rc.name); columnReferences.putIfAbsent(rc.exposedName); String srcCol = rc.getSourceColumnName(); if (srcCol != null) { columnReferences.putIfAbsent(srcCol); || rc.isGeneratedForUnmatchedColumnInInsert() || rc.getExpression() == null) { columnReferences.putIfAbsent(rc); columnReferences.putIfAbsent(((BaseColumnNode)node).getColumnName()); columnFound = columnReferences.contains(((ColumnReference)node) .getColumnName()); String colName = rc.name; if (colName != null) { columnFound = columnReferences.contains(colName); columnFound = columnReferences.contains(colName); columnFound = columnReferences.contains(colName); columnFound = columnReferences.contains(((BaseColumnNode)node) .getColumnName());