@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) throws IOException
BufferStorage
BufferStorage
.add
in interface BufferStorage
boe
- The buffer or event to be added into the blocker.IOException
public boolean isFull()
isFull
in interface BufferStorage
public void rollOver() throws IOException
BufferStorage
BufferOrEvent
s.rollOver
in interface BufferStorage
IOException
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() throws IOException
pollNext
in interface BufferStorage
IOException
public long getMaxBufferedBytes()
getMaxBufferedBytes
in interface BufferStorage
public void close() throws IOException
BufferStorage
close
in interface AutoCloseable
close
in interface BufferStorage
IOException
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.