graph_cluster_utils.logger
Class LoggerBase

java.lang.Object
  extended by graph_cluster_utils.logger.Logger
      extended by graph_cluster_utils.logger.LoggerBase

public class LoggerBase
extends Logger

Generic implementation of Logger. Logs .gml, .graph, .ptn, and .met files from given GraphDatabaseService

Since:
2010-04-01
Author:
Alex Averbuch

Constructor Summary
LoggerBase(int snapshotPeriod, int longSnapshotPeriod, java.lang.String graphName, java.lang.String resultsDir)
           
 
Method Summary
 void doFinalSnapshot(org.neo4j.graphdb.GraphDatabaseService transNeo, int clusterCount)
          Perform logging/snapshot of the state of the current Neo4j instance.
 void doInitialSnapshot(org.neo4j.graphdb.GraphDatabaseService transNeo, int clusterCount)
          Perform logging/snapshot of the state of the current Neo4j instance.
 void doPeriodicSnapshot(org.neo4j.graphdb.GraphDatabaseService transNeo, long timeStep, int clusterCount)
          Perform logging/snapshot of the state of the current Neo4j instance.
 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

LoggerBase

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

isInitialSnapshot

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

Specified by:
isInitialSnapshot in class Logger

doInitialSnapshot

public void doInitialSnapshot(org.neo4j.graphdb.GraphDatabaseService transNeo,
                              int clusterCount)
Description copied from class: Logger
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 Logger
Parameters:
transNeo - GraphDatabaseService implementation to be read from during logging
clusterCount - number of clusters the algorithm is either trying to find, or has found so far (depending on use)

isPeriodicSnapshot

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

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

doPeriodicSnapshot

public void doPeriodicSnapshot(org.neo4j.graphdb.GraphDatabaseService transNeo,
                               long timeStep,
                               int clusterCount)
Description copied from class: Logger
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 Logger
Parameters:
transNeo - GraphDatabaseService implementation to be read from during logging
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)

isFinalSnapshot

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

Specified by:
isFinalSnapshot in class Logger

doFinalSnapshot

public void doFinalSnapshot(org.neo4j.graphdb.GraphDatabaseService transNeo,
                            int clusterCount)
Description copied from class: Logger
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 Logger
Parameters:
transNeo - GraphDatabaseService implementation to be read from during logging
clusterCount - number of clusters the algorithm is either trying to find, or has found so far (depending on use)