Top Fields Constructors Methods
com.github.benmanes.caffeine.cache

pack-priv final Enum DisabledBuffer

Located in compilation unit of com.github.benmanes.caffeine.cache.Buffer.

extends Enum<DisabledBuffer>
implements Buffer<Object>
Class Inheritance
All Implemented Interfaces
com.github.benmanes.caffeine.cache.Buffer

Field Summary

Modifier and TypeField and Description
public static final DisabledBuffer

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
drainTo(Consumer<Object>
the action to perform on each element
consumer
)

Implements com.github.benmanes.caffeine.cache.Buffer.drainTo.

Drains the buffer, sending each element to the consumer for processing.
public int
offer(Object
the element to add
e
)

Implements com.github.benmanes.caffeine.cache.Buffer.offer.

Inserts the specified element into this buffer if it is possible to do so immediately without violating capacity restrictions.
public long
reads()

Implements com.github.benmanes.caffeine.cache.Buffer.reads.

Returns the number of elements that have been read from the buffer.
public long
size()

Overrides default com.github.benmanes.caffeine.cache.Buffer.size.

Returns the number of elements residing in the buffer.
public static DisabledBuffer
public static DisabledBuffer[]
public long
writes()

Implements com.github.benmanes.caffeine.cache.Buffer.writes.

Returns the number of elements that have been written to the buffer.
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

INSTANCEback to summary
public static final DisabledBuffer INSTANCE

Constructor Detail

DisabledBufferback to summary
private DisabledBuffer()

Method Detail

drainToback to summary
public void drainTo(Consumer<Object> consumer)

Implements com.github.benmanes.caffeine.cache.Buffer.drainTo.

Doc from com.github.benmanes.caffeine.cache.Buffer.drainTo.

Drains the buffer, sending each element to the consumer for processing. The caller must ensure that a consumer has exclusive read access to the buffer.

Parameters
consumer:Consumer<Object>

the action to perform on each element

Annotations
@Override
offerback to summary
public int offer(Object e)

Implements com.github.benmanes.caffeine.cache.Buffer.offer.

Doc from com.github.benmanes.caffeine.cache.Buffer.offer.

Inserts the specified element into this buffer if it is possible to do so immediately without violating capacity restrictions. The addition is allowed to fail spuriously if multiple threads insert concurrently.

Parameters
e:Object

the element to add

Returns:int

Buffer.SUCCESS, Buffer.FAILED, or Buffer.FULL

Annotations
@Override
readsback to summary
public long reads()

Implements com.github.benmanes.caffeine.cache.Buffer.reads.

Doc from com.github.benmanes.caffeine.cache.Buffer.reads.

Returns the number of elements that have been read from the buffer.

Returns:long

the number of elements read from this buffer

Annotations
@Override
sizeback to summary
public long size()

Overrides default com.github.benmanes.caffeine.cache.Buffer.size.

Doc from com.github.benmanes.caffeine.cache.Buffer.size.

Returns the number of elements residing in the buffer.

Returns:long

the number of elements in this buffer

Annotations
@Override
valueOfback to summary
public static DisabledBuffer valueOf(String name)
valuesback to summary
public static DisabledBuffer[] values()
writesback to summary
public long writes()

Implements com.github.benmanes.caffeine.cache.Buffer.writes.

Doc from com.github.benmanes.caffeine.cache.Buffer.writes.

Returns the number of elements that have been written to the buffer.

Returns:long

the number of elements written to this buffer

Annotations
@Override