eu.xtreemos.xosd.utilities.logger.filters
Class BlockingTokenFilter

java.lang.Object
  extended by eu.xtreemos.xosd.utilities.logger.filters.NonBlockingTokenFilter
      extended by eu.xtreemos.xosd.utilities.logger.filters.BlockingTokenFilter
All Implemented Interfaces:
ITokenFilter
Direct Known Subclasses:
TimeMachine

public abstract class BlockingTokenFilter
extends NonBlockingTokenFilter


Field Summary
protected  boolean isFinished
           
 
Fields inherited from class eu.xtreemos.xosd.utilities.logger.filters.NonBlockingTokenFilter
scatter, tokens
 
Constructor Summary
BlockingTokenFilter()
           
 
Method Summary
 void add(IToken token)
          processes the token and stores it in its proper place in the pipelane
protected abstract  void insert(IToken token)
          must implement sorting algorithm if needed, otherwise just call super.insert(token)
 void markLastToken()
          marks the flag, that the last token has been sent to the filter. this matters if the filter is a blocking filter, which needs all tokens before proceeding (blocking filters can be used for sorting elements).
 IToken topToken()
          Returns first elemen of the pipe, but only if there are no filters registered to use them. this function works only for final filters.
 
Methods inherited from class eu.xtreemos.xosd.utilities.logger.filters.NonBlockingTokenFilter
checkToken, clearPipe, filters, isFinal, numTokens
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isFinished

protected boolean isFinished
Constructor Detail

BlockingTokenFilter

public BlockingTokenFilter()
Method Detail

insert

protected abstract void insert(IToken token)
must implement sorting algorithm if needed, otherwise just call super.insert(token)

Overrides:
insert in class NonBlockingTokenFilter

add

public void add(IToken token)
Description copied from interface: ITokenFilter
processes the token and stores it in its proper place in the pipelane

Specified by:
add in interface ITokenFilter
Overrides:
add in class NonBlockingTokenFilter

markLastToken

public void markLastToken()
Description copied from interface: ITokenFilter
marks the flag, that the last token has been sent to the filter. this matters if the filter is a blocking filter, which needs all tokens before proceeding (blocking filters can be used for sorting elements).

Specified by:
markLastToken in interface ITokenFilter
Overrides:
markLastToken in class NonBlockingTokenFilter

topToken

public IToken topToken()
Description copied from interface: ITokenFilter
Returns first elemen of the pipe, but only if there are no filters registered to use them. this function works only for final filters.

Specified by:
topToken in interface ITokenFilter
Overrides:
topToken in class NonBlockingTokenFilter
Returns:
remove the first element from the pipe and return it