Package software.xdev.tci.network
Class LazyNetworkPool
java.lang.Object
software.xdev.tci.network.LazyNetworkPool
Provides a pool of
LazyNetwork-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Executorprotected static final AtomicIntegerprotected Supplier<LazyNetwork>protected static final AtomicIntegerprotected final LinkedBlockingQueue<LazyNetwork> -
Constructor Summary
ConstructorsConstructorDescriptionLikeLazyNetworkPool(int)but usesPreStartConfigto determine the sizeLazyNetworkPool(int size) LazyNetworkPool(int size, Executor executor) -
Method Summary
Modifier and TypeMethodDescriptionprotected LazyNetworkbootNew()static ThreadFactorygetNew()voidprotected voidwithNetworkSupplier(Supplier<LazyNetwork> networkSupplier)
-
Field Details
-
POOL_COUNTER
-
NETWORK_COUNTER
-
networkSupplier
-
queue
-
executor
-
-
Constructor Details
-
LazyNetworkPool
public LazyNetworkPool()LikeLazyNetworkPool(int)but usesPreStartConfigto determine the size -
LazyNetworkPool
public LazyNetworkPool(int size) -
LazyNetworkPool
-
-
Method Details
-
withNetworkSupplier
-
bootNew
-
managePoolAsync
public void managePoolAsync() -
managePoolInternal
protected void managePoolInternal() -
getNew
-
defaultThreadFactory
-