gr.uoa.di.madgik.grs.store.buffer.multiplex
Class FifoDemultiplex

java.lang.Object
  extended by gr.uoa.di.madgik.grs.store.buffer.multiplex.FifoDemultiplex
All Implemented Interfaces:
IDemultiplex

public class FifoDemultiplex
extends java.lang.Object
implements IDemultiplex

Implementation of the IDemultiplex interface for the IBufferStore.MultiplexType.FIFO type of multiplexing

Author:
gpapanikos

Constructor Summary
FifoDemultiplex()
          Create a new instance
 
Method Summary
 void demultiplex()
          Perform the demultiplexing operation
 void dispose()
          Dispose all internally managed information but not the externally provided entries
 void setBufferStore(IBufferStore store)
          The IBufferStore over which the demultiplexing is performed
 void setDefinitionsList(java.util.ArrayList<RecordDefinition[]> definitionsList)
          Sets the list of RecordDefinitions in the order of the managed BufferStoreEntry list
 void setEntries(java.util.ArrayList<BufferStoreEntry> entries)
          The entries over which the implementation needs to act
 void setModificationNotify(java.lang.Object notify)
          Set the synchronization object to be used in a standard wait / notify block to be notified when a new Record has been made available from the respective IMultiplex
 void setWriter(RecordWriter<Record> writer)
          Sets the RecordWriter that will receive the restored Records
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FifoDemultiplex

public FifoDemultiplex()
Create a new instance

Method Detail

setModificationNotify

public void setModificationNotify(java.lang.Object notify)
Set the synchronization object to be used in a standard wait / notify block to be notified when a new Record has been made available from the respective IMultiplex

Specified by:
setModificationNotify in interface IDemultiplex
Parameters:
notify - the synchronization object
See Also:
IDemultiplex.setModificationNotify(java.lang.Object)

setEntries

public void setEntries(java.util.ArrayList<BufferStoreEntry> entries)
The entries over which the implementation needs to act

Specified by:
setEntries in interface IDemultiplex
Parameters:
entries - the entries to demultiplex
See Also:
IDemultiplex.setEntries(java.util.ArrayList)

setDefinitionsList

public void setDefinitionsList(java.util.ArrayList<RecordDefinition[]> definitionsList)
Sets the list of RecordDefinitions in the order of the managed BufferStoreEntry list

Specified by:
setDefinitionsList in interface IDemultiplex
Parameters:
definitionsList - the list of record definitions
See Also:
IDemultiplex.setDefinitionsList(java.util.ArrayList)

setWriter

public void setWriter(RecordWriter<Record> writer)
Sets the RecordWriter that will receive the restored Records

Specified by:
setWriter in interface IDemultiplex
Parameters:
writer - the writer to store the restored Records
See Also:
IDemultiplex.setWriter(gr.uoa.di.madgik.grs.writer.RecordWriter)

setBufferStore

public void setBufferStore(IBufferStore store)
The IBufferStore over which the demultiplexing is performed

Specified by:
setBufferStore in interface IDemultiplex
Parameters:
store - the IBufferStore over which the demultiplexing is performed
See Also:
IDemultiplex.setBufferStore(gr.uoa.di.madgik.grs.store.buffer.IBufferStore)

dispose

public void dispose()
Dispose all internally managed information but not the externally provided entries

Specified by:
dispose in interface IDemultiplex
See Also:
IDemultiplex.dispose()

demultiplex

public void demultiplex()
                 throws GRS2BufferStoreException
Perform the demultiplexing operation

Specified by:
demultiplex in interface IDemultiplex
Throws:
GRS2BufferStoreException - there was a problem during the demultiplexing procedure
See Also:
IDemultiplex.demultiplex()