com.atlassian.confluence.util
Class ClusterUtils

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

public class ClusterUtils
extends java.lang.Object

Utilities for clustering


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

Method Detail

hashNameToAddress

public static java.net.InetAddress hashNameToAddress(java.lang.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 java.net.InetAddress hashNameToMulticastAddress(java.lang.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 java.util.Iterator<java.net.NetworkInterface> getClusterableInterfaces()
                                                                              throws java.net.SocketException
Find all network interfaces on the host that are suitable for clustering via multicast

Returns:
An iterator of suitable NetworkInterfaces
Throws:
java.net.SocketException

isLoopbackInterface

public static boolean isLoopbackInterface(java.net.NetworkInterface iface)


Copyright © 2003-2014 Atlassian. All Rights Reserved.