public class LoadManager
extends java.lang.Object
implements java.util.Comparator<java.lang.String>
Modifier and Type | Field and Description |
---|---|
static int |
LM_LOAD |
static int |
LM_NODE |
static int |
LOAD_COUNT |
static int |
LOAD_OID |
static int |
LOAD_PID |
static int |
LOAD_SIZE |
static int |
LOAD_STATUS |
static int |
LOAD_TIME |
static int |
LOAD_TYPE |
static int |
LOAD_WEIGHT |
static int |
NODE_COUNT |
static int |
NODE_GID |
static int |
NODE_MAX |
static int |
NODE_OPTION |
static int |
NODE_SIZE |
static int |
NODE_STATUS |
static int |
NODE_TIME |
static int |
NODE_WEIGHT |
static int |
TYPE_NONE |
static int |
TYPE_PREFERRED |
static int |
TYPE_STICKY |
Constructor and Description |
---|
LoadManager(java.lang.String name,
int capacity) |
Modifier and Type | Method and Description |
---|---|
int |
add(java.lang.String key,
int type,
int weight,
java.lang.String patternStr)
returns the id of the load upon success or -1 otherwise
|
int |
addNode(java.lang.String key,
int gid,
long max,
java.lang.Object obj)
returns id for the node upon success or -1 otherwise
|
Browser |
browser()
returns a Browser for all node IDs in the natural order
|
void |
clear() |
int |
compare(java.lang.String a,
java.lang.String b) |
java.lang.Object |
get(int id,
int type) |
int |
getCapacity() |
int |
getID(java.lang.String key,
int type) |
java.lang.String[] |
getList(int id)
returns the sorted key list of all loads assigned to the node of id
|
long |
getMTime() |
java.lang.String |
getName() |
java.lang.String |
getName(int id,
int type) |
int |
getNodeId(int id)
returns the node ID for the specified load of id
|
long |
getNorm() |
int |
getSize(int type)
returns the site of the specified type
|
int |
getStatus(int id,
int type)
returns the status for the specified load of id
|
int |
remove(java.lang.String key)
returns the id of the load upon success or -1 otherwise
|
int[] |
removeNode(java.lang.String key)
returns an array containing unassigned work loads on the node
|
void |
setStatus(int id,
int status)
sets the status for the specified load of id
|
public static final int LOAD_OID
public static final int LOAD_PID
public static final int LOAD_TYPE
public static final int LOAD_WEIGHT
public static final int LOAD_STATUS
public static final int LOAD_SIZE
public static final int LOAD_COUNT
public static final int LOAD_TIME
public static final int NODE_GID
public static final int NODE_WEIGHT
public static final int NODE_MAX
public static final int NODE_STATUS
public static final int NODE_SIZE
public static final int NODE_COUNT
public static final int NODE_OPTION
public static final int NODE_TIME
public static final int LM_NODE
public static final int LM_LOAD
public static final int TYPE_NONE
public static final int TYPE_STICKY
public static final int TYPE_PREFERRED
public int addNode(java.lang.String key, int gid, long max, java.lang.Object obj)
public int[] removeNode(java.lang.String key)
public int add(java.lang.String key, int type, int weight, java.lang.String patternStr)
public int remove(java.lang.String key)
public int getSize(int type)
public int getStatus(int id, int type)
public void setStatus(int id, int status)
public int getID(java.lang.String key, int type)
public java.lang.Object get(int id, int type)
public int getNodeId(int id)
public java.lang.String[] getList(int id)
public java.lang.String getName(int id, int type)
public java.lang.String getName()
public int getCapacity()
public long getNorm()
public long getMTime()
public int compare(java.lang.String a, java.lang.String b)
compare
in interface java.util.Comparator<java.lang.String>
public Browser browser()
public void clear()