Top Description Fields Constructors Methods
ch.qos.logback.core.read

public Class CyclicBufferAppender<E>

extends AppenderBase<E>
Class Inheritance
Imports
ch.qos.logback.core.AppenderBase, ch.qos.logback.core.helpers.CyclicBuffer

CyclicBufferAppender stores events in a cyclic buffer of user-specified size. As the name suggests, if the size of the buffer is N, only the latest N events are available.
Author
Ceki Gulcu

Field Summary

Modifier and TypeField and Description
pack-priv CyclicBuffer<E>
pack-priv int
Inherited from ch.qos.logback.core.AppenderBase:
namestarted

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
append(E eventObject)

Implements abstract ch.qos.logback.core.AppenderBase.append.

public E
get(int i)

public int
public int
getMaxSize()

Set the size of the cyclic buffer.

public void
public void
setMaxSize(int maxSize)

public void
public void
Inherited from ch.qos.logback.core.AppenderBase:
addFilterclearAllFiltersdoAppendgetCopyOfAttachedFiltersListgetFilterChainDecisiongetNameisStartedsetNametoString

Field Detail

cbback to summary
pack-priv CyclicBuffer<E> cb
maxSizeback to summary
pack-priv int maxSize

Constructor Detail

CyclicBufferAppenderback to summary
public CyclicBufferAppender()

Method Detail

appendback to summary
protected void append(E eventObject)

Implements abstract ch.qos.logback.core.AppenderBase.append.

Annotations
@Override
getback to summary
public E get(int i)
getLengthback to summary
public int getLength()
getMaxSizeback to summary
public int getMaxSize()

Set the size of the cyclic buffer.

resetback to summary
public void reset()
setMaxSizeback to summary
public void setMaxSize(int maxSize)
startback to summary
public void start()

Overrides ch.qos.logback.core.AppenderBase.start.

Implements ch.qos.logback.core.spi.LifeCycle.start.

stopback to summary
public void stop()

Overrides ch.qos.logback.core.AppenderBase.stop.

Implements ch.qos.logback.core.spi.LifeCycle.stop.