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.cep.Contextualizable,ca.uqac.lif.cep.Duplicable,ca.uqac.lif.cep.DuplicableProcessor
A
Hibernate 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é
-
Nested Class Summary
Nested classes/interfaces inherited from class ca.uqac.lif.cep.SynchronousProcessor
ca.uqac.lif.cep.SynchronousProcessor.InputPushable, ca.uqac.lif.cep.SynchronousProcessor.OutputPullableNested classes/interfaces inherited from class ca.uqac.lif.cep.Processor
ca.uqac.lif.cep.Processor.InternalProcessorState -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ca.uqac.lif.azrael.ObjectPrinter<String> The printer that is used to print to a fileprotected ca.uqac.lif.azrael.ObjectReader<String> The reader that is used to read from the fileFields inherited from class ca.uqac.lif.cep.SynchronousProcessor
m_inputPushables, m_outputPullables, m_tempQueueFields inherited from class ca.uqac.lif.cep.Processor
m_context, m_hasBeenNotifiedOfEndOfTrace, m_inputArity, m_inputPullables, m_inputQueues, m_notifiedEndOfTraceDownstream, m_outputArity, m_outputPushables, m_outputQueues, MAX_PULL_RETRIES, s_versionString -
Constructor Summary
ConstructorsConstructorDescriptionFileHibernate(ca.uqac.lif.cep.Processor p, String path, ca.uqac.lif.azrael.ObjectPrinter<String> printer, ca.uqac.lif.azrael.ObjectReader<String> reader) Creates a new file hibernate processor. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetFilename(ca.uqac.lif.cep.Processor p, 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, setContextMethods inherited from class ca.uqac.lif.cep.SynchronousProcessor
getPullableOutput, getPushableInputMethods inherited from class ca.uqac.lif.cep.Processor
allNotifiedEndOfTrace, allNull, copyInputQueue, copyOutputQueue, duplicate, duplicateInto, equals, getAt, getContext, getContext, getEmptyQueue, getId, getInputArity, getInputQueue, getInputType, getInputTypesFor, getOutputArity, getOutputQueue, getOutputType, getPullableInput, getPullableOutput, getPushableInput, getPushableOutput, hashCode, leftShift, newContext, onEndOfTrace, or, or, or, printState, readState, reset, rightShift, setPullableInput, setPushableOutput, start, startAll, stop, stopAll
-
Field Details
-
m_printer
The printer that is used to print to a file -
m_reader
The reader that is used to read from the file
-
-
Constructor Details
-
FileHibernate
public FileHibernate(ca.uqac.lif.cep.Processor p, String path, ca.uqac.lif.azrael.ObjectPrinter<String> printer, ca.uqac.lif.azrael.ObjectReader<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 Details
-
getFilename
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
-