Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rice.p2p.glacier.v2
Class GlacierImpl

    java.lang.Object
      rice.p2p.glacier.v2.GlacierImpl

All Implemented Interfaces:
  Application, DebugCommandHandler, GCPast, Glacier, Past, VersioningPast

public class GlacierImpl
extends java.lang.Object
implements Glacier, Past, GCPast, VersioningPast, Application, DebugCommandHandler

DESCRIBE THE CLASS

Version:
  $Id: pretty.settings 2305 2005-03-11 20:22:33Z jeffh $
Author:
  jeffh

Field Summary
`protected long` | `bucketConsumed` DESCRIBE THE FIELD
`protected long` | `bucketLastUpdated` DESCRIBE THE FIELD
`protected long` | `bucketMax` DESCRIBE THE FIELD
`protected long` | `bucketMin` DESCRIBE THE FIELD
`protected java.util.Hashtable` | `continuations` DESCRIBE THE FIELD
`protected long` | `currentFragmentRequestTimeout` DESCRIBE THE FIELD
`protected Endpoint` | `endpoint` DESCRIBE THE FIELD
`protected IdFactory` | `factory` DESCRIBE THE FIELD
`protected StorageManager` | `fragmentStorage` DESCRIBE THE FIELD
`protected java.lang.String` | `instance` DESCRIBE THE FIELD
`protected java.util.Vector` | `listeners` DESCRIBE THE FIELD
`protected Logger` | `logger` DESCRIBE THE FIELD
`protected StorageManager` | `neighborStorage` DESCRIBE THE FIELD
`protected long` | `nextContinuationTimeout` DESCRIBE THE FIELD
`protected int` | `nextUID` DESCRIBE THE FIELD
`protected Node` | `node` DESCRIBE THE FIELD
`protected int` | `numFragments` DESCRIBE THE FIELD
`protected int` | `numSurvivors` DESCRIBE THE FIELD
`protected java.util.Hashtable` | `pendingTraffic` DESCRIBE THE FIELD
`protected GlacierPolicy` | `policy` DESCRIBE THE FIELD
`protected IdRange` | `responsibleRange` DESCRIBE THE FIELD
`protected GlacierStatistics` | `statistics` DESCRIBE THE FIELD
`protected CancellableTask` | `timer` DESCRIBE THE FIELD
`protected long` | `tokenBucket` DESCRIBE THE FIELD
`protected StorageManager` | `trashStorage` DESCRIBE THE FIELD

Fields inherited from interface rice.p2p.past.gc.GCPast
`INFINITY_EXPIRATION`

Constructor Summary
`GlacierImpl(Node nodeArg, StorageManager fragmentStorageArg, StorageManager neighborStorageArg, int numFragmentsArg, int numSurvivorsArg, IdFactory factoryArg, java.lang.String instanceArg, GlacierPolicy policyArg)` Constructor for GlacierImpl.

Method Summary
`void` | `addStatisticsListener(GlacierStatisticsListener gsl)` Adds a feature to the StatisticsListener attribute of the GlacierImpl object
`void` | `deliver(Id id, Message message)` DESCRIBE THE METHOD
`void` | `emptyTrash(Continuation c)` DESCRIBE THE METHOD
`void` | `fetch(PastContentHandle handle, Continuation command)` DESCRIBE THE METHOD
`boolean` | `forward(RouteMessage message)` DESCRIBE THE METHOD
`Environment` | `getEnvironment()` Gets the Environment attribute of the GlacierImpl object
`java.lang.String` | `getInstance()` Gets the Instance attribute of the GlacierImpl object
`NodeHandle` | `getLocalNodeHandle()` Gets the LocalNodeHandle attribute of the GlacierImpl object
`Id[][]` | `getNeighborRanges()` Gets the NeighborRanges attribute of the GlacierImpl object
`int` | `getReplicationFactor()` Gets the ReplicationFactor attribute of the GlacierImpl object
`long` | `getTrashSize()` Gets the TrashSize attribute of the GlacierImpl object
`protected int` | `getUID()` Gets the UID attribute of the GlacierImpl object
`java.lang.String` | `handleDebugCommand(java.lang.String command)` DESCRIBE THE METHOD
`void` | `insert(PastContent obj, Continuation command)` DESCRIBE THE METHOD
`void` | `insert(PastContent obj, long expiration, Continuation command)` DESCRIBE THE METHOD
`void` | `lookup(Id id, boolean cache, Continuation command)` DESCRIBE THE METHOD
`void` | `lookup(Id id, Continuation command)` DESCRIBE THE METHOD
`void` | `lookup(Id id, long version, Continuation command)` DESCRIBE THE METHOD
`void` | `lookupHandle(Id id, NodeHandle handle, Continuation command)` DESCRIBE THE METHOD
`void` | `lookupHandles(Id id, int num, Continuation command)` DESCRIBE THE METHOD
`void` | `lookupHandles(Id id, long version, int num, Continuation command)` DESCRIBE THE METHOD
`void` | `neighborSeen(Id nodeId, long when)` DESCRIBE THE METHOD
`void` | `rateLimitedRetrieveFragment(FragmentKey key, Manifest manifest, char tag, GlacierContinuation c)` DESCRIBE THE METHOD
`void` | `refresh(Id[] ids, long[] expirations, Continuation command)` DESCRIBE THE METHOD
`void` | `refresh(Id[] ids, long[] versions, long[] expirations, Continuation command)` DESCRIBE THE METHOD
`void` | `refresh(Id[] ids, long expiration, Continuation command)` DESCRIBE THE METHOD
`void` | `removeStatisticsListener(GlacierStatisticsListener gsl)` DESCRIBE THE METHOD
`void` | `retrieveFragment(FragmentKey key, Manifest manifest, char tag, GlacierContinuation c)` DESCRIBE THE METHOD
`void` | `retrieveManifest(VersionKey key, char tag, Continuation command)` DESCRIBE THE METHOD
`void` | `retrieveObject(VersionKey key, Manifest manifest, boolean beStrict, char tag, Continuation c)` DESCRIBE THE METHOD
`void` | `sendMessage(Id id, GlacierMessage message, NodeHandle hint)` DESCRIBE THE METHOD
`void` | `setBandwidthLimit(long bytesPerSecond, long maxBurst)` Sets the BandwidthLimit attribute of the GlacierImpl object
`void` | `setNeighborTimeout(long neighborTimeoutMin)` Sets the NeighborTimeout attribute of the GlacierImpl object
`void` | `setRateLimit(int rps)` Sets the RateLimit attribute of the GlacierImpl object
`void` | `setSyncInterval(int syncIntervalSec)` Sets the SyncInterval attribute of the GlacierImpl object
`void` | `setSyncMaxFragments(int syncMaxFragments)` Sets the SyncMaxFragments attribute of the GlacierImpl object
`void` | `setTrashcan(StorageManager trashStorage)` Sets the Trashcan attribute of the GlacierImpl object
`void` | `startup()` DESCRIBE THE METHOD
`void` | `update(NodeHandle handle, boolean joined)` DESCRIBE THE METHOD
`protected void` | `updateTokenBucket()` DESCRIBE THE METHOD

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### fragmentStorage

    protected final StorageManager fragmentStorage

  DESCRIBE THE FIELD

### neighborStorage

    protected final StorageManager neighborStorage

  DESCRIBE THE FIELD

### policy

    protected final GlacierPolicy policy

  DESCRIBE THE FIELD

### node

    protected final Node node

  DESCRIBE THE FIELD

### numFragments

    protected final int numFragments

  DESCRIBE THE FIELD

### instance

    protected final java.lang.String instance

  DESCRIBE THE FIELD

### numSurvivors

    protected final int numSurvivors

  DESCRIBE THE FIELD

### endpoint

    protected final Endpoint endpoint

  DESCRIBE THE FIELD

### factory

    protected final IdFactory factory

  DESCRIBE THE FIELD

### continuations

    protected final java.util.Hashtable continuations

  DESCRIBE THE FIELD

### pendingTraffic

    protected final java.util.Hashtable pendingTraffic

  DESCRIBE THE FIELD

### trashStorage

    protected StorageManager trashStorage

  DESCRIBE THE FIELD

### nextContinuationTimeout

    protected long nextContinuationTimeout

  DESCRIBE THE FIELD

### responsibleRange

    protected IdRange responsibleRange

  DESCRIBE THE FIELD

### nextUID

    protected int nextUID

  DESCRIBE THE FIELD

### timer

    protected CancellableTask timer

  DESCRIBE THE FIELD

### statistics

    protected GlacierStatistics statistics

  DESCRIBE THE FIELD

### listeners

    protected java.util.Vector listeners

  DESCRIBE THE FIELD

### currentFragmentRequestTimeout

    protected long currentFragmentRequestTimeout

  DESCRIBE THE FIELD

### tokenBucket

    protected long tokenBucket

  DESCRIBE THE FIELD

### bucketLastUpdated

    protected long bucketLastUpdated

  DESCRIBE THE FIELD

### bucketMin

    protected long bucketMin

  DESCRIBE THE FIELD

### bucketMax

    protected long bucketMax

  DESCRIBE THE FIELD

### bucketConsumed

    protected long bucketConsumed

  DESCRIBE THE FIELD

### logger

    protected Logger logger

  DESCRIBE THE FIELD

Constructor Detail

### GlacierImpl

    public GlacierImpl(Node nodeArg,
                       StorageManager fragmentStorageArg,
                       StorageManager neighborStorageArg,
                       int numFragmentsArg,
                       int numSurvivorsArg,
                       IdFactory factoryArg,
                       java.lang.String instanceArg,
                       GlacierPolicy policyArg)

  Constructor for GlacierImpl.

Parameters:
  `nodeArg` - DESCRIBE THE PARAMETER
  `fragmentStorageArg` - DESCRIBE THE PARAMETER
  `neighborStorageArg` - DESCRIBE THE PARAMETER
  `numFragmentsArg` - DESCRIBE THE PARAMETER
  `numSurvivorsArg` - DESCRIBE THE PARAMETER
  `factoryArg` - DESCRIBE THE PARAMETER
  `instanceArg` - DESCRIBE THE PARAMETER
  `policyArg` - DESCRIBE THE PARAMETER

Method Detail

### getUID

    protected int getUID()

  Gets the UID attribute of the GlacierImpl object

  Returns:
    The UID value

### getNeighborRanges

    public Id[][] getNeighborRanges()

  Gets the NeighborRanges attribute of the GlacierImpl object

  Returns:
    The NeighborRanges value

### getReplicationFactor

    public int getReplicationFactor()

  Gets the ReplicationFactor attribute of the GlacierImpl object

  Specified by:
    `getReplicationFactor` in interface `Past`
  Returns:
    The ReplicationFactor value

### getLocalNodeHandle

    public NodeHandle getLocalNodeHandle()

  Gets the LocalNodeHandle attribute of the GlacierImpl object

  Specified by:
    `getLocalNodeHandle` in interface `Past`
  Returns:
    The LocalNodeHandle value

### getTrashSize

    public long getTrashSize()

  Gets the TrashSize attribute of the GlacierImpl object

  Returns:
    The TrashSize value

### getEnvironment

    public Environment getEnvironment()

  Gets the Environment attribute of the GlacierImpl object

  Specified by:
    `getEnvironment` in interface `Past`
  Returns:
    The Environment value

### getInstance

    public java.lang.String getInstance()

  Gets the Instance attribute of the GlacierImpl object

  Specified by:
    `getInstance` in interface `Past`
  Returns:
    The Instance value

### setTrashcan

    public void setTrashcan(StorageManager trashStorage)

  Sets the Trashcan attribute of the GlacierImpl object

  Parameters:
    `trashStorage` - The new Trashcan value

### setSyncInterval

    public void setSyncInterval(int syncIntervalSec)

  Sets the SyncInterval attribute of the GlacierImpl object

  Parameters:
    `syncIntervalSec` - The new SyncInterval value

### setSyncMaxFragments

    public void setSyncMaxFragments(int syncMaxFragments)

  Sets the SyncMaxFragments attribute of the GlacierImpl object

  Parameters:
    `syncMaxFragments` - The new SyncMaxFragments value

### setRateLimit

    public void setRateLimit(int rps)

  Sets the RateLimit attribute of the GlacierImpl object

  Parameters:
    `rps` - The new RateLimit value

### setNeighborTimeout

    public void setNeighborTimeout(long neighborTimeoutMin)

  Sets the NeighborTimeout attribute of the GlacierImpl object

  Parameters:
    `neighborTimeoutMin` - The new NeighborTimeout value

### setBandwidthLimit

    public void setBandwidthLimit(long bytesPerSecond,
                                  long maxBurst)

  Sets the BandwidthLimit attribute of the GlacierImpl object

  Parameters:
    `bytesPerSecond` - The new BandwidthLimit value
    `maxBurst` - The new BandwidthLimit value

### startup

    public void startup()

  DESCRIBE THE METHOD

### updateTokenBucket

    protected void updateTokenBucket()

  DESCRIBE THE METHOD

### sendMessage

    public void sendMessage(Id id,
                            GlacierMessage message,
                            NodeHandle hint)

  DESCRIBE THE METHOD

  Parameters:
    `id` - DESCRIBE THE PARAMETER
    `message` - DESCRIBE THE PARAMETER
    `hint` - DESCRIBE THE PARAMETER

### handleDebugCommand

    public java.lang.String handleDebugCommand(java.lang.String command)

  DESCRIBE THE METHOD

  Specified by:
    `handleDebugCommand` in interface `DebugCommandHandler`
  Parameters:
    `command` - DESCRIBE THE PARAMETER
  Returns:
    DESCRIBE THE RETURN VALUE

### insert

    public void insert(PastContent obj,
                       Continuation command)

  DESCRIBE THE METHOD

  Specified by:
    `insert` in interface `Past`
  Parameters:
    `obj` - DESCRIBE THE PARAMETER
    `command` - DESCRIBE THE PARAMETER

### refresh

    public void refresh(Id[] ids,
                        long[] expirations,
                        Continuation command)

  DESCRIBE THE METHOD

  Specified by:
    `refresh` in interface `GCPast`
  Parameters:
    `ids` - DESCRIBE THE PARAMETER
    `expirations` - DESCRIBE THE PARAMETER
    `command` - DESCRIBE THE PARAMETER

### refresh

    public void refresh(Id[] ids,
                        long expiration,
                        Continuation command)

  DESCRIBE THE METHOD

  Specified by:
    `refresh` in interface `GCPast`
  Parameters:
    `ids` - DESCRIBE THE PARAMETER
    `expiration` - DESCRIBE THE PARAMETER
    `command` - DESCRIBE THE PARAMETER

### refresh

    public void refresh(Id[] ids,
                        long[] versions,
                        long[] expirations,
                        Continuation command)

  DESCRIBE THE METHOD

  Specified by:
    `refresh` in interface `VersioningPast`
  Parameters:
    `ids` - DESCRIBE THE PARAMETER
    `versions` - DESCRIBE THE PARAMETER
    `expirations` - DESCRIBE THE PARAMETER
    `command` - DESCRIBE THE PARAMETER

### insert

    public void insert(PastContent obj,
                       long expiration,
                       Continuation command)

  DESCRIBE THE METHOD

  Specified by:
    `insert` in interface `GCPast`
  Parameters:
    `obj` - DESCRIBE THE PARAMETER
    `expiration` - DESCRIBE THE PARAMETER
    `command` - DESCRIBE THE PARAMETER

### neighborSeen

    public void neighborSeen(Id nodeId,
                             long when)

  DESCRIBE THE METHOD

  Parameters:
    `nodeId` - DESCRIBE THE PARAMETER
    `when` - DESCRIBE THE PARAMETER

### forward

    public boolean forward(RouteMessage message)

  DESCRIBE THE METHOD

  Specified by:
    `forward` in interface `Application`
  Parameters:
    `message` - DESCRIBE THE PARAMETER
  Returns:
    DESCRIBE THE RETURN VALUE

### update

    public void update(NodeHandle handle,
                       boolean joined)

  DESCRIBE THE METHOD

  Specified by:
    `update` in interface `Application`
  Parameters:
    `handle` - DESCRIBE THE PARAMETER
    `joined` - DESCRIBE THE PARAMETER

### lookupHandle

    public void lookupHandle(Id id,
                             NodeHandle handle,
                             Continuation command)

  DESCRIBE THE METHOD

  Specified by:
    `lookupHandle` in interface `Past`
  Parameters:
    `id` - DESCRIBE THE PARAMETER
    `handle` - DESCRIBE THE PARAMETER
    `command` - DESCRIBE THE PARAMETER

### lookupHandles

    public void lookupHandles(Id id,
                              int num,
                              Continuation command)

  DESCRIBE THE METHOD

  Specified by:
    `lookupHandles` in interface `Past`
  Parameters:
    `id` - DESCRIBE THE PARAMETER
    `num` - DESCRIBE THE PARAMETER
    `command` - DESCRIBE THE PARAMETER

### lookupHandles

    public void lookupHandles(Id id,
                              long version,
                              int num,
                              Continuation command)

  DESCRIBE THE METHOD

  Specified by:
    `lookupHandles` in interface `VersioningPast`
  Parameters:
    `id` - DESCRIBE THE PARAMETER
    `version` - DESCRIBE THE PARAMETER
    `num` - DESCRIBE THE PARAMETER
    `command` - DESCRIBE THE PARAMETER

### lookup

    public void lookup(Id id,
                       long version,
                       Continuation command)

  DESCRIBE THE METHOD

  Specified by:
    `lookup` in interface `VersioningPast`
  Parameters:
    `id` - DESCRIBE THE PARAMETER
    `version` - DESCRIBE THE PARAMETER
    `command` - DESCRIBE THE PARAMETER

### lookup

    public void lookup(Id id,
                       boolean cache,
                       Continuation command)

  DESCRIBE THE METHOD

  Specified by:
    `lookup` in interface `Past`
  Parameters:
    `id` - DESCRIBE THE PARAMETER
    `cache` - DESCRIBE THE PARAMETER
    `command` - DESCRIBE THE PARAMETER

### lookup

    public void lookup(Id id,
                       Continuation command)

  DESCRIBE THE METHOD

  Specified by:
    `lookup` in interface `Past`
  Parameters:
    `id` - DESCRIBE THE PARAMETER
    `command` - DESCRIBE THE PARAMETER

### fetch

    public void fetch(PastContentHandle handle,
                      Continuation command)

  DESCRIBE THE METHOD

  Specified by:
    `fetch` in interface `Past`
  Parameters:
    `handle` - DESCRIBE THE PARAMETER
    `command` - DESCRIBE THE PARAMETER

### retrieveManifest

    public void retrieveManifest(VersionKey key,
                                 char tag,
                                 Continuation command)

  DESCRIBE THE METHOD

  Parameters:
    `key` - DESCRIBE THE PARAMETER
    `tag` - DESCRIBE THE PARAMETER
    `command` - DESCRIBE THE PARAMETER

### retrieveObject

    public void retrieveObject(VersionKey key,
                               Manifest manifest,
                               boolean beStrict,
                               char tag,
                               Continuation c)

  DESCRIBE THE METHOD

  Parameters:
    `key` - DESCRIBE THE PARAMETER
    `manifest` - DESCRIBE THE PARAMETER
    `beStrict` - DESCRIBE THE PARAMETER
    `tag` - DESCRIBE THE PARAMETER
    `c` - DESCRIBE THE PARAMETER

### retrieveFragment

    public void retrieveFragment(FragmentKey key,
                                 Manifest manifest,
                                 char tag,
                                 GlacierContinuation c)

  DESCRIBE THE METHOD

  Parameters:
    `key` - DESCRIBE THE PARAMETER
    `manifest` - DESCRIBE THE PARAMETER
    `tag` - DESCRIBE THE PARAMETER
    `c` - DESCRIBE THE PARAMETER

### rateLimitedRetrieveFragment

    public void rateLimitedRetrieveFragment(FragmentKey key,
                                            Manifest manifest,
                                            char tag,
                                            GlacierContinuation c)

  DESCRIBE THE METHOD

  Parameters:
    `key` - DESCRIBE THE PARAMETER
    `manifest` - DESCRIBE THE PARAMETER
    `tag` - DESCRIBE THE PARAMETER
    `c` - DESCRIBE THE PARAMETER

### deliver

    public void deliver(Id id,
                        Message message)

  DESCRIBE THE METHOD

  Specified by:
    `deliver` in interface `Application`
  Parameters:
    `id` - DESCRIBE THE PARAMETER
    `message` - DESCRIBE THE PARAMETER

### emptyTrash

    public void emptyTrash(Continuation c)

  DESCRIBE THE METHOD

  Parameters:
    `c` - DESCRIBE THE PARAMETER

### addStatisticsListener

    public void addStatisticsListener(GlacierStatisticsListener gsl)

  Adds a feature to the StatisticsListener attribute of the GlacierImpl object

  Parameters:
    `gsl` - The feature to be added to the StatisticsListener attribute

### removeStatisticsListener

    public void removeStatisticsListener(GlacierStatisticsListener gsl)

  DESCRIBE THE METHOD

  Parameters:
    `gsl` - DESCRIBE THE PARAMETER

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005 - Rice Pastry.