Package com.zendesk.maxwell.util
Class ListWithDiskBuffer<T>
- java.lang.Object
-
- com.zendesk.maxwell.util.ListWithDiskBuffer<T>
-
- Direct Known Subclasses:
RowMapBuffer
public class ListWithDiskBuffer<T> extends Object
-
-
Constructor Summary
Constructors Constructor Description ListWithDiskBuffer(long maxInMemoryElements)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(T element)
protected T
evict()
protected void
finalize()
void
flushToDisk()
T
getLast()
Long
inMemorySize()
boolean
isEmpty()
T
removeFirst(Class<T> clazz)
protected void
resetOutputStreamCaches()
protected boolean
shouldBuffer()
Long
size()
-
-
-
Method Detail
-
add
public void add(T element) throws IOException
- Throws:
IOException
-
shouldBuffer
protected boolean shouldBuffer()
-
resetOutputStreamCaches
protected void resetOutputStreamCaches() throws IOException
- Throws:
IOException
-
flushToDisk
public void flushToDisk() throws IOException
- Throws:
IOException
-
isEmpty
public boolean isEmpty()
-
getLast
public T getLast()
-
removeFirst
public T removeFirst(Class<T> clazz) throws IOException, ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
-
size
public Long size()
-
inMemorySize
public Long inMemorySize()
-
finalize
protected void finalize() throws Throwable
-
evict
protected T evict() throws IOException
- Throws:
IOException
-
-