gr.uoa.di.madgik.searchlibrary.operatorlibrary.join
Class ScanElement

java.lang.Object
  extended by gr.uoa.di.madgik.searchlibrary.operatorlibrary.join.ScanElement

public class ScanElement
extends Object

Placeholder for input org.gcube.searchservice.searchlibrary.resultset.ResultSet file buffer and join related structs

Author:
UoA

Constructor Summary
ScanElement(gr.uoa.di.madgik.grs.reader.RandomReader<gr.uoa.di.madgik.grs.record.Record> reader, String keyFieldName, BlockingQueue<JoinElement> queue, Queue<EventEntry> events, EventHandler eventHandler, long timeout, TimeUnit timeUnit, Object synchThis, short inputID, BooleanHolder stopNotifier)
          Create a new ScanElement
 
Method Summary
 long getCounter()
          Retrieves the counter for this ScanElement
 EventHandler getEventHandler()
          Retrieves the event handler used to propagate events
 Queue<EventEntry> getEventQueue()
          Retrieves the queue used to place events
 short getInputID()
          Retrieves the input id of this ScanElement
 String getKey()
          Retrieves the key
 BlockingQueue<JoinElement> getQueue()
          Retrieves the queue used to place records
 gr.uoa.di.madgik.grs.reader.RandomReader<gr.uoa.di.madgik.grs.record.Record> getReader()
          Retrieves the RandomReader
 BooleanHolder getStopNotifier()
          Retrieves the synch object used to notify this reader of consumption halt
 Object getSynchThis()
          Retrieves the object used to synchronize queue access
 long getTimeout()
          Retrieves the timeout used by the reader
 TimeUnit getTimeUnit()
          Retrieves the time unit of the timeout used by the reader
 boolean hasFinished()
          Checks if the current ScanElement has finished authoring
 boolean isActive()
          Checks if the current ScanElement is active
 void setActive(boolean active)
          Sets if the current ScanElement is active
 void setCounter(long counter)
          Sets the counter of this ScanElement
 void setEventHandler(EventHandler eventHandler)
          Sets the event handler used to propagate events
 void setEventQueue(Queue<EventEntry> events)
          Sets the queue used to place events
 void setFinished(boolean finished)
          Sets if the current ScanElement has finished authoring
 void setInputID(short inputID)
          Sets the input id of this ScanElement
 void setKey(String keyFieldName)
          Sets the key
 void setQueue(BlockingQueue<JoinElement> queue)
          Sets the queue used to place records
 void setReader(gr.uoa.di.madgik.grs.reader.RandomReader<gr.uoa.di.madgik.grs.record.Record> reader)
          Sets the RandomReader
 void setSynchThis(Object synchThis)
          Sets the object used to synchronize queue access
 void setTimeout(long timeout)
          Sets the timeout used by the reader
 void setTimeUnit(TimeUnit timeUnit)
          Sets the time unit of the timeout used by the reader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScanElement

public ScanElement(gr.uoa.di.madgik.grs.reader.RandomReader<gr.uoa.di.madgik.grs.record.Record> reader,
                   String keyFieldName,
                   BlockingQueue<JoinElement> queue,
                   Queue<EventEntry> events,
                   EventHandler eventHandler,
                   long timeout,
                   TimeUnit timeUnit,
                   Object synchThis,
                   short inputID,
                   BooleanHolder stopNotifier)
Create a new ScanElement

Parameters:
reader - Reader of the input
keyFieldName - The name of the Field containing the key based on which the join is performed
queue - The queue to place extacted records
events - The queue used to propagate events
eventHandler - The event handler which is used to propagate events
timeout - The timeout that will be used by the RandomReader
timeUnit - The time unit of the timeout that will be used
fileBuf - The file buffer to use
synchThis - Used for queue synchronization
inputID - Used to separate the various ScanElement instances
Method Detail

getCounter

public long getCounter()
Retrieves the counter for this ScanElement

Returns:
The counter

setCounter

public void setCounter(long counter)
Sets the counter of this ScanElement

Parameters:
counter - The counter

getInputID

public short getInputID()
Retrieves the input id of this ScanElement

Returns:
The input ID

setInputID

public void setInputID(short inputID)
Sets the input id of this ScanElement

Parameters:
inputID - The input id

isActive

public boolean isActive()
Checks if the current ScanElement is active

Returns:
true if it is, false otherwise

setActive

public void setActive(boolean active)
Sets if the current ScanElement is active

Parameters:
active - true if it is, false otherwise

hasFinished

public boolean hasFinished()
Checks if the current ScanElement has finished authoring


setFinished

public void setFinished(boolean finished)
Sets if the current ScanElement has finished authoring

Parameters:
finished - true if is has, false otherwise

getReader

public gr.uoa.di.madgik.grs.reader.RandomReader<gr.uoa.di.madgik.grs.record.Record> getReader()
Retrieves the RandomReader

Returns:
The reader

setReader

public void setReader(gr.uoa.di.madgik.grs.reader.RandomReader<gr.uoa.di.madgik.grs.record.Record> reader)
Sets the RandomReader

Parameters:
reader - The reader

getKey

public String getKey()
Retrieves the key

Returns:
The key

setKey

public void setKey(String keyFieldName)
Sets the key

Parameters:
keyFieldName - The name of the Field containing the key

getQueue

public BlockingQueue<JoinElement> getQueue()
Retrieves the queue used to place records

Returns:
The queue

setQueue

public void setQueue(BlockingQueue<JoinElement> queue)
Sets the queue used to place records

Parameters:
queue - The queue

getEventQueue

public Queue<EventEntry> getEventQueue()
Retrieves the queue used to place events

Returns:
The event queue

setEventQueue

public void setEventQueue(Queue<EventEntry> events)
Sets the queue used to place events

Parameters:
events - The queue

getSynchThis

public Object getSynchThis()
Retrieves the object used to synchronize queue access

Returns:
The object to use

getEventHandler

public EventHandler getEventHandler()
Retrieves the event handler used to propagate events

Returns:
the event handler

setEventHandler

public void setEventHandler(EventHandler eventHandler)
Sets the event handler used to propagate events

Parameters:
eventHandler - The event handler

setSynchThis

public void setSynchThis(Object synchThis)
Sets the object used to synchronize queue access

Parameters:
synchThis - The object to use

getStopNotifier

public BooleanHolder getStopNotifier()
Retrieves the synch object used to notify this reader of consumption halt

Returns:
The stop synch object

getTimeout

public long getTimeout()
Retrieves the timeout used by the reader

Returns:
the timeout

setTimeout

public void setTimeout(long timeout)
Sets the timeout used by the reader

Parameters:
timeout - the timeout

getTimeUnit

public TimeUnit getTimeUnit()
Retrieves the time unit of the timeout used by the reader

Returns:
the time unit of the timeout

setTimeUnit

public void setTimeUnit(TimeUnit timeUnit)
Sets the time unit of the timeout used by the reader

Parameters:
timeUnit - the unit of the timeout


Copyright © 2013. All Rights Reserved.