gr.uoa.di.madgik.grs.store.buffer.multiplex
Interface IDemultiplex

All Known Implementing Classes:
FifoDemultiplex, FirstAvailableDemultiplex

public interface IDemultiplex

Interfaces implemented by classes that are able to demultiplex a number of stored locator data based on a specific order or algorithm. The demultiplexing type they perform is one of the ones defined in IBufferStore.MultiplexType. Implementations of this class must define a default no argument constructor

Author:
gpapanikos

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
 

Method Detail

setModificationNotify

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

Parameters:
notify - the synchronization object

setEntries

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

Parameters:
entries - the entries to demultiplex

setDefinitionsList

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

Parameters:
definitionsList - the list of record definitions

setWriter

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

Parameters:
writer - the writer to store the restored Records

setBufferStore

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

Parameters:
store - the IBufferStore over which the demultiplexing is performed

dispose

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


demultiplex

void demultiplex()
                 throws GRS2BufferStoreException
Perform the demultiplexing operation

Throws:
GRS2BufferStoreException - there was a problem during the demultiplexing procedure