graph_cluster_utils.supervisor
Class SupervisorBase

java.lang.Object
  extended by graph_cluster_utils.supervisor.Supervisor
      extended by graph_cluster_utils.supervisor.SupervisorBase

public class SupervisorBase
extends Supervisor

Implementation of Supervisor. Assumes a normal Neo4j instance ( GraphDatabaseService) is being used.

Since:
2010-04-01
Author:
Alex Averbuch

Constructor Summary
SupervisorBase(int snapshotPeriod, int longSnapshotPeriod, java.lang.String graphName, java.lang.String resultsDir)
           
 
Method Summary
 void doDynamism(java.lang.String databaseDir)
          Performed dynamism on given database.
 void doFinalSnapshot(int clusterCount, java.lang.String databaseDir)
          Perform logging/snapshot of the state of the current Neo4j instance.
 void doInitialSnapshot(int clusterCount, java.lang.String databaseDir)
          Perform logging/snapshot of the state of the current Neo4j instance.
 void doPeriodicSnapshot(long timeStep, int clusterCount, java.lang.String databaseDir)
          Perform logging/snapshot of the state of the current Neo4j instance.
 boolean isDynamism(int timeStep)
          Checks if dynamism should performed at this timeStep.
 boolean isFinalSnapshot()
          Checks if final logging/snapshot should be performed.
 boolean isInitialSnapshot()
          Checks if initial logging/snapshot should be performed.
 boolean isPeriodicSnapshot(long timeStep)
          Checks if logging/snapshot should be performed at this time step.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SupervisorBase

public SupervisorBase(int snapshotPeriod,
                      int longSnapshotPeriod,
                      java.lang.String graphName,
                      java.lang.String resultsDir)
Method Detail

isDynamism

public boolean isDynamism(int timeStep)
Description copied from class: Supervisor
Checks if dynamism should performed at this timeStep.

Specified by:
isDynamism in class Supervisor
Parameters:
timeStep - represents the algorithms current iteration

doDynamism

public void doDynamism(java.lang.String databaseDir)
Description copied from class: Supervisor
Performed dynamism on given database.

Specified by:
doDynamism in class Supervisor
Parameters:
databaseDir - path to a Neo4j instance

isInitialSnapshot

public boolean isInitialSnapshot()
Description copied from class: Supervisor
Checks if initial logging/snapshot should be performed.

Specified by:
isInitialSnapshot in class Supervisor

doInitialSnapshot

public void doInitialSnapshot(int clusterCount,
                              java.lang.String databaseDir)
Description copied from class: Supervisor
Perform logging/snapshot of the state of the current Neo4j instance. This may include, but is not limited to, graph and clustering metrics.

Specified by:
doInitialSnapshot in class Supervisor
Parameters:
clusterCount - number of clusters the algorithm is either trying to find, or has found so far (depending on use)
databaseDir - path to a Neo4j instance

isPeriodicSnapshot

public boolean isPeriodicSnapshot(long timeStep)
Description copied from class: Supervisor
Checks if logging/snapshot should be performed at this time step.

Specified by:
isPeriodicSnapshot in class Supervisor
Parameters:
timeStep - represents the algorithms current iteration

doPeriodicSnapshot

public void doPeriodicSnapshot(long timeStep,
                               int clusterCount,
                               java.lang.String databaseDir)
Description copied from class: Supervisor
Perform logging/snapshot of the state of the current Neo4j instance. This may include, but is not limited to, graph and clustering metrics.

Specified by:
doPeriodicSnapshot in class Supervisor
Parameters:
timeStep - represents the algorithms current iteration
clusterCount - number of clusters the algorithm is either trying to find, or has found so far (depending on use)
databaseDir - path to a Neo4j instance

isFinalSnapshot

public boolean isFinalSnapshot()
Description copied from class: Supervisor
Checks if final logging/snapshot should be performed.

Specified by:
isFinalSnapshot in class Supervisor

doFinalSnapshot

public void doFinalSnapshot(int clusterCount,
                            java.lang.String databaseDir)
Description copied from class: Supervisor
Perform logging/snapshot of the state of the current Neo4j instance. This may include, but is not limited to, graph and clustering metrics.

Specified by:
doFinalSnapshot in class Supervisor
Parameters:
clusterCount - number of clusters the algorithm is either trying to find, or has found so far (depending on use)
databaseDir - path to a Neo4j instance