org.jgroups
Class AnycastAddress

java.lang.Object
  extended by org.jgroups.AnycastAddress
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, java.lang.Comparable<Address>, Address, Streamable

public class AnycastAddress
extends java.lang.Object
implements Address

This type of address represents a subset of the cluster members in which the total order properties must be applied, e.g. if the cluster membership is {A,B,C,D,E}, an AnycastAddress could be {D,E}.

Since:
3.1
Author:
Pedro Ruivo
See Also:
Serialized Form

Field Summary
protected  java.util.Collection<Address> destinations
           
 
Fields inherited from interface org.jgroups.Address
IP_ADDR, NULL, SITE_MASTER, SITE_UUID, UUID_ADDR
 
Constructor Summary
AnycastAddress()
           
AnycastAddress(Address... addresses)
           
AnycastAddress(java.util.Collection<Address> addresses)
           
 
Method Summary
protected  void _add(Address address)
           
 void add(Address... addresses)
           
 void addAll(java.util.Collection<Address> addresses)
           
 int compareTo(Address o)
           
 boolean equals(java.lang.Object obj)
           
 java.util.Collection<Address> getAddresses()
           
 int hashCode()
           
 void readExternal(java.io.ObjectInput objectInput)
           
 void readFrom(java.io.DataInput in)
          Read the state of the current object (including superclasses) from instream Note that the input stream must not be closed
 int size()
          Returns serialized size of this address
 java.lang.String toString()
           
 void writeExternal(java.io.ObjectOutput objectOutput)
           
 void writeTo(java.io.DataOutput out)
          Write the entire state of the current object (including superclasses) to outstream.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

destinations

protected java.util.Collection<Address> destinations
Constructor Detail

AnycastAddress

public AnycastAddress()

AnycastAddress

public AnycastAddress(java.util.Collection<Address> addresses)

AnycastAddress

public AnycastAddress(Address... addresses)
Method Detail

add

public void add(Address... addresses)

_add

protected void _add(Address address)

addAll

public void addAll(java.util.Collection<Address> addresses)

getAddresses

public java.util.Collection<Address> getAddresses()

size

public int size()
Description copied from interface: Address
Returns serialized size of this address

Specified by:
size in interface Address

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

compareTo

public int compareTo(Address o)
Specified by:
compareTo in interface java.lang.Comparable<Address>

writeTo

public void writeTo(java.io.DataOutput out)
             throws java.lang.Exception
Description copied from interface: Streamable
Write the entire state of the current object (including superclasses) to outstream. Note that the output stream must not be closed

Specified by:
writeTo in interface Streamable
Throws:
java.lang.Exception

readFrom

public void readFrom(java.io.DataInput in)
              throws java.lang.Exception
Description copied from interface: Streamable
Read the state of the current object (including superclasses) from instream Note that the input stream must not be closed

Specified by:
readFrom in interface Streamable
Throws:
java.lang.Exception

writeExternal

public void writeExternal(java.io.ObjectOutput objectOutput)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput objectInput)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException


Copyright © 1998-2012 Bela Ban / Red Hat. All Rights Reserved.