public class RemoteQueueInfo extends Object implements Comparable<RemoteQueueInfo>
| Modifier and Type | Class and Description |
|---|---|
static class |
RemoteQueueInfo.Entry |
static class |
RemoteQueueInfo.Event |
| Modifier and Type | Field and Description |
|---|---|
static int |
STATE_AVAILABLE |
static int |
STATE_NOT_AVAILABLE
all possible states of a RemoteQueue
|
static String[] |
STATES |
| Constructor and Description |
|---|
RemoteQueueInfo(String name,
int localAreaId) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears all internal data structures such as remote brokers and any
load balancer lists.
|
int |
compareTo(RemoteQueueInfo o) |
boolean |
equals(Object otherObject) |
List<com.cloudhopper.commons.util.LoadBalancedList.Node<String>> |
getFailoverList() |
int |
getFailoverSize()
Gets the total number of failover RemoteBrokers that can consume this queue.
|
long |
getLastStateChangedTime() |
int |
getLocalAreaId() |
String |
getName() |
String |
getNextRemoteBroker()
Gets the URL for the next RemoteBroker to send a request to.
|
List<com.cloudhopper.commons.util.LoadBalancedList.Node<String>> |
getPrimaryList() |
int |
getPrimarySize()
Gets the total number of primary RemoteBrokers that can consume this queue.
|
ConcurrentHashMap<String,RemoteQueueInfo.Entry> |
getRemoteBrokers() |
int |
getSize()
Gets the total number of RemoteBrokers (either primary or failover) that
can consume this queue.
|
int |
getState() |
int |
hashCode() |
boolean |
isAvailable() |
boolean |
isNotAvailable() |
RemoteQueueInfo.Event |
setRemoteBrokerWeight(RemoteBrokerInfo bi,
int weight)
Sets or adds the RemoteBroker and either updates or sets the weight
of it to the new value.
|
protected boolean |
setState(int value) |
String |
toString() |
public static final int STATE_NOT_AVAILABLE
public static final int STATE_AVAILABLE
public static final String[] STATES
public RemoteQueueInfo(String name, int localAreaId)
public void clear()
public String getName()
public int getLocalAreaId()
public ConcurrentHashMap<String,RemoteQueueInfo.Entry> getRemoteBrokers()
public int getSize()
public int getPrimarySize()
public List<com.cloudhopper.commons.util.LoadBalancedList.Node<String>> getPrimaryList()
public int getFailoverSize()
public List<com.cloudhopper.commons.util.LoadBalancedList.Node<String>> getFailoverList()
public String getNextRemoteBroker()
public RemoteQueueInfo.Event setRemoteBrokerWeight(RemoteBrokerInfo bi, int weight)
bi - The RemoteBroker we're setting the weight forweight - The new or updated weight of the broker. Setting to zero
removes the RemoteBroker from our internal structures.public int getState()
protected boolean setState(int value)
public long getLastStateChangedTime()
public boolean isAvailable()
public boolean isNotAvailable()
public int compareTo(RemoteQueueInfo o)
compareTo in interface Comparable<RemoteQueueInfo>Copyright © 2009-2014 Cloudhopper by Twitter. All Rights Reserved.