/** * Add Collection of metrics to be aggregated * @param counters collection of metrics to be aggregated * @return this instance */ public AggregatedCounter addAll(Collection<? extends Metric> counters) { _counters.addAll(counters); return this; }
/** * Initialize the adapter to publish all incoming events to the subscribed processors. Note that this instance should * be registered as a consumer of a Spring Message Channel. * * @param processors Processors to be subscribed * @param eventMessageConverter The message converter to use to convert spring message into event message */ public InboundEventMessageChannelAdapter(List<Consumer<List<? extends EventMessage<?>>>> processors, EventMessageConverter eventMessageConverter){ messageProcessors.addAll(processors); this.eventMessageConverter = eventMessageConverter; }
@Override public boolean addAll(int index, Collection<? extends T> c) { boolean changed = super.addAll(index, c); if (changed) { // drop the transient set, will be rebuilt when/if needed synchronized(this) { knownGroupNamesInList = null; } } return changed; }
@Override public boolean addAll(Collection<? extends T> c) { boolean changed = super.addAll(c); if (changed) { // drop the transient set, will be rebuilt when/if needed synchronized(this) { knownGroupNamesInList = null; } } return changed; }
/** Constructor from a new list of IpFilterRule */ public IpFilterRuleHandler(List<IpFilterRule> newList) { if (newList != null) { ipFilterRuleList.addAll(newList); } }
public synchronized boolean addAll(Collection<? extends E> collection) { return addAll(elements.length, collection); }
public DefaultCacheMonitorManager add(DefaultCacheMonitor... monitors) { monitorList.addAll(Arrays.asList(monitors)); return this; }
/** Inserts all of the elements in the specified collection into this list, starting at the specified position. */ public void addAll(int index, Collection<IpFilterRule> c) { if (c == null) { throw new NullPointerException("Collection can not be null"); } ipFilterRuleList.addAll(index, c); }
/** * Appends all of the elements in the specified collection to the end of this list, * in the order that they are returned by the specified collection's iterator. */ public void addAll(Collection<IpFilterRule> c) { if (c == null) { throw new NullPointerException("Collection can not be null"); } ipFilterRuleList.addAll(c); }
/** * Open index with all allocated partitions. * * @throws IOException */ public void open() throws IOException { Set<Map.Entry<File,Directory>> indexDirectories = indexStorage.openIndexDirectories().entrySet(); List<AbstractIndexPartition> list = new ArrayList<>( indexDirectories.size() ); for ( Map.Entry<File,Directory> entry : indexDirectories ) { list.add( partitionFactory.createPartition( entry.getKey(), entry.getValue() ) ); } partitions.addAll( list ); open = true; }
/** * Prepare the threadStoreList by moving into it all the new instances in Q. */ @edu.umd.cs.findbugs.annotations.SuppressWarnings( value = "JLM_JSR166_UTILCONCURRENT_MONITORENTER", justification = "findbugs complains about this synchronize. It could be changed to a sync on a dedicated Object instance to make findbugs happy. see comments below") private void prepareThreadStoreList() { // The following sync is for the rare case when this method is called concurrently. // In that case it would be sub-optimal for both threads to concurrently create their // own ArrayList and then for both of them to call addAll. // findbugs complains about this synchronize. It could be changed to a sync on a dedicated // Object instance to make findbugs happy. synchronized (threadStoreList) { ThreadStorage ts = this.threadStoreQ.poll(); if (ts == null) return; ArrayList<ThreadStorage> tmp = new ArrayList<ThreadStorage>(64); do { tmp.add(ts); ts = this.threadStoreQ.poll(); } while (ts != null); if (tmp.size() > 0) { this.threadStoreList.addAll(tmp); } } }
public ServiceRegistration registerServices(final ServiceURL... serviceURLs) { Assert.checkNotNullParam("serviceURLs", serviceURLs); Handle[] array = new Handle[serviceURLs.length]; for (int i = 0; i < serviceURLs.length; i++) { final ServiceURL serviceURL = serviceURLs[i]; array[i] = new Handle(serviceURL, false); } final List<Handle> list = Arrays.asList(array); handles.addAll(list); return new AggregateHandle(list, array); }
this.hydrants.addAll(hydrants);
@Override public void initialize(final Cluster cluster, final Collection<Host> hosts) { this.availableHosts.addAll(hosts); this.index.set(new Random().nextInt(Math.max(hosts.size(), 1))); }
this.fragmentList.addAll(tmp);
@Override public void init(Cluster cluster, Collection<Host> hosts) { this.liveHosts.addAll(hosts); this.configuration = cluster.getConfiguration(); this.index.set(new Random().nextInt(Math.max(hosts.size(), 1))); }
this.factories.addAll(Arrays.asList(factories));
@Override public boolean addAll(Collection<? extends T> c) { if (super.addAll(c)) { modCount.incrementAndGet(); return true; } return false; }
@Override public boolean addAll(Collection<? extends E> c) { boolean result = underlyingList.addAll(c); markAsStale(); return result; }
public ServerLifeCycleManagerImpl(Bus b) { Collection<? extends ServerLifeCycleListener> l = b.getExtension(ConfiguredBeanLocator.class) .getBeansOfType(ServerLifeCycleListener.class); if (l != null) { listeners.addAll(l); } } public Class<?> getRegistrationType() {