Class JeroMqManager
- java.lang.Object
-
- org.apache.logging.log4j.core.appender.AbstractManager
-
- org.apache.logging.log4j.core.appender.mom.jeromq.JeroMqManager
-
- All Implemented Interfaces:
AutoCloseable
public class JeroMqManager extends AbstractManager
Manager for publishing messages via JeroMq.- Since:
- 2.6
-
-
Field Summary
Fields Modifier and Type Field Description static String
SYS_PROPERTY_ENABLE_SHUTDOWN_HOOK
System property to enable shutdown hook.static String
SYS_PROPERTY_IO_THREADS
System property to control JeroMQ I/O thread count.-
Fields inherited from class org.apache.logging.log4j.core.appender.AbstractManager
count, LOGGER
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.zeromq.ZMQ.Context
getContext()
static JeroMqManager
getJeroMqManager(String name, long affinity, long backlog, boolean delayAttachOnConnect, byte[] identity, boolean ipv4Only, long linger, long maxMsgSize, long rcvHwm, long receiveBufferSize, int receiveTimeOut, long reconnectIVL, long reconnectIVLMax, long sendBufferSize, int sendTimeOut, long sndHwm, int tcpKeepAlive, long tcpKeepAliveCount, long tcpKeepAliveIdle, long tcpKeepAliveInterval, boolean xpubVerbose, List<String> endpoints)
protected boolean
releaseSub(long timeout, TimeUnit timeUnit)
May be overridden by managers to perform processing while the manager is being released and the lock is held.boolean
send(byte[] data)
-
Methods inherited from class org.apache.logging.log4j.core.appender.AbstractManager
close, getContentFormat, getCount, getLoggerContext, getManager, getName, hasManager, log, logDebug, logError, logWarn, narrow, release, stop, updateData
-
-
-
-
Field Detail
-
SYS_PROPERTY_ENABLE_SHUTDOWN_HOOK
public static final String SYS_PROPERTY_ENABLE_SHUTDOWN_HOOK
System property to enable shutdown hook.- See Also:
- Constant Field Values
-
SYS_PROPERTY_IO_THREADS
public static final String SYS_PROPERTY_IO_THREADS
System property to control JeroMQ I/O thread count.- See Also:
- Constant Field Values
-
-
Method Detail
-
send
public boolean send(byte[] data)
-
releaseSub
protected boolean releaseSub(long timeout, TimeUnit timeUnit)
Description copied from class:AbstractManager
May be overridden by managers to perform processing while the manager is being released and the lock is held. A timeout is passed for implementors to use as they see fit.- Overrides:
releaseSub
in classAbstractManager
- Parameters:
timeout
- timeouttimeUnit
- timeout time unit- Returns:
- true if all resources were closed normally, false otherwise.
-
getJeroMqManager
public static JeroMqManager getJeroMqManager(String name, long affinity, long backlog, boolean delayAttachOnConnect, byte[] identity, boolean ipv4Only, long linger, long maxMsgSize, long rcvHwm, long receiveBufferSize, int receiveTimeOut, long reconnectIVL, long reconnectIVLMax, long sendBufferSize, int sendTimeOut, long sndHwm, int tcpKeepAlive, long tcpKeepAliveCount, long tcpKeepAliveIdle, long tcpKeepAliveInterval, boolean xpubVerbose, List<String> endpoints)
-
getContext
public static org.zeromq.ZMQ.Context getContext()
-
-