mgi.logme.worker
Class NodeStatus

java.lang.Object
  extended bymgi.logme.worker.NodeStatus
All Implemented Interfaces:
java.lang.Runnable

public class NodeStatus
extends java.lang.Object
implements java.lang.Runnable

Class to generate and use a Queue
 


Method Summary
 long getLastUpdate()
          Returns the timestamp of the last statusupdate
 java.lang.String getLastUpdateHostname()
          Returns the Hostname which was saved
 java.lang.String getLastUpdateIP()
          Returns the IP which was saved
 java.lang.String getLastUpdateStatus()
          Returns the status which was saved at the last update
static NodeStatus getNodeStatus()
          Returns a SaveQueue
 boolean getStatus()
          Status of this Node
 boolean isSleeping()
          Status of the queueline
 void run()
          Start the queue
 void setSleepTime(long ms)
          Set the Sleeptime of queueloops
 void shutdown()
          Send interrupt to the queue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getNodeStatus

public static NodeStatus getNodeStatus()
Returns a SaveQueue

Returns:
SaveQueue

shutdown

public void shutdown()
Send interrupt to the queue


setSleepTime

public void setSleepTime(long ms)
Set the Sleeptime of queueloops

Parameters:
ms - Sleeptime in Milliseconds

getLastUpdate

public long getLastUpdate()
Returns the timestamp of the last statusupdate

Returns:
TS of the last statusupdate

getLastUpdateStatus

public java.lang.String getLastUpdateStatus()
Returns the status which was saved at the last update

Returns:
last known status

getLastUpdateIP

public java.lang.String getLastUpdateIP()
Returns the IP which was saved

Returns:
last known IP

getLastUpdateHostname

public java.lang.String getLastUpdateHostname()
Returns the Hostname which was saved

Returns:
last known Hostname

isSleeping

public boolean isSleeping()
Status of the queueline

Returns:
true if there is nothing to do

getStatus

public boolean getStatus()
Status of this Node

Returns:
true if NodeStatus is runnig and will broadcast

run

public void run()
Start the queue

Specified by:
run in interface java.lang.Runnable