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
.int
org.zeromq.ZContext
AsyncConnectionGroup.Builder
<org.zeromq.ZContext, org.zeromq.ZMQ.Socket> Returns aAsyncConnectionGroup.Builder
which can be used to build an instance ofAsyncConnectionGroup
for managing closely relatedAsyncConnection
instances.void
setThreadPoolSize
(int threadPoolSize) void
setzContext
(org.zeromq.ZContext zContext) void
start()
Starts theAsyncConnectionService<ContextT,
.SocketT> void
stop()
Stops theAsyncConnectionService<ContextT,
.SocketT> Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:AsyncConnectionService
Starts theAsyncConnectionService<ContextT,
.SocketT> - Specified by:
start
in interfaceAsyncConnectionService<org.zeromq.ZContext,
org.zeromq.ZMQ.Socket>
-
stop
public void stop()Description copied from interface:AsyncConnectionService
Stops theAsyncConnectionService<ContextT,
.SocketT> - Specified by:
stop
in interfaceAsyncConnectionService<org.zeromq.ZContext,
org.zeromq.ZMQ.Socket>
-
group
Description copied from interface:AsyncConnectionService
Returns aAsyncConnectionGroup.Builder
which can be used to build an instance ofAsyncConnectionGroup
for managing closely relatedAsyncConnection
instances.- Specified by:
group
in 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:AsyncConnectionService
Allocates an instance ofAsyncConnectionPool
.- Specified by:
allocatePool
in 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)
-