Class JeroMQAsyncConnectionService
java.lang.Object
dev.getelements.elements.rt.jeromq.JeroMQAsyncConnectionService
- All Implemented Interfaces:
AsyncConnectionService<org.zeromq.ZContext,org.zeromq.ZMQ.Socket>
public class JeroMQAsyncConnectionService
extends Object
implements AsyncConnectionService<org.zeromq.ZContext,org.zeromq.ZMQ.Socket>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAsyncConnectionPool<org.zeromq.ZContext, org.zeromq.ZMQ.Socket> allocatePool(String name, int minConnections, int maxConnections, Function<org.zeromq.ZContext, org.zeromq.ZMQ.Socket> socketSupplier) Allocates an instance ofAsyncConnectionPool.intorg.zeromq.ZContextAsyncConnectionGroup.Builder<org.zeromq.ZContext, org.zeromq.ZMQ.Socket> Returns aAsyncConnectionGroup.Builderwhich can be used to build an instance ofAsyncConnectionGroupfor managing closely relatedAsyncConnectioninstances.voidsetThreadPoolSize(int threadPoolSize) voidsetzContext(org.zeromq.ZContext zContext) voidstart()Starts theAsyncConnectionService<ContextT,.SocketT> voidstop()Stops theAsyncConnectionService<ContextT,.SocketT> Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.getelements.elements.rt.AsyncConnectionService
allocatePool, group
-
Field Details
-
ASYNC_CONNECTION_IO_THREADS
- See Also:
-
-
Constructor Details
-
JeroMQAsyncConnectionService
public JeroMQAsyncConnectionService()
-
-
Method Details
-
start
public void start()Description copied from interface:AsyncConnectionServiceStarts theAsyncConnectionService<ContextT,.SocketT> - Specified by:
startin interfaceAsyncConnectionService<org.zeromq.ZContext,org.zeromq.ZMQ.Socket>
-
stop
public void stop()Description copied from interface:AsyncConnectionServiceStops theAsyncConnectionService<ContextT,.SocketT> - Specified by:
stopin interfaceAsyncConnectionService<org.zeromq.ZContext,org.zeromq.ZMQ.Socket>
-
group
Description copied from interface:AsyncConnectionServiceReturns aAsyncConnectionGroup.Builderwhich can be used to build an instance ofAsyncConnectionGroupfor managing closely relatedAsyncConnectioninstances.- Specified by:
groupin interfaceAsyncConnectionService<org.zeromq.ZContext,org.zeromq.ZMQ.Socket> - Parameters:
name- the name of the pool (used for logging and debugging)- Returns:
- the
AsyncConnectionGroup.Builder
-
allocatePool
public AsyncConnectionPool<org.zeromq.ZContext,org.zeromq.ZMQ.Socket> allocatePool(String name, int minConnections, int maxConnections, Function<org.zeromq.ZContext, org.zeromq.ZMQ.Socket> socketSupplier) Description copied from interface:AsyncConnectionServiceAllocates an instance ofAsyncConnectionPool.- Specified by:
allocatePoolin interfaceAsyncConnectionService<org.zeromq.ZContext,org.zeromq.ZMQ.Socket> - Parameters:
name-minConnections-maxConnections-socketSupplier-- Returns:
-
getzContext
public org.zeromq.ZContext getzContext() -
setzContext
@Inject public void setzContext(org.zeromq.ZContext zContext) -
getThreadPoolSize
public int getThreadPoolSize() -
setThreadPoolSize
@Inject public void setThreadPoolSize(@Named("dev.getelements.elements.rt.jeromq.async.connection.service.io.threads") int threadPoolSize)
-