public Enumeration<K> keys() { return backingMap.keys(); }
public Enumeration<?> getPropertyNames() throws JMSException { return this.properties.keys(); }
@Override public Enumeration<String> getAttributeNames() { if (!valid.get()) throw new IllegalStateException(); return attributes.keys(); }
@Override public String[] getValueNames() { if (!valid.get()) throw new IllegalStateException(); return (String[]) Collections.list(attributes.keys()).toArray(); }
/** * Try to establish a connection with each server if one * doesn't exist. */ public void connectAll(){ long sid; for(Enumeration<Long> en = queueSendMap.keys(); en.hasMoreElements();){ sid = en.nextElement(); connectOne(sid); } }
/** * Try to establish a connection with each server if one * doesn't exist. */ public void connectAll(){ long sid; for(Enumeration<Long> en = queueSendMap.keys(); en.hasMoreElements();){ sid = en.nextElement(); connectOne(sid); } }
@Override public Iterable<String> getAllKeys() { if (backingStore != null) { return backingStore.getAllKeys(); } final Enumeration<String> storeEnumeration = store.keys(); final Iterator<String> resultIterator = new Iterator<String>() { @Override public boolean hasNext() { return storeEnumeration.hasMoreElements(); } @Override public String next() { return storeEnumeration.nextElement(); } @Override public void remove() { throw new UnsupportedOperationException("remove operation is not supported as it is immutable."); } }; return new Iterable<String>() { @Override public Iterator<String> iterator() { return resultIterator; } }; }
@Override public Iterable<String> getAllKeys() { if (backingStore != null) { return backingStore.getAllKeys(); } final Enumeration<String> storeEnumeration = store.keys(); final Iterator<String> resultIterator = new Iterator<String>() { @Override public boolean hasNext() { return storeEnumeration.hasMoreElements(); } @Override public String next() { return storeEnumeration.nextElement(); } @Override public void remove() { throw new UnsupportedOperationException("remove operation is not supported as it is immutable."); } }; return new Iterable<String>() { @Override public Iterator<String> iterator() { return resultIterator; } }; }
private void sendSuspectRequest(final List<SuspectRequest> requests) { logger.debug("Sending suspect request for members {}", requests); List<InternalDistributedMember> recipients; if (currentView.size() > ServiceConfig.SMALL_CLUSTER_SIZE) { HashSet<InternalDistributedMember> filter = new HashSet<>(); for (Enumeration<InternalDistributedMember> e = suspectedMemberIds.keys(); e .hasMoreElements();) { filter.add(e.nextElement()); } filter.addAll( requests.stream().map(SuspectRequest::getSuspectMember).collect(Collectors.toList())); recipients = currentView.getPreferredCoordinators(filter, services.getJoinLeave().getMemberID(), ServiceConfig.SMALL_CLUSTER_SIZE + 1); } else { recipients = currentView.getMembers(); } logger.info("Sending suspect messages to {}", recipients); SuspectMembersMessage smm = new SuspectMembersMessage(recipients, requests); Set<InternalDistributedMember> failedRecipients; try { failedRecipients = services.getMessenger().send(smm); this.stats.incSuspectsSent(); } catch (CancelException e) { return; } if (failedRecipients != null && failedRecipients.size() > 0) { logger.info("Unable to send suspect message to {}", failedRecipients); } }
return new DomainEnumeration(securityManagerMap.keys(), securityManagerMap);
@Override public boolean set(String key, Object value, int expiry) { if (logger.isDebugEnabled()) { logger.debug("Set cache \'" + key + "\' to pool \'" + poolName + "\': " + value); } if (map.size() >= maxSize) { map.remove(map.keys().nextElement()); } map.put(key, value); return true; }
@Override public Enumeration<?> getPropertyNames() throws JMSException { return this.properties.keys(); }
/** * Clears all scopes. Useful for testing and not getting any leak... */ public static void reset() { for (Object name : Collections.list(MAP_KEY_TO_SCOPE.keys())) { closeScope(name); } ConfigurationHolder.configuration.onScopeForestReset(); ScopeImpl.resetUnBoundProviders(); }
@Override public Enumeration<String> getAttributeNames() { return attributes.keys(); }
@Override public Enumeration<String> getAttributeNames() { return attributes.keys(); }
@Override public Enumeration<String> getAttributeNames() { return attributes.keys(); } }
@Override public String[] getValueNames() { return Collections.list(attributes.keys()).toArray(new String[0]); }
/** * Try to establish a connection with each server if one * doesn't exist. */ public void connectAll(){ long sid; for(Enumeration<Long> en = queueSendMap.keys(); en.hasMoreElements();){ sid = en.nextElement(); connectOne(sid); } }
/** * Stop all proxies if possible */ public static void stopAllProxies() { for (Long threadId : Collections.list(proxies.keys())) { stopProxyByThread(threadId); } }
public void fail(Throwable t) { this.failures = new ConcurrentHashMap<>(); this.failures.put(this.operations.keys().nextElement(), t); OperationContext origContext = OperationContext.getOperationContext(); OperationContext.restoreOperationContext(this.opContext); for (Operation op : this.operations.values()) { op.fail(t); } OperationContext.restoreOperationContext(origContext); } }