public final class NioEventLoops extends Object implements EventLoops
Constructor and Description |
---|
NioEventLoops()
Create direct NIO event loops, one per CPU core.
|
NioEventLoops(EventPolicy policy,
int size)
Create direct NIO event loops.
|
NioEventLoops(int size)
Create direct NIO event loops.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close all event loops.
|
NioEventLoop |
get(int index)
Return event loop given array index.
|
NioEventLoop[] |
getArray()
Return array of event loops.
|
int |
getSize()
Return number of event loops in this group.
|
void |
initTlsContext(TlsPolicy policy)
Initialize TLS context.
|
NioEventLoop |
next()
Return next event loop in round-robin fashion.
|
public NioEventLoops() throws AerospikeException
AerospikeException
public NioEventLoops(int size) throws AerospikeException
size
- number of event loops to createAerospikeException
public NioEventLoops(EventPolicy policy, int size) throws AerospikeException
policy
- event loop policysize
- number of event loops to createAerospikeException
public void initTlsContext(TlsPolicy policy)
initTlsContext
in interface EventLoops
public NioEventLoop[] getArray()
getArray
in interface EventLoops
public int getSize()
getSize
in interface EventLoops
public NioEventLoop get(int index)
get
in interface EventLoops
public NioEventLoop next()
next
in interface EventLoops
public void close()
close
in interface EventLoops
close
in interface Closeable
close
in interface AutoCloseable
Copyright ? 2012–2018 Aerospike, Inc. All rights reserved.