jgroup.relacs.mss
Class HostTable

java.lang.Object
  extended by jgroup.relacs.mss.HostTable

public final class HostTable
extends java.lang.Object

The HostTable class

Since:
Jgroup 0.5
Author:
Jgroup Team

Constructor Summary
HostTable()
          Creates an empty table.
 
Method Summary
 MssHost get(int index)
          Returns the host reference having the specified index
static MssHost getLocalHost()
          Returns the MssHost descriptor of the local host.
 void insert(MssHost host)
          Inserts host host in the table, unless an host with the same key is already in the table.
 java.util.Iterator iterator()
          Return an iterator over the values in this host table.
 MssHost lookup(EndPoint endpoint)
          Returns the host reference to which this address is mapped.
 int size()
          Return the number of hosts contained in the table.
 java.lang.String toString()
          Returns a string representation of this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HostTable

public HostTable()
Creates an empty table.

Method Detail

insert

public void insert(MssHost host)
            throws ConfigurationException
Inserts host host in the table, unless an host with the same key is already in the table.

Parameters:
host - the host to be inserted.
Throws:
ConfigurationException - if the element is already in the table

lookup

public MssHost lookup(EndPoint endpoint)
Returns the host reference to which this address is mapped.

Parameters:
endpoint - host endpoint
Returns:
the host reference to which this address is mapped.

get

public MssHost get(int index)
Returns the host reference having the specified index

Parameters:
index - host index
Returns:
the host reference having the specified index.

getLocalHost

public static MssHost getLocalHost()
Returns the MssHost descriptor of the local host.

Throws:
java.lang.IllegalStateException - Raised if the local host has not yet been initialized.

size

public int size()
Return the number of hosts contained in the table.


iterator

public java.util.Iterator iterator()
Return an iterator over the values in this host table.


toString

public java.lang.String toString()
Returns a string representation of this object

Overrides:
toString in class java.lang.Object


Copyright © 1998-2006 The Jgroup/ARM development team. All Rights Reserved.