@Override public String getName() { return name.getName(); }
@Override public String getName() { return name.getName(); }
public <T> void removeService(final ServiceName<T> name) { try { broker.getBrokerContext().getServiceContainer().removeService(name).get(10, TimeUnit.SECONDS); } catch (final InterruptedException | ExecutionException | TimeoutException e) { throw new RuntimeException("Could not remove service " + name.getName() + " in 10 seconds."); } }
public <T> void removeService(final ServiceName<T> name) { try { broker.getBrokerContext().getServiceContainer().removeService(name).get(10, TimeUnit.SECONDS); } catch (final InterruptedException | ExecutionException | TimeoutException e) { throw new RuntimeException("Could not remove service " + name.getName() + " in 10 seconds."); } }
final String errorMessage = "Could not complete installation of " + compositeServiceName.getName() + ": Failed to install " + futures.getKey();
final String errorMessage = "Could not complete installation of " + compositeServiceName.getName() + ": Failed to install " + futures.getKey();
LOG.debug( String.format( "Service %s interrupted while building", serviceName.getName())); } else { LOG.error("Failed to build service", t);
LOG.debug( String.format( "Service %s interrupted while building", serviceName.getName())); } else { LOG.error("Failed to build service", t);
public <T> void removeService(final ServiceName<T> name) { try { broker.getBrokerContext().getServiceContainer().removeService(name).get(10, TimeUnit.SECONDS); } catch (final InterruptedException | ExecutionException | TimeoutException e) { throw new RuntimeException("Could not remove service " + name.getName() + " in 10 seconds."); } }
public <T> void removeService(final ServiceName<T> name) { try { broker.getBrokerContext().getServiceContainer().removeService(name).get(10, TimeUnit.SECONDS); } catch (final InterruptedException | ExecutionException | TimeoutException e) { throw new RuntimeException("Could not remove service " + name.getName() + " in 10 seconds."); } }
public <S> S getService(final ServiceName<S> serviceName) { final ServiceContainer serviceContainer = broker.getBrokerContext().getServiceContainer(); final Injector<S> injector = new Injector<>(); final ServiceName<TestService> accessorServiceName = ServiceName.newServiceName("serviceAccess" + serviceName.getName(), TestService.class); try { serviceContainer .createService(accessorServiceName, new TestService()) .dependency(serviceName, injector) .install() .get(); } catch (final InterruptedException | ExecutionException e) { throw new RuntimeException(e); } serviceContainer.removeService(accessorServiceName); return injector.getValue(); }
public <S> S getService(final ServiceName<S> serviceName) { final ServiceContainer serviceContainer = broker.getBrokerContext().getServiceContainer(); final Injector<S> injector = new Injector<>(); final ServiceName<TestService> accessorServiceName = ServiceName.newServiceName("serviceAccess" + serviceName.getName(), TestService.class); try { serviceContainer .createService(accessorServiceName, new TestService()) .dependency(serviceName, injector) .install() .get(); } catch (final InterruptedException | ExecutionException e) { throw new RuntimeException(e); } serviceContainer.removeService(accessorServiceName); return injector.getValue(); }
public <S> S getService(final ServiceName<S> serviceName) { final ServiceContainer serviceContainer = broker.getBrokerContext().getServiceContainer(); final Injector<S> injector = new Injector<>(); final ServiceName<TestService> accessorServiceName = ServiceName.newServiceName("serviceAccess" + serviceName.getName(), TestService.class); try { serviceContainer .createService(accessorServiceName, new TestService()) .dependency(serviceName, injector) .install() .get(); } catch (final InterruptedException | ExecutionException e) { throw new RuntimeException(e); } serviceContainer.removeService(accessorServiceName); return injector.getValue(); }
public <S> S getService(final ServiceName<S> serviceName) { final ServiceContainer serviceContainer = broker.getBrokerContext().getServiceContainer(); final Injector<S> injector = new Injector<>(); final ServiceName<TestService> accessorServiceName = ServiceName.newServiceName("serviceAccess" + serviceName.getName(), TestService.class); try { serviceContainer .createService(accessorServiceName, new TestService()) .dependency(serviceName, injector) .install() .get(); } catch (final InterruptedException | ExecutionException e) { throw new RuntimeException(e); } serviceContainer.removeService(accessorServiceName); return injector.getValue(); }
Dispatchers.create(logWriteBufferServiceName.getName()).bufferSize(writeBufferSize);
Dispatchers.create(logWriteBufferServiceName.getName()).bufferSize(writeBufferSize);