Java Doc for LogicalAddress.java in  » Net » JGroups-2.4.1-sp3 » org » jgroups » stack » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » JGroups 2.4.1 sp3 » org.jgroups.stack 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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


Field Summary
 byte[]additional_data
    
protected static  intcount
    
protected  Stringhost
    
protected  intid
    
protected  booleanmulticast_addr
    
protected  ArrayListphysical_addrs
    
transient  SocketAddressprimary_physical_addr
     Address of the primary physical address.
protected  longtimestamp
    

Constructor Summary
public  LogicalAddress()
    
public  LogicalAddress(String host_name, List physical_addrs)
    

Method Summary
public  voidaddPhysicalAddress(SocketAddress addr)
     For internal use only.
public  Objectclone()
    
public  intcompare(LogicalAddress other)
     Establishes an order between 2 addresses.
public  intcompareTo(Object o)
    
public  LogicalAddresscopy()
    
public  booleanequals(Object obj)
    
public  byte[]getAdditionalData()
     Returns the additional_data.
public  StringgetHost()
    
public  longgetId()
    
public  ArrayListgetPhysicalAddresses()
     Returns a copy of the list of physical addresses.
public  SocketAddressgetPrimaryPhysicalAddress()
    
public  longgetTimestamp()
    
public  inthashCode()
    
protected  voidinit(String host_name, List physical_addrs)
    
public  booleanisMulticastAddress()
    
public  voidreadExternal(ObjectInput in)
    
public  voidreadFrom(DataInputStream in)
    
public  voidremoveAllPhysicalAddresses()
     For internal use only.
public  voidremovePhysicalAddress(SocketAddress addr)
     For internal use only.
public  voidsetAdditionalData(byte[] additional_data)
     Sets the additional_data.
public  voidsetPrimaryPhysicalAddress(SocketAddress primary_physical_addr)
    
public  intsize()
    
public  StringtoString()
    
public  StringtoString(boolean print_details)
    
public  voidwriteExternal(ObjectOutput out)
    
public  voidwriteTo(DataOutputStream out)
    

Field Detail
additional_data
byte[] additional_data(Code)
To tack on some additional data



count
protected static int count(Code)



host
protected String host(Code)



id
protected int id(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)




Constructor Detail
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




Method Detail
addPhysicalAddress
public void addPhysicalAddress(SocketAddress addr)(Code)
For internal use only. Don't use this method!
Parameters:
  addr -



clone
public Object clone() throws CloneNotSupportedException(Code)



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.



copy
public LogicalAddress copy()(Code)



equals
public boolean equals(Object obj)(Code)



getAdditionalData
public byte[] getAdditionalData()(Code)
Returns the additional_data. byte[]



getHost
public String getHost()(Code)



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)



getPrimaryPhysicalAddress
public SocketAddress getPrimaryPhysicalAddress()(Code)



getTimestamp
public long getTimestamp()(Code)



hashCode
public int hashCode()(Code)



init
protected void init(String host_name, List physical_addrs)(Code)



isMulticastAddress
public boolean isMulticastAddress()(Code)



readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException(Code)



readFrom
public void readFrom(DataInputStream in) throws IOException, IllegalAccessException, InstantiationException(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)



size
public int size()(Code)



toString
public String toString()(Code)



toString
public String toString(boolean print_details)(Code)



writeExternal
public void writeExternal(ObjectOutput out) throws IOException(Code)



writeTo
public void writeTo(DataOutputStream out) throws IOException(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.