infoservice
Class InfoServicePropagandist
java.lang.Object
infoservice.InfoServicePropagandist
- All Implemented Interfaces:
- java.lang.Runnable
public class InfoServicePropagandist
- extends java.lang.Object
- implements java.lang.Runnable
This is the implementation of the announcment of our own infoservice. It generates
periodicly (default: 10 minutes) a new InfoServiceDBEntry for our own infoservices and
propagates it to all other infoservices (via InfoServiceDatabase.update()).
Field Summary |
private static boolean |
alreadyRunning
Stores whether ther is already an instance of InfoServicePropagandist running or not. |
private static long |
ms_serialNumber
|
Method Summary |
static void |
generateInfoServicePropagandist()
Generates an instance of InfoServicePropagandist if there isn't already one running. |
void |
run()
This is the propaganda thread, which propagates our infoservice to all neighbour
infoservices every Constants.ANNOUNCE_PERIOD (default: 10 minutes). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ms_serialNumber
private static long ms_serialNumber
alreadyRunning
private static boolean alreadyRunning
- Stores whether ther is already an instance of InfoServicePropagandist running or not.
InfoServicePropagandist
public InfoServicePropagandist()
generateInfoServicePropagandist
public static void generateInfoServicePropagandist()
- Generates an instance of InfoServicePropagandist if there isn't already one running.
run
public void run()
- This is the propaganda thread, which propagates our infoservice to all neighbour
infoservices every Constants.ANNOUNCE_PERIOD (default: 10 minutes).
- Specified by:
run
in interface java.lang.Runnable