|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.ha.timestamp.TimestampDiscrepancyService
public class TimestampDiscrepancyService
Service that tracks TimestampDiscrepancy
information for current
and past members of the cluster.
Discrepancy information is not persisted, so no knowledge of past members is retained across a cluster restart.
Nested Class Summary | |
---|---|
static class |
TimestampDiscrepancyService.RemoteDiscrepancies
|
class |
TimestampDiscrepancyService.RpcHandler
Object we register with the HAPartition |
static class |
TimestampDiscrepancyService.Server
|
static class |
TimestampDiscrepancyService.TimestampResponse
|
Constructor Summary | |
---|---|
TimestampDiscrepancyService()
|
Method Summary | |
---|---|
long |
getLastPurge()
Gets the time of the last attempt to purge non-active members from the @{link discrepancies map . |
long |
getLastStatusCheck()
Gets the time of the last request to the cluster for timestamps. |
int |
getMaxDeadServers()
Gets the maximum number of records for non-active servers we'll retain in our @{link discrepancies map
after which we can attempt to remove non-active servers who we heard
from less recently than getMinDeadServerTime() . |
long |
getMinDeadServerTime()
Gets the minimum period of time since last checking with the server that we'll retain a non-active server in our |
long |
getMinPurgeFrequency()
Gets the minimum period between attempts to purge non-active members from the @{link discrepancies map . |
long |
getMinStatusCheckFrequency()
Gets the minimum period between periodic status checks. |
org.jboss.ha.framework.interfaces.HAPartition |
getPartition()
|
String |
getServiceHAName()
Gets the name under which we register ourself with the HAPartition. |
Map<org.jboss.ha.framework.interfaces.ClusterNode,TimestampDiscrepancy> |
getTimestampDiscrepancies(boolean allowStatusCheck)
Gets the map of TimestampDiscrepancy data tracked by this service. |
TimestampDiscrepancy |
getTimestampDiscrepancy(org.jboss.ha.framework.interfaces.ClusterNode node,
boolean allowStatusCheck)
Gets the TimestampDiscrepancy data associated with a particular node. |
TimestampDiscrepancy |
getTimestampDiscrepancy(String nodeName,
boolean allowStatusCheck)
Gets the TimestampDiscrepancy data associated with a particular node. |
boolean |
isServerActive(org.jboss.ha.framework.interfaces.ClusterNode node)
Gets whether the particular node is one of the servers this service regards as active (i.e. |
boolean |
isStatusCheckRequired()
Gets whether an event has occurred (e.g. |
void |
registerObserver(TimestampDiscrepancyObserver observer)
Register a TimestampDiscrepancyObserver with this service. |
void |
setKernelControllerContext(org.jboss.kernel.spi.dependency.KernelControllerContext context)
Registers the context name as the serviceHAName
if it is not already set. |
void |
setMaxDeadServers(int maxDeadServers)
|
void |
setMinDeadServerTime(long minDeadServerTime)
|
void |
setMinPurgeFrequency(long minPurgeFrequency)
|
void |
setMinStatusCheckFrequency(long minStatusCheckFrequency)
|
void |
setPartition(org.jboss.ha.framework.interfaces.HAPartition partition)
|
void |
setServiceHAName(String serviceHAName)
Sets the name under which we register ourself with the HAPartition. |
void |
setThreadPool(org.jboss.util.threadpool.ThreadPool threadPool)
Injects a thread pool for use in dispatching asynchronous tasks. |
void |
start()
Bring the service into active operation. |
void |
stop()
Remove the service from active operation. |
void |
unregisterObserver(TimestampDiscrepancyObserver observer)
Unregister a TimestampDiscrepancyObserver with this service. |
void |
unsetKernelControllerContext(org.jboss.kernel.spi.dependency.KernelControllerContext context)
This implementation is a no-op. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TimestampDiscrepancyService()
Method Detail |
---|
public org.jboss.ha.framework.interfaces.HAPartition getPartition()
public void setPartition(org.jboss.ha.framework.interfaces.HAPartition partition)
public String getServiceHAName()
public void setServiceHAName(String serviceHAName)
serviceHAName
- the namepublic int getMaxDeadServers()
discrepancies map
after which we can attempt to remove non-active servers who we heard
from less recently than getMinDeadServerTime()
.
An active server is one that is include in the most recent
view propagated by the
HAPartition's DRM
.
public void setMaxDeadServers(int maxDeadServers)
public long getMinDeadServerTime()
getMaxDeadServers()
public void setMinDeadServerTime(long minDeadServerTime)
public long getMinStatusCheckFrequency()
TimestampDiscrepancy
for that server.
A status check can occur more frequently than this value if the service determines it is necessary, for example following a view change.
The default value is 20 minutes.
public void setMinStatusCheckFrequency(long minStatusCheckFrequency)
public long getMinPurgeFrequency()
discrepancies map
.
Default is one hour
getMaxDeadServers()
,
getMinDeadServerTime()
public void setMinPurgeFrequency(long minPurgeFrequency)
public long getLastStatusCheck()
public boolean isStatusCheckRequired()
true
if a check is requiredpublic long getLastPurge()
discrepancies map
.
public void setThreadPool(org.jboss.util.threadpool.ThreadPool threadPool)
Asynchronous tasks are generally associated with view changes.
threadPool
- the thread poolpublic Map<org.jboss.ha.framework.interfaces.ClusterNode,TimestampDiscrepancy> getTimestampDiscrepancies(boolean allowStatusCheck)
allowStatusCheck
- is calling into the cluster to update the
discrepancies map before returning allowed?
null
public TimestampDiscrepancy getTimestampDiscrepancy(org.jboss.ha.framework.interfaces.ClusterNode node, boolean allowStatusCheck)
node
- the nodeallowStatusCheck
- is calling into the cluster to update the
discrepancies map before returning allowed?
null
if no data
for node
is stored.public TimestampDiscrepancy getTimestampDiscrepancy(String nodeName, boolean allowStatusCheck)
node
- the name of the nodeallowStatusCheck
- is calling into the cluster to update the
discrepancies map before returning allowed?
null
if no data
for node
is stored.public boolean isServerActive(org.jboss.ha.framework.interfaces.ClusterNode node)
node
- the node
true
if the node is active, false otherwisepublic void start() throws Exception
Exception
public void stop() throws Exception
Exception
public void registerObserver(TimestampDiscrepancyObserver observer)
TimestampDiscrepancyObserver
with this service.
observer
- the observerpublic void unregisterObserver(TimestampDiscrepancyObserver observer)
TimestampDiscrepancyObserver
with this service.
observer
- the observerpublic void setKernelControllerContext(org.jboss.kernel.spi.dependency.KernelControllerContext context) throws Exception
serviceHAName
if it is not already set.
setKernelControllerContext
in interface org.jboss.kernel.spi.dependency.KernelControllerContextAware
Exception
public void unsetKernelControllerContext(org.jboss.kernel.spi.dependency.KernelControllerContext context) throws Exception
unsetKernelControllerContext
in interface org.jboss.kernel.spi.dependency.KernelControllerContextAware
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |