public abstract class Node extends java.lang.Object implements MessageNode
| Modifier and Type | Field and Description |
|---|---|
protected AssetList |
assetList |
protected int |
bufferSize |
protected java.lang.reflect.Method |
callbackMethod |
protected int |
capacity |
protected XQCallbackWrapper |
cbw |
protected CollectibleCells |
cells |
protected AssetList |
cfgList |
protected int |
chkptExpiration |
protected int |
debug |
protected static int |
DEBUG_COLL |
protected static int |
DEBUG_DIFF |
protected static int |
DEBUG_FBAK |
protected static int |
DEBUG_INIT |
protected static int |
DEBUG_PASS |
protected static int |
DEBUG_PROP |
protected static int |
DEBUG_REPT |
protected static int |
DEBUG_UPDT |
protected int |
displayMask |
protected java.lang.String[] |
displayPropertyName |
protected java.lang.String |
linkName |
protected static int |
LOAD_HIGH |
protected static int |
LOAD_LOW |
protected static int |
LOAD_MEDIUM |
protected AssetList |
msgList |
protected java.lang.String |
name |
protected java.lang.String |
operation |
protected static int |
RESET_ALL |
protected static int |
RESET_MAP |
protected static int |
RESET_NONE |
protected static int |
RESET_SOME |
protected AssetList |
ruleList |
protected int |
status |
protected static int |
TYPE_ACTION |
protected static int |
TYPE_AGGREGATE |
protected static int |
TYPE_BYPASS |
protected static int |
TYPE_CACHE |
protected static int |
TYPE_COLLECT |
protected static int |
TYPE_DELIVER |
protected static int |
TYPE_FORMAT |
protected static int |
TYPE_JSONPATH |
protected static int |
TYPE_JSONT |
protected static int |
TYPE_MAPREDUCE |
protected static int |
TYPE_NONE |
protected static int |
TYPE_PARSER |
protected static int |
TYPE_PICKUP |
protected static int |
TYPE_PIPE |
protected static int |
TYPE_PUBLISH |
protected static int |
TYPE_ROUNDROBIN |
protected static int |
TYPE_SCREEN |
protected static int |
TYPE_SCRIPT |
protected static int |
TYPE_SERVICE |
protected static int |
TYPE_SORT |
protected static int |
TYPE_SPLIT |
protected static int |
TYPE_SPREAD |
protected static int |
TYPE_WEIGHTED |
protected static int |
TYPE_XPATH |
protected static int |
TYPE_XSLT |
protected long |
waitTime |
protected int |
xaMode |
ASSET_THR, ASSET_URI, ASSET_XQ, META_MAP, META_MSG, META_OUT, META_RULE, META_XQ, MSG_BID, MSG_CID, MSG_OID, MSG_RID, MSG_TID, MSG_TIME, NODE_CLOSED, NODE_DISABLED, NODE_PAUSE, NODE_READY, NODE_RETRYING, NODE_RUNNING, NODE_STANDBY, NODE_STOPPED, OUT_CAPACITY, OUT_COUNT, OUT_DEQ, OUT_EXTRA, OUT_LENGTH, OUT_MODE, OUT_NRULE, OUT_OFFSET, OUT_ORULE, OUT_QDEPTH, OUT_QIPPS, OUT_QSTATUS, OUT_QTIME, OUT_SIZE, OUT_STATUS, OUT_TIME, RULE_COUNT, RULE_DMASK, RULE_EXTRA, RULE_GID, RULE_MODE, RULE_OID, RULE_OPTION, RULE_PEND, RULE_PID, RULE_SIZE, RULE_STATUS, RULE_TIME, RULE_TTL| Constructor and Description |
|---|
Node(java.util.Map props) |
| Modifier and Type | Method and Description |
|---|---|
int |
addRule(java.util.Map ph)
It adds a new rule to the ruleList and returns its id upon success.
|
void |
callback(java.lang.String key,
java.lang.String id)
It marks the cell in cells with key and id.
|
java.util.Map<java.lang.String,java.lang.Object> |
checkpoint()
It returns the checkpoint map for current state
|
void |
close()
It closes all resources and cleans up all list, cache, metadata, etc.
|
protected int |
collectAll(long currentTime,
XQueue in,
XQueue out,
int oid,
long[] outInfo)
It collects all the delivered messages in the given xq and returns the
total number of collected upon success.
|
boolean |
containsRule(java.lang.String key)
returns true if the rule exists or false otherwise
|
boolean |
containsXQ(java.lang.String key)
returns true if the node has the outlink
|
protected int |
feedback(XQueue in,
long milliSec)
It returns the number of done messages removed from the input XQueue.
|
protected void |
finalize() |
protected int |
forcethru(long currentTime,
javax.jms.Message msg,
XQueue in,
int rid,
int oid,
int cid)
It forces to route the msg to oid without putback.
|
int |
getCapacity()
returns the capacity of the uplink
|
int |
getCapacity(int i)
returns the capacity of the i-th outlink
|
int |
getDebugMode()
returns the debug mode of the node
|
int |
getDisplayMask()
returns the displayMask of the node
|
java.lang.String[] |
getDisplayProperties()
gets the display property names of the node
|
java.lang.String |
getLinkName()
returns the name of the uplink
|
java.lang.String |
getLinkName(int i)
returns the name of the i-th outlink
|
int |
getMetaData(int type,
int id,
long[] data)
copies certain type of MetaData from its id-th instance to the buffer
and returns the real id of the instance , or -1 on failure.
|
java.lang.String |
getName()
returns the name of the node
|
int |
getNumberOfOutLinks()
returns the total number of outlinks
|
int |
getNumberOfRules()
returns the total number of RuleSets
|
java.lang.String |
getOperation()
returns the string of the operation
|
int |
getOutLinkBoundary()
returns -1 since there is no outlinks for collectibles by default
|
java.lang.String |
getRuleName(int i)
returns the name of the i-th RuleSet
|
int |
getStatus()
returns the status of the node
|
int |
getXAMode()
returns the transaction mode of the uplink
|
int |
getXAMode(int i)
returns the transaction mode of the i-th outlink
|
protected abstract java.util.Map |
initRuleset(long t,
java.util.Map ph,
long[] ruleInfo)
It initializes a new ruleset with the ruleInfo and returns the rule upon
success.
|
boolean |
internalXQSupported()
returns true if the node supports internal XQueues for outlinks
|
java.util.Map<java.lang.String,java.lang.String> |
list(java.lang.String key,
int type)
lists all NEW messages in a specific outlink named by the key and
returns a Map or null if it is not defined
|
java.util.Map<java.lang.String,java.lang.String> |
listPendings(XQueue xq,
int type)
lists all propagating and pending messages of the node in the uplink
and returns a Map or null if it is not defined
|
protected int |
passthru(long currentTime,
javax.jms.Message msg,
XQueue in,
int rid,
int oid,
int cid,
int tid)
It passes the message from the input XQueue over to an output XQueue and
returns 1 upon success or 0 otherwise.
|
abstract void |
propagate(XQueue in,
XQueue[] out)
It picks up messages from the input XQueue and evaluates their content
to decide which output XQueues to propagate.
|
int |
refreshRule(java.lang.String key,
XQueue in)
It refrshes the group of dynamic template rules or external rules for
a key and returns the number of rules refreshed upon success.
|
int |
removeRule(java.lang.String key,
XQueue in)
It removes the rule from the ruleList and returns the rule id upon
success.
|
int |
renameRule(java.lang.String oldkey,
java.lang.String key)
It renames the rule and returns the rule id.
|
int |
replaceRule(java.lang.String key,
java.util.Map ph,
XQueue in)
It replaces the rule with the new rule defined by the property hashmap
and returns its id upon success.
|
void |
resetMetaData(XQueue in,
XQueue[] out)
It cleans up MetaData for all XQueues and messages.
|
void |
restore(java.util.Map<java.lang.String,java.lang.Object> chkpt)
It restores the state from a checkpointed map
|
int |
rotateRule(java.lang.String key)
It moves the rule to the end of the list and returns the id.
|
void |
setDebugMode(int debug)
sets the debug mode of the node
|
void |
setDisplayMask(int mask)
sets the displayMask of the node
|
void |
setDisplayProperties(java.lang.String[] keys)
sets the display property names of the node
|
void |
setStatus(int status)
sets the status of the node
|
java.lang.String |
show(java.lang.String key,
int id,
int type)
browses the message at the id-th cell from the given outlink and
returns the detail text in the given format type
|
javax.jms.Message |
takeback(java.lang.String key,
int id)
removes the message at the id-th cell from the given outlink and
returns the message upon success
|
protected boolean |
takebackEnabled() |
int |
updateParameters(java.util.Map ph)
It updates the parameters of the node with the given property map.
|
protected java.lang.String name
protected java.lang.String operation
protected java.lang.String linkName
protected int xaMode
protected int capacity
protected int displayMask
protected int debug
protected int status
protected int bufferSize
protected int chkptExpiration
protected long waitTime
protected java.lang.String[] displayPropertyName
protected AssetList msgList
protected AssetList assetList
protected AssetList ruleList
protected AssetList cfgList
protected CollectibleCells cells
protected XQCallbackWrapper cbw
protected java.lang.reflect.Method callbackMethod
protected static final int DEBUG_INIT
protected static final int DEBUG_REPT
protected static final int DEBUG_PROP
protected static final int DEBUG_UPDT
protected static final int DEBUG_COLL
protected static final int DEBUG_PASS
protected static final int DEBUG_FBAK
protected static final int DEBUG_DIFF
protected static final int TYPE_NONE
protected static final int TYPE_ROUNDROBIN
protected static final int TYPE_WEIGHTED
protected static final int TYPE_BYPASS
protected static final int TYPE_SCREEN
protected static final int TYPE_AGGREGATE
protected static final int TYPE_PARSER
protected static final int TYPE_XSLT
protected static final int TYPE_COLLECT
protected static final int TYPE_SPLIT
protected static final int TYPE_FORMAT
protected static final int TYPE_DELIVER
protected static final int TYPE_SORT
protected static final int TYPE_ACTION
protected static final int TYPE_XPATH
protected static final int TYPE_PICKUP
protected static final int TYPE_SPREAD
protected static final int TYPE_CACHE
protected static final int TYPE_PUBLISH
protected static final int TYPE_SERVICE
protected static final int TYPE_PIPE
protected static final int TYPE_JSONPATH
protected static final int TYPE_JSONT
protected static final int TYPE_MAPREDUCE
protected static final int TYPE_SCRIPT
protected static final int LOAD_LOW
protected static final int LOAD_MEDIUM
protected static final int LOAD_HIGH
protected static final int RESET_NONE
protected static final int RESET_SOME
protected static final int RESET_ALL
protected static final int RESET_MAP
protected abstract java.util.Map initRuleset(long t,
java.util.Map ph,
long[] ruleInfo)
public abstract void propagate(XQueue in, XQueue[] out) throws javax.jms.JMSException
propagate in interface MessageNodejavax.jms.JMSExceptionprotected int passthru(long currentTime,
javax.jms.Message msg,
XQueue in,
int rid,
int oid,
int cid,
int tid)
protected int forcethru(long currentTime,
javax.jms.Message msg,
XQueue in,
int rid,
int oid,
int cid)
protected int feedback(XQueue in, long milliSec)
public void callback(java.lang.String key,
java.lang.String id)
protected int collectAll(long currentTime,
XQueue in,
XQueue out,
int oid,
long[] outInfo)
public int updateParameters(java.util.Map ph)
updateParameters in interface MessageNodepublic int addRule(java.util.Map ph)
addRule in interface MessageNodepublic int removeRule(java.lang.String key,
XQueue in)
removeRule in interface MessageNodepublic int replaceRule(java.lang.String key,
java.util.Map ph,
XQueue in)
replaceRule in interface MessageNodepublic int renameRule(java.lang.String oldkey,
java.lang.String key)
renameRule in interface MessageNodepublic int rotateRule(java.lang.String key)
rotateRule in interface MessageNodepublic int refreshRule(java.lang.String key,
XQueue in)
refreshRule in interface MessageNodepublic boolean containsRule(java.lang.String key)
MessageNodecontainsRule in interface MessageNodepublic java.lang.String getName()
MessageNodegetName in interface MessageNodepublic java.lang.String getOperation()
MessageNodegetOperation in interface MessageNodepublic java.lang.String getLinkName()
MessageNodegetLinkName in interface MessageNodepublic java.lang.String getLinkName(int i)
MessageNodegetLinkName in interface MessageNodepublic int getNumberOfOutLinks()
MessageNodegetNumberOfOutLinks in interface MessageNodepublic int getOutLinkBoundary()
getOutLinkBoundary in interface MessageNodepublic int getCapacity()
MessageNodegetCapacity in interface MessageNodepublic int getCapacity(int i)
MessageNodegetCapacity in interface MessageNodepublic int getXAMode()
MessageNodegetXAMode in interface MessageNodepublic int getXAMode(int i)
MessageNodegetXAMode in interface MessageNodepublic int getStatus()
MessageNodegetStatus in interface MessageNodepublic void setStatus(int status)
MessageNodesetStatus in interface MessageNodepublic java.lang.String getRuleName(int i)
MessageNodegetRuleName in interface MessageNodepublic int getNumberOfRules()
MessageNodegetNumberOfRules in interface MessageNodepublic int getDisplayMask()
MessageNodegetDisplayMask in interface MessageNodepublic void setDisplayMask(int mask)
MessageNodesetDisplayMask in interface MessageNodepublic int getDebugMode()
MessageNodegetDebugMode in interface MessageNodepublic void setDebugMode(int debug)
MessageNodesetDebugMode in interface MessageNodepublic java.lang.String[] getDisplayProperties()
MessageNodegetDisplayProperties in interface MessageNodepublic void setDisplayProperties(java.lang.String[] keys)
MessageNodesetDisplayProperties in interface MessageNodepublic int getMetaData(int type,
int id,
long[] data)
MessageNodegetMetaData in interface MessageNodepublic void resetMetaData(XQueue in, XQueue[] out)
resetMetaData in interface MessageNodepublic java.util.Map<java.lang.String,java.lang.Object> checkpoint()
checkpoint in interface MessageNodepublic void restore(java.util.Map<java.lang.String,java.lang.Object> chkpt)
restore in interface MessageNodepublic boolean containsXQ(java.lang.String key)
MessageNodecontainsXQ in interface MessageNodepublic boolean internalXQSupported()
MessageNodeinternalXQSupported in interface MessageNodeprotected boolean takebackEnabled()
public javax.jms.Message takeback(java.lang.String key,
int id)
MessageNodetakeback in interface MessageNodepublic void close()
close in interface MessageNodepublic java.lang.String show(java.lang.String key,
int id,
int type)
MessageNodeshow in interface MessageNodepublic java.util.Map<java.lang.String,java.lang.String> list(java.lang.String key,
int type)
list in interface MessageNodepublic java.util.Map<java.lang.String,java.lang.String> listPendings(XQueue xq, int type)
listPendings in interface MessageNodeprotected void finalize()
finalize in class java.lang.Object