com.netflix.blitz4j
Interface BlitzConfig

All Known Implementing Classes:
DefaultBlitz4jConfig

public interface BlitzConfig


Method Summary
 java.lang.String[] getAsyncAppenderImplementationNames()
          Get the list of asynchronous appender names so that they can be treated a little differently during dynamic reconfiguration.
 java.lang.String[] getAsyncAppenders()
          Get the list of asynchronous appenders.
 double getBatcherMaxDelay(java.lang.String batcherName)
          Gets the time to wait for the messages to be batcher before it is given to processor threads.
 int getBatcherMaxThreads(java.lang.String batcherName)
          Gets the maximum number of processing threads that should be run to handle the messages.
 int getBatcherMinThreads(java.lang.String batcherName)
          Gets the minimum number of processing threads that should be run to handle the messages.
 int getBatcherQueueMaxMessages(java.lang.String batcherName)
          Gets the maximum number of messages allowed in the buffer.
 int getBatcherThreadKeepAliveTime(java.lang.String batcherName)
          Gets the time to keep the processing threads alive when they are idle.
 int getBatcherWaitTimeBeforeShutdown(java.lang.String batcherName)
          Get the time to wait before the batcher flushes out all its messages in the buffer.
 int getBatchSize(java.lang.String batcherName)
          Gets the batch size of each batch for which the log processing is done.
 int getLogSummaryExpiry(java.lang.String originalAppenderName)
          Get the time in seconds that the summary that is stored will expire.
 int getLogSummarySize(java.lang.String originalAppenderName)
          Get the size of the log summary information.
 boolean shouldGenerateBlitz4jLocationInfo()
          Checks whether the blitz4j based location information is generated or not.
 boolean shouldGenerateLog4jLocationInfo()
          Checks whether the log4j based location information is generated or not.
 boolean shouldPrintLoggingErrors()
          Indicates whether blitz4j should print the errors during logging for debugging.
 boolean shouldRejectWhenAllBatcherThreadsUsed(java.lang.String batcherName)
          Checks to see if the collector threads that hands the message to the processor threads should participate in processing or not when all the threads are used up.
 boolean shouldSummarizeOverflow(java.lang.String originalAppenderName)
          Checks whether the summary information should be generated when the asynchronous buffer becomes full.
 boolean shouldUseLockFree()
          Indicates whether blitz4j should use its less contended implementation.
 boolean shouldWaitWhenBatcherQueueNotEmpty(java.lang.String batcherName)
          Checks to see whether the caller threads should block and wait if the internal buffer is full.
 

Method Detail

shouldUseLockFree

boolean shouldUseLockFree()
Indicates whether blitz4j should use its less contended implementation.

Returns:

shouldPrintLoggingErrors

boolean shouldPrintLoggingErrors()
Indicates whether blitz4j should print the errors during logging for debugging.

Returns:

getAsyncAppenders

java.lang.String[] getAsyncAppenders()
Get the list of asynchronous appenders. The configuration is specified similar to any log4j loging override (ie)log4j.logger.asyncAppenders=INFO,MYAPPENDER. The logging level in this definitions bears no specific significance and is only for completion.

Returns:

getLogSummaryExpiry

int getLogSummaryExpiry(java.lang.String originalAppenderName)
Get the time in seconds that the summary that is stored will expire.

Parameters:
originalAppenderName - - The name of the appender for which the logging is done
Returns:

getLogSummarySize

int getLogSummarySize(java.lang.String originalAppenderName)
Get the size of the log summary information.

Parameters:
originalAppenderName - - The name of the appender for which the logging is done
Returns:

shouldGenerateBlitz4jLocationInfo

boolean shouldGenerateBlitz4jLocationInfo()
Checks whether the blitz4j based location information is generated or not.

Returns:
- true, if the location information need to be generated, false otherwise.

shouldGenerateLog4jLocationInfo

boolean shouldGenerateLog4jLocationInfo()
Checks whether the log4j based location information is generated or not.

Returns:
- true, if the location information need to be generated, false otherwise.

shouldSummarizeOverflow

boolean shouldSummarizeOverflow(java.lang.String originalAppenderName)
Checks whether the summary information should be generated when the asynchronous buffer becomes full.

Parameters:
originalAppenderName - - The appender name for which the logging is done
Returns:
- true, if the information should be summarized, false otherwise

getAsyncAppenderImplementationNames

java.lang.String[] getAsyncAppenderImplementationNames()
Get the list of asynchronous appender names so that they can be treated a little differently during dynamic reconfiguration.

Returns:
- The list of asynchronous appender names

getBatcherQueueMaxMessages

int getBatcherQueueMaxMessages(java.lang.String batcherName)
Gets the maximum number of messages allowed in the buffer.

Parameters:
batcherName - - The name of the batcher
Returns:
- an integer value denoting the size of the buffer

getBatchSize

int getBatchSize(java.lang.String batcherName)
Gets the batch size of each batch for which the log processing is done.

Parameters:
batcherName - - The name of the batcher
Returns:
- an integer value denoting the size of the batch

getBatcherWaitTimeBeforeShutdown

int getBatcherWaitTimeBeforeShutdown(java.lang.String batcherName)
Get the time to wait before the batcher flushes out all its messages in the buffer.

Parameters:
batcherName - - The name of the batcher
Returns:
- time in seconds

getBatcherMaxDelay

double getBatcherMaxDelay(java.lang.String batcherName)
Gets the time to wait for the messages to be batcher before it is given to processor threads.

Parameters:
batcherName - - The name of the batcher.
Returns:
- double value in seconds

shouldWaitWhenBatcherQueueNotEmpty

boolean shouldWaitWhenBatcherQueueNotEmpty(java.lang.String batcherName)
Checks to see whether the caller threads should block and wait if the internal buffer is full.

Parameters:
batcherName - - The name of the batcher.
Returns:
- true, if the caller threads should block and wait, false otherwise.

getBatcherMinThreads

int getBatcherMinThreads(java.lang.String batcherName)
Gets the minimum number of processing threads that should be run to handle the messages.

Parameters:
batcherName - - The name of the batcher.
Returns:
- an integer value indicating the minimum number of threads to be run

getBatcherMaxThreads

int getBatcherMaxThreads(java.lang.String batcherName)
Gets the maximum number of processing threads that should be run to handle the messages.

Parameters:
batcherName - - The name of the batcher
Returns:
- an integer value indicating the maximum number of threads to be run

getBatcherThreadKeepAliveTime

int getBatcherThreadKeepAliveTime(java.lang.String batcherName)
Gets the time to keep the processing threads alive when they are idle.

Parameters:
batcherName - - The name of the batcher
Returns:
- time in seconds

shouldRejectWhenAllBatcherThreadsUsed

boolean shouldRejectWhenAllBatcherThreadsUsed(java.lang.String batcherName)
Checks to see if the collector threads that hands the message to the processor threads should participate in processing or not when all the threads are used up.

Parameters:
batcherName - - The name of the batcher
Returns:
- true if the collector threads participates in processing, false if the processing is rejected. If the processing is rejected, it is retried indefinitely.