org.apache.logging.log4j.flume.appender
Class FlumeAvroManager

java.lang.Object
  extended by org.apache.logging.log4j.core.appender.AbstractManager
      extended by org.apache.logging.log4j.flume.appender.AbstractFlumeManager
          extended by org.apache.logging.log4j.flume.appender.FlumeAvroManager

public class FlumeAvroManager
extends AbstractFlumeManager

Manager for FlumeAvroAppenders.


Field Summary
static int DEFAULT_RECONNECTION_DELAY
          The default reconnection delay (500 milliseconds or .5 seconds).
 
Fields inherited from class org.apache.logging.log4j.core.appender.AbstractManager
count, LOGGER
 
Constructor Summary
protected FlumeAvroManager(String name, String shortName, Agent[] agents, int batchSize)
          Constructor
 
Method Summary
 Agent[] getAgents()
          Returns the agents.
 int getCurrent()
          Returns the index of the current agent.
static FlumeAvroManager getManager(String name, Agent[] agents, int batchSize)
          Returns a FlumeAvroManager.
protected  void releaseSub()
           
 void send(FlumeEvent event, int delay, int retries)
           
 
Methods inherited from class org.apache.logging.log4j.core.appender.AbstractManager
getCount, getManager, getName, hasManager, release
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_RECONNECTION_DELAY

public static final int DEFAULT_RECONNECTION_DELAY
The default reconnection delay (500 milliseconds or .5 seconds).

See Also:
Constant Field Values
Constructor Detail

FlumeAvroManager

protected FlumeAvroManager(String name,
                           String shortName,
                           Agent[] agents,
                           int batchSize)
Constructor

Parameters:
name - The unique name of this manager.
agents - An array of Agents.
batchSize - The number of evetns to include in a batch.
Method Detail

getManager

public static FlumeAvroManager getManager(String name,
                                          Agent[] agents,
                                          int batchSize)
Returns a FlumeAvroManager.

Parameters:
name - The name of the manager.
agents - The agents to use.
batchSize - The number of events to include in a batch.
Returns:
A FlumeAvroManager.

getAgents

public Agent[] getAgents()
Returns the agents.

Returns:
The agent array.

getCurrent

public int getCurrent()
Returns the index of the current agent.

Returns:
The index for the current agent.

send

public void send(FlumeEvent event,
                 int delay,
                 int retries)
Specified by:
send in class AbstractFlumeManager

releaseSub

protected void releaseSub()
Overrides:
releaseSub in class org.apache.logging.log4j.core.appender.AbstractManager


Copyright © 1999-2013 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.