orca.shirako.kernel.interfaces
Interface ITicker

All Known Implementing Classes:
ConcurrentTick, SynchronousTick

public interface ITicker

Author:
aydan

Method Summary
 void addTickable(ITick tickable)
           
 void clear()
          Stops the ticker and unregisters all registered items.
 long getBeginnigOfTime()
          Returns the cycle offset.
 long getCurrentCycle()
          Returns the current time
 long getCycleMillis()
          Returns the cyle length.
 void initialize()
           
 boolean isManual()
           
 void removeTickable(ITick tickable)
           
 void setBeginningOfTime(long value)
          Sets the cycle offset.
 void setCurrentCycle(long cycle)
          Sets the current cycle.
 void setCycleMillis(long cycleMillis)
          Sets the cycle length.
 void setLogger(LoggingTool logger)
          Attaches the logger.
 void setManual(boolean value)
           
 void startThread()
           
 void stop()
           
 void tick()
           
 

Method Detail

initialize

void initialize()
                throws java.lang.Exception
Throws:
java.lang.Exception

tick

void tick()

startThread

void startThread()

addTickable

void addTickable(ITick tickable)

removeTickable

void removeTickable(ITick tickable)

stop

void stop()
          throws java.lang.Exception
Throws:
java.lang.Exception

clear

void clear()
           throws java.lang.Exception
Stops the ticker and unregisters all registered items.

Throws:
java.lang.Exception

getCurrentCycle

long getCurrentCycle()
Returns the current time

Returns:

setLogger

void setLogger(LoggingTool logger)
Attaches the logger.

Parameters:
logger - logger to use

setBeginningOfTime

void setBeginningOfTime(long value)
Sets the cycle offset.

Parameters:
value - cycle offset in milliseconds

getBeginnigOfTime

long getBeginnigOfTime()
Returns the cycle offset.

Returns:
cycle offset in milliseconds

getCycleMillis

long getCycleMillis()
Returns the cyle length.

Returns:
cycle length in milliseconds

setCycleMillis

void setCycleMillis(long cycleMillis)
Sets the cycle length.

Parameters:
cycleMillis - cycle length in milliseconds

setCurrentCycle

void setCurrentCycle(long cycle)
Sets the current cycle. The first cycle to be generated by the ticket is cycle+1.

Parameters:
cycle - current cycle

isManual

boolean isManual()

setManual

void setManual(boolean value)


Copyright © 2007 Network/Internet Computing Lab. All Rights Reserved.