void shutdown() { for (Completable component : components.values()) { component.complete(); } components = null; processing = null; round = null; annotations = null; initialized = false; state.remove(); }
@Override public Collection<IStorageChannel<? extends IAEStack<?>>> storageChannels() { return Collections.unmodifiableCollection( this.channels.values() ); }
public Iterable<? extends Action> allActions() { return actions.values(); }
/** * Initializes this instance.<p> * * This must be called after the provider classes have been added. */ public synchronized void initialize() { List<I_CmsContextMenuItem> result = Lists.newArrayList(); for (I_CmsContextMenuItemProvider provider : m_providerMap.values()) { result.addAll(provider.getMenuItems()); } m_itemCache = result; }
@Override public void release() { for (Object service : instances.values()) { if (service instanceof Initializable) { Initializable initializableService = (Initializable) service; initializableService.release(); } } instances = null; } }
private void configure(OptionSet optionSet){ for (OptionsBean bean : optionBeans.values()){ bean.configure(optionSet); } }
private void configure(OptionSet optionSet){ for (OptionsBean bean : optionBeans.values()){ bean.configure(optionSet); } }
@Override public void close() { synchronized (this) { if (closed) { return; } this.closed = true; } Collection<BrokerService> toStop = instantiatedServices.values(); for (BrokerService brokerService : toStop) { if (brokerService instanceof AbstractBrokerServiceProxy<?>) { ((AbstractBrokerServiceProxy<?>) brokerService).close(); } } broker.consumerSessionClosed(this); broker = null; }
/** * Allows to configure and initialize a set of modules */ public void init(Iterable<Module> modules) { instances = MutableClassToInstanceMap.create(); for (Module module : modules) { module.configure(this); } for (Object service : instances.values()) { if (service instanceof Initializable) { Initializable initializableService = (Initializable) service; initializableService.init(); } } instances = ImmutableClassToInstanceMap.copyOf(instances); }
/** * Parses the arguments and configures the OptionBeans * * @param parser option parser instance * @param args command line arguments * @param checkNonOptions if true then it checks that non options are specified i.e. some NodeStore is * selected * @return optionSet returned from OptionParser */ public OptionSet parseAndConfigure(OptionParser parser, String[] args, boolean checkNonOptions) throws IOException { for (OptionsBeanFactory o : Iterables.concat(oakRunOptions, beanFactories)){ OptionsBean bean = o.newInstance(parser); optionBeans.put(bean.getClass(), bean); } parser.formatHelpWith(new OakHelpFormatter(optionBeans.values(), commandName, summary, connectionString)); optionSet = parser.parse(args); configure(optionSet); checkForHelp(parser); if (checkNonOptions) { checkNonOptions(); } return optionSet; }
/** * Parses the arguments and configures the OptionBeans * * @param parser option parser instance * @param args command line arguments * @param checkNonOptions if true then it checks that non options are specified i.e. some NodeStore is * selected * @return optionSet returned from OptionParser */ public OptionSet parseAndConfigure(OptionParser parser, String[] args, boolean checkNonOptions) throws IOException { for (OptionsBeanFactory o : Iterables.concat(oakRunOptions, beanFactories)){ OptionsBean bean = o.newInstance(parser); optionBeans.put(bean.getClass(), bean); } parser.formatHelpWith(new OakHelpFormatter(optionBeans.values(), commandName, summary, connectionString)); optionSet = parser.parse(args); configure(optionSet); checkForHelp(parser); if (checkNonOptions) { checkNonOptions(); } return optionSet; }