|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mobicents.tools.sip.balancer.DefaultBalancerAlgorithm
org.mobicents.tools.sip.balancer.PersistentConsistentHashBalancerAlgorithm
public class PersistentConsistentHashBalancerAlgorithm
Persistent Consistent Hash algorithm - see http://docs.google.com/present/view?id=dc5jp5vx_89cxdvtxcm Example algorithms section
| Field Summary | |
|---|---|
protected org.jboss.cache.Cache |
cache
|
protected java.lang.String |
httpAffinityKey
|
protected java.lang.String |
sipHeaderAffinityKey
|
| Fields inherited from class org.mobicents.tools.sip.balancer.DefaultBalancerAlgorithm |
|---|
properties |
| Constructor Summary | |
|---|---|
PersistentConsistentHashBalancerAlgorithm()
|
|
PersistentConsistentHashBalancerAlgorithm(java.lang.String headerName)
|
|
| Method Summary | |
|---|---|
protected int |
hashAffinityKeyword(java.lang.String keyword)
|
void |
init()
Lifecycle method. |
void |
modified(org.jboss.cache.notifications.event.Event event)
|
void |
nodeAdded(SIPNode node)
Notify the algorithm when a node is added. |
void |
nodeRemoved(SIPNode node)
Notifying the algorithm when a node is dead. |
SIPNode |
processExternalRequest(javax.sip.message.Request request)
When a request comes it is passed to the algorithm. |
SIPNode |
processHttpRequest(org.jboss.netty.handler.codec.http.HttpRequest request)
Handle HttpRequests here. |
void |
viewChanged(org.jboss.cache.notifications.event.ViewChangedEvent event)
|
| Methods inherited from class org.mobicents.tools.sip.balancer.DefaultBalancerAlgorithm |
|---|
assignToNode, getBalancerContext, getProperties, jvmRouteSwitchover, processAssignedExternalRequest, processExternalResponse, processInternalRequest, processInternalResponse, setProperties, start, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String sipHeaderAffinityKey
protected java.lang.String httpAffinityKey
protected org.jboss.cache.Cache cache
| Constructor Detail |
|---|
public PersistentConsistentHashBalancerAlgorithm()
public PersistentConsistentHashBalancerAlgorithm(java.lang.String headerName)
| Method Detail |
|---|
public SIPNode processExternalRequest(javax.sip.message.Request request)
BalancerAlgorithm
public void modified(org.jboss.cache.notifications.event.Event event)
public void nodeAdded(SIPNode node)
BalancerAlgorithm
nodeAdded in interface BalancerAlgorithmnodeAdded in class DefaultBalancerAlgorithmpublic void nodeRemoved(SIPNode node)
BalancerAlgorithm
nodeRemoved in interface BalancerAlgorithmnodeRemoved in class DefaultBalancerAlgorithmpublic SIPNode processHttpRequest(org.jboss.netty.handler.codec.http.HttpRequest request)
BalancerAlgorithm
processHttpRequest in interface BalancerAlgorithmprocessHttpRequest in class DefaultBalancerAlgorithmprotected int hashAffinityKeyword(java.lang.String keyword)
public void viewChanged(org.jboss.cache.notifications.event.ViewChangedEvent event)
public void init()
BalancerAlgorithm
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||