Class KafkaManager
- java.lang.Object
-
- org.apache.logging.log4j.core.appender.AbstractManager
-
- org.apache.logging.log4j.core.appender.mom.kafka.KafkaManager
-
- All Implemented Interfaces:
AutoCloseable
public class KafkaManager extends AbstractManager
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.logging.log4j.core.appender.AbstractManager
AbstractManager.AbstractFactoryData
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_TIMEOUT_MILLIS
-
Fields inherited from class org.apache.logging.log4j.core.appender.AbstractManager
count, LOGGER
-
-
Constructor Summary
Constructors Constructor Description KafkaManager(LoggerContext loggerContext, String name, String topic, boolean syncSend, Property[] properties, String key)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static KafkaManager
getManager(LoggerContext loggerContext, String name, String topic, boolean syncSend, Property[] properties, String key)
Deprecated.String
getTopic()
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.void
send(byte[] msg)
Deprecated.void
send(byte[] msg, Long eventTimestamp)
void
startup()
-
Methods inherited from class org.apache.logging.log4j.core.appender.AbstractManager
close, getContentFormat, getCount, getLoggerContext, getManager, getName, getStrSubstitutor, hasManager, log, logDebug, logError, logger, logWarn, narrow, release, stop, updateData
-
-
-
-
Field Detail
-
DEFAULT_TIMEOUT_MILLIS
public static final String DEFAULT_TIMEOUT_MILLIS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
KafkaManager
public KafkaManager(LoggerContext loggerContext, String name, String topic, boolean syncSend, Property[] properties, String key)
-
-
Method Detail
-
releaseSub
public 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.
-
send
@Deprecated public void send(byte[] msg) throws ExecutionException, InterruptedException, TimeoutException
Deprecated.
-
send
public void send(byte[] msg, Long eventTimestamp) throws ExecutionException, InterruptedException, TimeoutException
-
startup
public void startup()
-
getTopic
public String getTopic()
-
getManager
@Deprecated public static KafkaManager getManager(LoggerContext loggerContext, String name, String topic, boolean syncSend, Property[] properties, String key)
Deprecated.
-
-