@Test(expected=RuntimeException.class) public void testUnregisterAccessByName() { AssemblingConveyor<Integer,String,User> ac1 = new AssemblingConveyor<>(); Supplier<Conveyor> acs = Conveyor.lazySupplier("test_name_2"); ac1.setName("test_name_2"); Conveyor<Integer,String,User> ac2 = Conveyor.byName("test_name_2"); Conveyor<Integer,String,User> ac3 = acs.get(); assertTrue(ac1==ac2); assertTrue(ac1==ac3); Conveyor.unRegister("test_name_2"); assertNotNull(acs.get()); ac2 = Conveyor.byName("test_name_2"); }
public void setName(String name) { this.name = name; this.innerThread.setName(name); this.setMbean(this.name); }
AssemblingConveyor implements Conveyor<K, L, OUT> { public void setName(String name) { this.name = name; this.innerThread.setName(name); this.setMbean(this.name); } }
AssemblingConveyor implements Conveyor<K, L, OUT> { public void setName(String name) { this.name = name; this.innerThread.setName(name); this.setMbean(this.name); } AssemblingConveyor();  AssemblingConveyor(Supplier<Queue<? extends Cart<K, ?, ?>>> cartQueueSupplier); }
AssemblingConveyor implements Conveyor<K, L, OUT> { public void setName(String name) { this.name = name; this.innerThread.setName(name); this.setMbean(this.name); } AssemblingConveyor();  AssemblingConveyor(Supplier<Queue<? extends Cart<K, ?, ?>>> cartQueueSupplier); @Override PartLoader<K,L> part(); @Override StaticPartLoader<L> staticPart(); @Override BuilderLoader<K, OUT> build(); @Override FutureLoader<K, OUT> future(); @Override CompletableFuture<Boolean> command(GeneralCommand<K, V> cart); @Override CommandLoader<K, OUT> command(); @Override ResultConsumerLoader<K, OUT> resultConsumer(); @Override ResultConsumerLoader<K, OUT> resultConsumer(ResultConsumer<K,OUT> consumer); @Override ScrapConsumerLoader<K> scrapConsumer(); @Override ScrapConsumerLoader<K> scrapConsumer(ScrapConsumer<K,?> scrapConsumer); @Override CompletableFuture<Boolean> place(Cart<K, V, L> cart); int getCollectorSize(); int getInputQueueSize(); int getDelayedQueueSize(); void stop(); @Override CompletableFuture<Boolean> completeAndStop(); long getExpirationCollectionIdleInterval(); TimeUnit getExpirationCollectionIdleTimeUnit(); void setIdleHeartBeat(long expirationCollectionInterval, TimeUnit unit); long getDefaultBuilderTimeout(); void setDefaultBuilderTimeout(long builderTimeout, TimeUnit unit); @Override void setDefaultBuilderTimeout(Duration duration); void rejectUnexpireableCartsOlderThan(long timeout, TimeUnit unit); boolean isOnTimeoutAction(); void setOnTimeoutAction(Consumer<Supplier<? extends OUT>> timeoutAction); @Override void setDefaultCartConsumer(LabeledValueConsumer<L, ?, B> cartConsumer); void setReadinessEvaluator(BiPredicate<State<K, L>, Supplier<? extends OUT>> readiness); void setReadinessEvaluator(Predicate<Supplier<? extends OUT>> readiness); void setBuilderSupplier(BuilderSupplier<OUT> builderSupplier); void setName(String name); boolean isRunning(); boolean isSynchronizeBuilder(); boolean isKeepCartsOnSite(); void setKeepCartsOnSite(boolean saveCarts); void setSynchronizeBuilder(boolean synchronizeBuilder); void addCartBeforePlacementValidator(Consumer<Cart<K, ?, L>> cartBeforePlacementValidator); void addBeforeKeyEvictionAction(Consumer<AcknowledgeStatus<K>> keyBeforeEviction); void addBeforeKeyReschedulingAction(BiConsumer<K, Long> keyBeforeRescheduling); long getExpirationTime(K key); void acceptLabels(L... labels); AssemblingConveyor<K, L, OUT> detach(); boolean isLBalanced(); Set<L> getAcceptedLabels(); @Override String getName(); @Override String toString(); @Override void enablePostponeExpiration(boolean flag); @Override void enablePostponeExpirationOnTimeout(boolean flag); @Override void setExpirationPostponeTime(long time, TimeUnit unit); @Override boolean isForwardingResults(); @Override long getCartCounter(); long getCommandCounter(); @Override void setIdleHeartBeat(Duration duration); @Override void rejectUnexpireableCartsOlderThan(Duration duration); @Override void setExpirationPostponeTime(Duration duration); @Override void setAutoAcknowledge(boolean auto); @Override void setAcknowledgeAction(Consumer<AcknowledgeStatus<K>> ackAction); @Override void autoAcknowledgeOnStatus(Status first, Status... other); @Override ResultConsumer<K, OUT> getResultConsumer(); @Override void interrupt(String conveyorName); @Override void setCartPayloadAccessor(Function<Cart<K, ?, L>, Object> payloadFunction); @Override void suspend(); @Override void resume(); @Override boolean isSuspended(); @Override Class<?> mBeanInterface(); }
AssemblingConveyor implements Conveyor<K, L, OUT> { public void setName(String name) { this.name = name; this.innerThread.setName(name); this.setMbean(this.name); } AssemblingConveyor();  AssemblingConveyor(Supplier<Queue<? extends Cart<K, ?, ?>>> cartQueueSupplier); @Override PartLoader<K,L> part(); @Override StaticPartLoader<L> staticPart(); @Override BuilderLoader<K, OUT> build(); @Override FutureLoader<K, OUT> future(); @Override CompletableFuture<Boolean> command(GeneralCommand<K, V> cart); @Override CommandLoader<K, OUT> command(); @Override ResultConsumerLoader<K, OUT> resultConsumer(); @Override ResultConsumerLoader<K, OUT> resultConsumer(ResultConsumer<K,OUT> consumer); @Override ScrapConsumerLoader<K> scrapConsumer(); @Override ScrapConsumerLoader<K> scrapConsumer(ScrapConsumer<K,?> scrapConsumer); @Override CompletableFuture<Boolean> place(Cart<K, V, L> cart); int getCollectorSize(); int getInputQueueSize(); int getDelayedQueueSize(); void stop(); @Override CompletableFuture<Boolean> completeAndStop(); long getExpirationCollectionIdleInterval(); TimeUnit getExpirationCollectionIdleTimeUnit(); void setIdleHeartBeat(long expirationCollectionInterval, TimeUnit unit); long getDefaultBuilderTimeout(); void setDefaultBuilderTimeout(long builderTimeout, TimeUnit unit); @Override void setDefaultBuilderTimeout(Duration duration); void rejectUnexpireableCartsOlderThan(long timeout, TimeUnit unit); boolean isOnTimeoutAction(); void setOnTimeoutAction(Consumer<Supplier<? extends OUT>> timeoutAction); @Override void setDefaultCartConsumer(LabeledValueConsumer<L, ?, B> cartConsumer); void setReadinessEvaluator(BiPredicate<State<K, L>, Supplier<? extends OUT>> readiness); void setReadinessEvaluator(Predicate<Supplier<? extends OUT>> readiness); void setBuilderSupplier(BuilderSupplier<OUT> builderSupplier); void setName(String name); boolean isRunning(); boolean isSynchronizeBuilder(); boolean isKeepCartsOnSite(); void setKeepCartsOnSite(boolean saveCarts); void setSynchronizeBuilder(boolean synchronizeBuilder); void addCartBeforePlacementValidator(Consumer<Cart<K, ?, L>> cartBeforePlacementValidator); void addBeforeKeyEvictionAction(Consumer<AcknowledgeStatus<K>> keyBeforeEviction); void addBeforeKeyReschedulingAction(BiConsumer<K, Long> keyBeforeRescheduling); long getExpirationTime(K key); void acceptLabels(L... labels); AssemblingConveyor<K, L, OUT> detach(); boolean isLBalanced(); Set<L> getAcceptedLabels(); @Override String getName(); @Override String toString(); @Override void enablePostponeExpiration(boolean flag); @Override void enablePostponeExpirationOnTimeout(boolean flag); @Override void setExpirationPostponeTime(long time, TimeUnit unit); @Override boolean isForwardingResults(); @Override long getCartCounter(); long getCommandCounter(); @Override void setIdleHeartBeat(Duration duration); @Override void rejectUnexpireableCartsOlderThan(Duration duration); @Override void setExpirationPostponeTime(Duration duration); @Override void setAutoAcknowledge(boolean auto); @Override void setAcknowledgeAction(Consumer<AcknowledgeStatus<K>> ackAction); @Override void autoAcknowledgeOnStatus(Status first, Status... other); @Override ResultConsumer<K, OUT> getResultConsumer(); @Override void interrupt(String conveyorName); @Override void setCartPayloadAccessor(Function<Cart<K, ?, L>, Object> payloadFunction); @Override void suspend(); @Override void resume(); @Override boolean isSuspended(); @Override Class<?> mBeanInterface();  }