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

java.lang.Object
  extended by com.sun.sgs.impl.service.nodemap.affinity.BasicState
      extended by com.sun.sgs.impl.service.nodemap.affinity.graph.AbstractAffinityGraphBuilder
Direct Known Subclasses:
BipartiteGraphBuilder, DistGraphBuilder, DistGraphBuilderServerImpl, SingleGraphBuilder, WeightedGraphBuilder

public class AbstractAffinityGraphBuilder
extends BasicState

A base class to support common AffinityGraphBuilder implementations.

This class supports the following properties:

Property: com.sun.sgs.impl.service.nodemap.affinity.snapshot.period
Default: 300000 (5 minutes)
The amount of time, in milliseconds, for each snapshot of retained data. Older snapshots are discarded as time goes on. A longer snapshot period gives us more history, but also longer compute times to use that history, as more data must be processed.

Property: com.sun.sgs.impl.service.nodemap.affinity.snapshot.count
Default: 1
The number of snapshots to retain. A larger value means more history will be retained. Using a smaller snapshot period with a larger count means more total history will be retained, with a smaller amount discarded at the start of each new snapshot.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.sgs.impl.service.nodemap.affinity.BasicState
BasicState.State
 
Field Summary
static long DEFAULT_PERIOD
          The default time snapshot period.
static int DEFAULT_PERIOD_COUNT
          The default snapshot count.
protected static LoggerWrapper logger
          Our logger.
static String PERIOD_COUNT_PROPERTY
          The property controlling how many past snapshots to retain.
static String PERIOD_PROPERTY
          The property controlling time snapshots, in milliseconds.
protected  int periodCount
          The number of snapshots the graph pruner should maintain.
static String PROP_BASE
          The base name for graph builder properties.
protected  long snapshot
          The time, in milliseconds for each period snapshot.
protected  PropertiesWrapper wrappedProps
          Our properties.
 
Fields inherited from class com.sun.sgs.impl.service.nodemap.affinity.BasicState
state
 
Constructor Summary
protected AbstractAffinityGraphBuilder(Properties properties)
          Parses common graph builder properties.
 
Method Summary
 
Methods inherited from class com.sun.sgs.impl.service.nodemap.affinity.BasicState
checkForDisabledOrShutdownState, checkForShutdownState, setDisabledState, setEnabledState, setShutdownState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_BASE

public static final String PROP_BASE
The base name for graph builder properties.

See Also:
Constant Field Values

PERIOD_PROPERTY

public static final String PERIOD_PROPERTY
The property controlling time snapshots, in milliseconds.

See Also:
Constant Field Values

DEFAULT_PERIOD

public static final long DEFAULT_PERIOD
The default time snapshot period.

See Also:
Constant Field Values

PERIOD_COUNT_PROPERTY

public static final String PERIOD_COUNT_PROPERTY
The property controlling how many past snapshots to retain.

See Also:
Constant Field Values

DEFAULT_PERIOD_COUNT

public static final int DEFAULT_PERIOD_COUNT
The default snapshot count.

See Also:
Constant Field Values

logger

protected static final LoggerWrapper logger
Our logger.


wrappedProps

protected final PropertiesWrapper wrappedProps
Our properties.


snapshot

protected final long snapshot
The time, in milliseconds for each period snapshot.


periodCount

protected final int periodCount
The number of snapshots the graph pruner should maintain.

Constructor Detail

AbstractAffinityGraphBuilder

protected AbstractAffinityGraphBuilder(Properties properties)
Parses common graph builder properties.

Parameters:
properties - the configuration properties for this graph builder

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