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.pastry.socket
Class SocketNodeHandlePool

    java.lang.Object
      rice.pastry.dist.DistNodeHandlePool
          rice.pastry.socket.SocketNodeHandlePool

public class SocketNodeHandlePool
extends DistNodeHandlePool

The DistNodeHandlePool controls all of the node handles in use by the DistPastryNode. It ensures that there is only one "active" node handle for each remote pastry node.

Version:
  $Id: SocketNodeHandlePool.java,v 1.4 2003/12/22 03:24:47 amislove Exp $
Author:
  Alan Mislove

Field Summary
`protected java.util.Hashtable` | `handles` A mapping containing references to all of the handles in the system
`protected SocketPastryNode` | `node` The node which this pool serves

Constructor Summary
`SocketNodeHandlePool(SocketPastryNode node)` Constructor.

Method Summary
`DistNodeHandle` | `coalesce(DistNodeHandle handle)` The method verifies a DistNodeHandle.
`protected void` | `record(SocketNodeHandle handle)` This method should be called by a newly constructed node handle, or by a handle which has just arrived at a new node.
`protected void` | `update(EpochInetSocketAddress address, java.lang.Object update)` This method updates all of the handles to the given address with the specified update.

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

Field Detail

### node

    protected SocketPastryNode node

  The node which this pool serves

### handles

    protected java.util.Hashtable handles

  A mapping containing references to all of the handles in the system

Constructor Detail

### SocketNodeHandlePool

    public SocketNodeHandlePool(SocketPastryNode node)

  Constructor.

Parameters:
  `node` - DESCRIBE THE PARAMETER

Method Detail

### coalesce

    public DistNodeHandle coalesce(DistNodeHandle handle)

  The method verifies a DistNodeHandle. If a node handle to the pastry node has never been seen before, an entry is added, and this node handle is referred to in the future. Otherwise, this method returns the previously verified node handle to the pastry node.

  Specified by:
    `coalesce` in class `DistNodeHandlePool`
  Parameters:
    `handle` - The node handle to verify.
  Returns:
    The node handle to use to talk to the pastry node.

### record

    protected void record(SocketNodeHandle handle)

  This method should be called by a newly constructed node handle, or by a handle which has just arrived at a new node. It records the handle, allowing observers on the handle to be properly updated.

  Parameters:
    `handle` - The newly created/deserialized handle

### update

    protected void update(EpochInetSocketAddress address,
                          java.lang.Object update)

  This method updates all of the handles to the given address with the specified update.

  Parameters:
    `update` - The update to notify the handles of
    `address` - 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.