Package ch.qos.logback.core.helpers
Class CyclicBuffer<E>
java.lang.Object
ch.qos.logback.core.helpers.CyclicBuffer<E>
Deprecated.
This internal logback API is not supported by AEM as a Cloud Service.
CyclicBuffer holds values in a cyclic array.
It allows read access to any element in the buffer not just the first or last element.
-
Constructor Summary
ConstructorsConstructorDescriptionCyclicBuffer(int maxSize) Deprecated.Instantiate a new CyclicBuffer of at mostmaxSizeevents.CyclicBuffer(CyclicBuffer<E> other) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.Add aneventas the last event in the buffer.asList()Deprecated.voidclear()Deprecated.Clears the buffer and resets all attributes.get()Deprecated.Get the oldest (first) element in the buffer.get(int i) Deprecated.Get the ith oldest event currently in the buffer.intDeprecated.intlength()Deprecated.Get the number of elements in the buffer.voidresize(int newSize) Deprecated.Resize the cyclic buffer tonewSize.
-
Constructor Details
-
CyclicBuffer
Deprecated.Instantiate a new CyclicBuffer of at mostmaxSizeevents. ThemaxSizeargument must a positive integer.- Parameters:
maxSize- The maximum number of elements in the buffer.- Throws:
IllegalArgumentException
-
CyclicBuffer
Deprecated.
-
-
Method Details
-
clear
public void clear()Deprecated.Clears the buffer and resets all attributes. -
add
Deprecated.Add aneventas the last event in the buffer. -
get
Deprecated.Get the ith oldest event currently in the buffer. If i is outside the range 0 to the number of elements currently in the buffer, thennullis returned. -
getMaxSize
public int getMaxSize()Deprecated. -
get
Deprecated.Get the oldest (first) element in the buffer. The oldest element is removed from the buffer. -
asList
Deprecated. -
length
public int length()Deprecated.Get the number of elements in the buffer. This number is guaranteed to be in the range 0 tomaxSize(inclusive). -
resize
public void resize(int newSize) Deprecated.Resize the cyclic buffer tonewSize.- Throws:
IllegalArgumentException- ifnewSizeis negative.
-