com.hp.hpl.jena.sparql.util.graph
Class GraphListenerCounter

java.lang.Object
  extended by com.hp.hpl.jena.sparql.util.graph.GraphListenerBase
      extended by com.hp.hpl.jena.sparql.util.graph.GraphListenerCounter
All Implemented Interfaces:
com.hp.hpl.jena.graph.GraphListener
Direct Known Subclasses:
GraphLoadMonitor

public abstract class GraphListenerCounter
extends GraphListenerBase

Adds a regular "tick" based on the number of adds or deletes seen. The additions and deletions ticks are independent.


Constructor Summary
GraphListenerCounter(int addTickCount)
          Create a listener that "ticks" on additions to the graph (-1 means "off")
GraphListenerCounter(int addTickCount, int deleteTickCount)
          Create a listener that "ticks" on additions and deletions (in each case, -1 means "off")
 
Method Summary
 long getAddCount()
           
 long getAddTicks()
           
 int getAddTickSize()
           
 long getDeleteCount()
           
 long getDeleteTicks()
           
 int getDeleteTickSize()
           
 void notifyEvent(com.hp.hpl.jena.graph.Graph source, Object value)
           
 void reset()
           
 
Methods inherited from class com.hp.hpl.jena.sparql.util.graph.GraphListenerBase
notifyAddArray, notifyAddGraph, notifyAddIterator, notifyAddList, notifyAddTriple, notifyDeleteArray, notifyDeleteGraph, notifyDeleteIterator, notifyDeleteList, notifyDeleteTriple
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphListenerCounter

public GraphListenerCounter(int addTickCount)
Create a listener that "ticks" on additions to the graph (-1 means "off")

Parameters:
addTickCount -

GraphListenerCounter

public GraphListenerCounter(int addTickCount,
                            int deleteTickCount)
Create a listener that "ticks" on additions and deletions (in each case, -1 means "off")

Parameters:
addTickCount - Notification tick for additions to the graph
deleteTickCount - Notification tick for deletions to the graph
Method Detail

reset

public void reset()

notifyEvent

public void notifyEvent(com.hp.hpl.jena.graph.Graph source,
                        Object value)
Specified by:
notifyEvent in interface com.hp.hpl.jena.graph.GraphListener
Overrides:
notifyEvent in class GraphListenerBase

getAddTickSize

public final int getAddTickSize()

getDeleteTickSize

public final int getDeleteTickSize()

getAddCount

public final long getAddCount()

getDeleteCount

public final long getDeleteCount()

getAddTicks

public final long getAddTicks()

getDeleteTicks

public final long getDeleteTicks()


Licenced under the Apache License, Version 2.0