com.atlassian.confluence.util
Class ClusterUtils

java.lang.Object
  extended by com.atlassian.confluence.util.ClusterUtils

public class ClusterUtils
extends Object

Utilities for clustering


Method Summary
static InetAddress addressFromIpString(String ipString)
          Takes a raw IP string and converts it to an InetAddress.
static Iterator<NetworkInterface> getClusterableInterfaces()
          Find all network interfaces on the host that are suitable for clustering via multicast
static InetAddress hashNameToAddress(String name)
          Hash a name to a IPv4 network address.
static InetAddress hashNameToMulticastAddress(String name)
          Hash a name to a valid IPv4 multicast IP address.
static boolean isLoopbackInterface(NetworkInterface iface)
           
static InetAddress resolveName(String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

resolveName

public static InetAddress resolveName(String name)

hashNameToAddress

public static InetAddress hashNameToAddress(String name)
Hash a name to a IPv4 network address. Any address may be returned from this function, including loopback and private addresses

Parameters:
name -
Returns:
An IPv4 address

hashNameToMulticastAddress

public static InetAddress hashNameToMulticastAddress(String name)
Hash a name to a valid IPv4 multicast IP address. Local and administrative IP addresses are avoided.

Parameters:
name -
Returns:
A valid IPv4 multicast address

getClusterableInterfaces

public static Iterator<NetworkInterface> getClusterableInterfaces()
                                                           throws SocketException
Find all network interfaces on the host that are suitable for clustering via multicast

Returns:
An iterator of suitable NetworkInterfaces
Throws:
SocketException

addressFromIpString

public static InetAddress addressFromIpString(String ipString)
Takes a raw IP string and converts it to an InetAddress.

Parameters:
ipString - String representing and IP address
Returns:
InetAddress representing the same address.
Throws:
IllegalArgumentException - if the string is not a valid IP string

isLoopbackInterface

public static boolean isLoopbackInterface(NetworkInterface iface)


Copyright © 2003–2015 Atlassian. All rights reserved.