Package ca.uqac.lif.cep.hibernate
Class FileHibernate
- java.lang.Object
-
- ca.uqac.lif.cep.Processor
-
- ca.uqac.lif.cep.SynchronousProcessor
-
- ca.uqac.lif.cep.hibernate.Hibernate
-
- ca.uqac.lif.cep.hibernate.FileHibernate
-
- All Implemented Interfaces:
ca.uqac.lif.azrael.Printable
,ca.uqac.lif.azrael.Readable
,ca.uqac.lif.cep.Contextualizable
,ca.uqac.lif.cep.Duplicable
,ca.uqac.lif.cep.DuplicableProcessor
public class FileHibernate extends Hibernate
AHibernate
processor that saves its internal processor into a local file. The name of the file is made of a fixed path, followed by the hibernated processor's unique ID.- Author:
- Sylvain Hallé
-
-
Field Summary
Fields Modifier and Type Field Description protected ca.uqac.lif.azrael.ObjectPrinter<java.lang.String>
m_printer
The printer that is used to print to a fileprotected ca.uqac.lif.azrael.ObjectReader<java.lang.String>
m_reader
The reader that is used to read from the file-
Fields inherited from class ca.uqac.lif.cep.SynchronousProcessor
m_inputPushables, m_outputPullables, m_tempQueue
-
Fields inherited from class ca.uqac.lif.cep.Processor
m_context, m_eventTracker, m_hasBeenNotifiedOfEndOfTrace, m_inputArity, m_inputCount, m_inputPullables, m_inputQueues, m_notifiedEndOfTraceDownstream, m_outputArity, m_outputCount, m_outputPushables, m_outputQueues, MAX_PULL_RETRIES, s_versionString
-
-
Constructor Summary
Constructors Constructor Description FileHibernate(ca.uqac.lif.cep.Processor p, java.lang.String path, ca.uqac.lif.azrael.ObjectPrinter<java.lang.String> printer, ca.uqac.lif.azrael.ObjectReader<java.lang.String> reader)
Creates a new file hibernate processor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getFilename(ca.uqac.lif.cep.Processor p, java.lang.String path)
Creates a filename from a pattern expression and the processor's current context.-
Methods inherited from class ca.uqac.lif.cep.hibernate.Hibernate
compute, duplicate, getFridge, setContext, setContext
-
Methods inherited from class ca.uqac.lif.cep.SynchronousProcessor
getPullableOutput, getPushableInput, setEventTracker
-
Methods inherited from class ca.uqac.lif.cep.Processor
allNotifiedEndOfTrace, allNull, associateTo, associateToInput, associateToOutput, copyInputQueue, copyOutputQueue, duplicate, duplicateInto, equals, getAt, getContext, getContext, getEmptyQueue, getEventTracker, getId, getInputArity, getInputCount, getInputQueue, getInputType, getInputTypesFor, getLeaves, getLeaves, getOutputArity, getOutputCount, getOutputQueue, getOutputType, getPullableInput, getPullableOutput, getPushableInput, getPushableOutput, hashCode, leftShift, newContext, onEndOfTrace, or, or, print, printState, read, readState, reset, rightShift, setPullableInput, setPushableOutput, start, startAll, stop, stopAll
-
-
-
-
Constructor Detail
-
FileHibernate
public FileHibernate(ca.uqac.lif.cep.Processor p, java.lang.String path, ca.uqac.lif.azrael.ObjectPrinter<java.lang.String> printer, ca.uqac.lif.azrael.ObjectReader<java.lang.String> reader)
Creates a new file hibernate processor.- Parameters:
p
- The processor to be hibernatedpath
- The path where to save the files. Must end with a trailing slash.printer
- The printer that is used to print to a filereader
- The reader that is used to read from the file
-
-
Method Detail
-
getFilename
public static java.lang.String getFilename(ca.uqac.lif.cep.Processor p, java.lang.String path)
Creates a filename from a pattern expression and the processor's current context.The method is declared as public on purpose, so that it can be tested by external scripts.
- Parameters:
p
- The processor for which to create a filenamepath
- The path to prefix to the filename- Returns:
- The filename
-
-