Class RAFCircularBuffer<T extends java.io.Serializable>
- java.lang.Object
- 
- com.inductiveautomation.ignition.common.util.RAFCircularBuffer<T>
 
- 
 public class RAFCircularBuffer<T extends java.io.Serializable> extends java.lang.ObjectA persistent circular buffer system that uses aRandomAccessFileas the backing store.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static interfaceRAFCircularBuffer.Filter<K>
 - 
Constructor SummaryConstructors Constructor Description RAFCircularBuffer(java.io.File file, int sizeInKB, boolean gzip)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.Iterator<T>_backwardIter()Deprecated.java.util.Iterator<T>_forwardIter()Deprecated.voidclose()protected TdeserializeObject(java.io.InputStream stream)voidexportBuffer(java.io.OutputStream outputStream)longgetFileSize()java.util.List<T>iterateBackward(RAFCircularBuffer.Filter<? super T> filter)java.util.List<T>iterateForward(RAFCircularBuffer.Filter<T> filter)static voidmain(java.lang.String[] args)voidreset()protected voidserializeObject(T object, java.io.OutputStream stream)Gives subclasses the chance to affect how data is written.voidwrite(T object)
 
- 
- 
- 
Constructor Detail- 
RAFCircularBufferpublic RAFCircularBuffer(java.io.File file, int sizeInKB, boolean gzip) throws java.io.IOException- Parameters:
- file- The file to use as the buffer
- sizeInKB- must be at least 1
- gzip- A flag for whether or not new records should be stored with Gzip compression
- Throws:
- java.io.IOException
 
 
- 
 - 
Method Detail- 
resetpublic void reset() 
 - 
getFileSizepublic long getFileSize() throws java.io.IOException- Throws:
- java.io.IOException
 
 - 
exportBufferpublic void exportBuffer(java.io.OutputStream outputStream) throws java.io.IOException- Throws:
- java.io.IOException
 
 - 
serializeObjectprotected void serializeObject(T object, java.io.OutputStream stream) throws java.io.IOException 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:
- java.io.IOException
 
 - 
deserializeObjectprotected T deserializeObject(java.io.InputStream stream) throws java.io.IOException, java.lang.ClassNotFoundException - Throws:
- java.io.IOException
- java.lang.ClassNotFoundException
 
 - 
writepublic void write(T object) throws java.io.IOException - Throws:
- java.io.IOException
 
 - 
closepublic void close() throws java.io.IOException- Throws:
- java.io.IOException
 
 - 
iterateForwardpublic java.util.List<T> iterateForward(RAFCircularBuffer.Filter<T> filter) 
 - 
iterateBackwardpublic java.util.List<T> iterateBackward(RAFCircularBuffer.Filter<? super T> filter) 
 - 
_forwardIter@Deprecated public java.util.Iterator<T> _forwardIter() Deprecated.Do not use directly, not thread safe. Used for junit testing
 - 
_backwardIter@Deprecated public java.util.Iterator<T> _backwardIter() Deprecated.Do not use directly, not thread safe. Used for junit testing
 - 
mainpublic static void main(java.lang.String[] args) 
 
- 
 
-