| java.lang.Object org.jgroups.stack.LogicalAddress
LogicalAddress | public class LogicalAddress implements Address(Code) | | Logical address that spans the lifetime of a member. Assigned at member (JVM) startup, and
retained until member is shutdown. Note that the address does not change on
disconnect-connect sequences. For example, when a member is shunned and subsequently
readmitted to the group, the member's address (LogicalAddress) remains the same.
An instance of LogicalAddress is generated by the transport protocol. Currently, only
UDP_NIO generates LogicalAddresses.
Note that host, timestamp and id are supposed to make LogicalAddress as unique as possible.
However, there is a remote chance that 2 instances started on the same machine create their
address at exactly the same time, resulting in identical addresses (leading to problems).
In the future, I will try to make this totally unique, by for example using the PID of the current
process (once available though the JDK, or by locking on a common resource (e.g. /dev/random)
to serialize creation. However, as for now, chances are you will never experience this problem.
author: Bela Ban, Dec 23 2003 |
additional_data | byte[] additional_data(Code) | | To tack on some additional data
|
count | protected static int count(Code) | | |
multicast_addr | protected boolean multicast_addr(Code) | | |
physical_addrs | protected ArrayList physical_addrs(Code) | | List of physical addresses
|
primary_physical_addr | transient SocketAddress primary_physical_addr(Code) | | Address of the primary physical address. This is set to the sender when a message is received.
If this field is set, we will send unicast messages only to this address, not to all addresses listed
in physical_addrs; this reduces the number of msgs we have to send.
Note that this field is not shipped across the wire.
|
timestamp | protected long timestamp(Code) | | |
LogicalAddress | public LogicalAddress()(Code) | | |
LogicalAddress | public LogicalAddress(String host_name, List physical_addrs)(Code) | | Use this constructor to create an instance, not the null-constructor
|
addPhysicalAddress | public void addPhysicalAddress(SocketAddress addr)(Code) | | For internal use only. Don't use this method!
Parameters: addr - |
compare | public int compare(LogicalAddress other)(Code) | | Establishes an order between 2 addresses. Assumes other contains non-null IpAddress.
Excludes channel_name from comparison.
0 for equality, value less than 0 if smaller, greater than 0 if greater. |
compareTo | public int compareTo(Object o)(Code) | | implements the java.lang.Comparable interface
See Also: Comparable Parameters: o - - the Object to be compared a negative integer, zero, or a positive integer as this object is less than,equal to, or greater than the specified object. exception: ClassCastException - - if the specified object's type prevents itfrom being compared to this Object. |
getAdditionalData | public byte[] getAdditionalData()(Code) | | Returns the additional_data.
byte[] |
getId | public long getId()(Code) | | |
getPhysicalAddresses | public ArrayList getPhysicalAddresses()(Code) | | Returns a copy of the list of physical addresses. Reason for the copy is that the list is not supposed
to be modified (should be immutable).
List of physical addresses (return value maybe null) |
getTimestamp | public long getTimestamp()(Code) | | |
hashCode | public int hashCode()(Code) | | |
isMulticastAddress | public boolean isMulticastAddress()(Code) | | |
removeAllPhysicalAddresses | public void removeAllPhysicalAddresses()(Code) | | For internal use only. Don't use this method !
|
removePhysicalAddress | public void removePhysicalAddress(SocketAddress addr)(Code) | | For internal use only. Don't use this method !
Parameters: addr - |
setAdditionalData | public void setAdditionalData(byte[] additional_data)(Code) | | Sets the additional_data.
Parameters: additional_data - The additional_data to set |
setPrimaryPhysicalAddress | public void setPrimaryPhysicalAddress(SocketAddress primary_physical_addr)(Code) | | |
|
|