Class RAFCircularBuffer<T extends Serializable>
java.lang.Object
com.inductiveautomation.ignition.common.util.RAFCircularBuffer<T>
A persistent circular buffer system that uses a
RandomAccessFile
as the backing store.-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Deprecated.void
close()
protected T
deserializeObject
(InputStream stream) void
exportBuffer
(OutputStream outputStream) long
iterateBackward
(RAFCircularBuffer.Filter<? super T> filter) iterateForward
(RAFCircularBuffer.Filter<T> filter) static void
void
reset()
protected void
serializeObject
(T object, OutputStream stream) Gives subclasses the chance to affect how data is written.void
-
Constructor Details
-
RAFCircularBuffer
- Parameters:
file
- The file to use as the buffersizeInKB
- must be at least 1gzip
- A flag for whether or not new records should be stored with Gzip compression- Throws:
IOException
-
-
Method Details
-
reset
public void reset() -
getFileSize
- Throws:
IOException
-
exportBuffer
- Throws:
IOException
-
serializeObject
Gives subclasses the chance to affect how data is written. The provided stream will already be a GZIPOuputStream, if appropriate, and should not be closed in this function.- Throws:
IOException
-
deserializeObject
- Throws:
IOException
ClassNotFoundException
-
write
- Throws:
IOException
-
close
- Throws:
IOException
-
iterateForward
-
iterateBackward
-
_forwardIter
Deprecated.Do not use directly, not thread safe. Used for junit testing -
_backwardIter
Deprecated.Do not use directly, not thread safe. Used for junit testing -
main
-