@Internal public class EmptyBufferStorage extends Object implements BufferStorage
BufferStorage
. It doesn't allow for adding any data.Constructor and Description |
---|
EmptyBufferStorage() |
Modifier and Type | Method and Description |
---|---|
void |
add(BufferOrEvent boe)
Adds a buffer or event to the
BufferStorage . |
void |
close()
Cleans up all the resources in the current sequence.
|
long |
getMaxBufferedBytes() |
long |
getPendingBytes() |
long |
getRolledBytes() |
boolean |
isEmpty() |
boolean |
isFull() |
Optional<BufferOrEvent> |
pollNext() |
void |
rollOver()
Start returning next sequence of stored
BufferOrEvent s. |
public void add(BufferOrEvent boe)
BufferStorage
BufferStorage
.add
in interface BufferStorage
boe
- The buffer or event to be added into the blocker.public boolean isFull()
isFull
in interface BufferStorage
public void rollOver()
BufferStorage
BufferOrEvent
s.rollOver
in interface BufferStorage
public long getPendingBytes()
getPendingBytes
in interface BufferStorage
public long getRolledBytes()
getRolledBytes
in interface BufferStorage
public boolean isEmpty()
isEmpty
in interface BufferStorage
BufferStorage
doesn't store and data.public Optional<BufferOrEvent> pollNext()
pollNext
in interface BufferStorage
public long getMaxBufferedBytes()
getMaxBufferedBytes
in interface BufferStorage
public void close()
BufferStorage
close
in interface AutoCloseable
close
in interface BufferStorage
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.