com.sun.sgs.impl.service.nodemap.affinity.graph
Class GraphListener

java.lang.Object
  extended by com.sun.sgs.impl.service.nodemap.affinity.graph.GraphListener
All Implemented Interfaces:
ProfileListener

public class GraphListener
extends Object
implements ProfileListener

A listener which detects object uses by Identities within tasks and builds a graph based on that information.


Field Summary
 
Fields inherited from interface com.sun.sgs.profile.ProfileListener
WINDOW_SIZE_PROPERTY
 
Constructor Summary
GraphListener(AffinityGraphBuilder builder)
          Constructs a new listener for affinity graph data.
GraphListener(Properties properties, Identity owner, ComponentRegistry registry)
          Constructs a new listener for affinity graph data.
 
Method Summary
 void propertyChange(PropertyChangeEvent event)
          Notifies this listener of a new change in the system properties.
 void report(ProfileReport profileReport)
          Reports a completed task that has been run through the scheduler.
 void shutdown()
          Tells this listener that the system is shutting down.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphListener

public GraphListener(Properties properties,
                     Identity owner,
                     ComponentRegistry registry)
Constructs a new listener for affinity graph data.

NOTE: this constructor should never be used, but is provided to satisfy the ProfileListener documentation. This listener cannot be provided as as a property, it is created within the system for the server's use.

Parameters:
properties - the configuration properties
owner - task owner for any tasks run by this listener
registry - the system registry

GraphListener

public GraphListener(AffinityGraphBuilder builder)
Constructs a new listener for affinity graph data.

Parameters:
builder - the affinity graph builder to report to
Throws:
NullPointerException - if the builder is null
Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent event)
Notifies this listener of a new change in the system properties. This method is called for any property that changes.

The current list of supported property names is as follows:

name description new value old value
com.sun.sgs.profile.newop a new operation is registered with the system. the new operation : ProfileOperation null
com.sun.sgs.profile.threadcount the number of threads in the system has changed. the current number of threads : Integer the previous number of threads : Integer
com.sun.sgs.profile.nodeid the local node has been assigned a unique identifier the identifier for the local node: Long null

Specified by:
propertyChange in interface ProfileListener
Parameters:
event - A PropertyChangeEvent object describing the name of the property, its old and new values and the source of the change.

shutdown

public void shutdown()
Tells this listener that the system is shutting down.

Specified by:
shutdown in interface ProfileListener

report

public void report(ProfileReport profileReport)
Reports a completed task that has been run through the scheduler. The task may have completed successfully or may have failed. If a task is re-tried, then this method will be called multiple times for each re-try of the same task. Note that in this case the scheduledStartTime will remain constant but the actualStartTime will change for each re-try of the same task.

Specified by:
report in interface ProfileListener
Parameters:
profileReport - the ProfileReport for the task

RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved