|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.ha.timestamp.TimestampDiscrepancyValidationService
public class TimestampDiscrepancyValidationService
Logs a WARN or ERROR when it determines that this node's system clock is out
of sync with another node by more than a
configurable amount
. Whether
a WARN or ERROR is logged is configurable
.
Field Summary | |
---|---|
static long |
DEFAULT_MAX_DISCREPANCY
Default value for property maxDiscrepancy |
Constructor Summary | |
---|---|
TimestampDiscrepancyValidationService()
|
Method Summary | |
---|---|
boolean |
canRemoveDeadEntry(org.jboss.ha.framework.interfaces.ClusterNode dead,
long lastChecked)
Callback allowing the observer to veto the removal by the TimestampDiscrepancyService of discrepancy data for a
node that is no longer active in the cluster. |
long |
getMaxDiscrepancy()
Gets the maximum allowed potential discrepancy, in ms, between another server's clock and this server's clock. |
TimestampDiscrepancyService |
getTimestampDiscrepancyService()
|
boolean |
getUseErrorLogging()
Gets whether this object will log at ERROR level instead of WARN. |
void |
setMaxDiscrepancy(long maxDiscrepancy)
|
void |
setTimestampDiscrepancyService(TimestampDiscrepancyService service)
|
void |
setUseErrorLogging(boolean useErrorLogging)
Sets whether this object will log at ERROR level instead of WARN. |
void |
start()
|
void |
stop()
|
void |
timestampDiscrepancyChanged(org.jboss.ha.framework.interfaces.ClusterNode node,
TimestampDiscrepancy discrepancy)
Notification from TimestampDiscrepancyService when it has
changed the TimestampDiscrepancy associated with a particular
node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long DEFAULT_MAX_DISCREPANCY
maxDiscrepancy
Constructor Detail |
---|
public TimestampDiscrepancyValidationService()
Method Detail |
---|
public TimestampDiscrepancyService getTimestampDiscrepancyService()
public void setTimestampDiscrepancyService(TimestampDiscrepancyService service)
public long getMaxDiscrepancy()
DEFAULT_MAX_DISCREPANCY
.
The potential discrepancy is the larger of the absolute value of
TimestampDiscrepancy.getMinDiscrepancy()
and the absolute value of
TimestampDiscrepancy.getMaxDiscrepancy()
.
public void setMaxDiscrepancy(long maxDiscrepancy)
public boolean getUseErrorLogging()
true
if ERROR logging will be used.public void setUseErrorLogging(boolean useErrorLogging)
useErrorLogging
- true
if ERROR logging should be used.public void start()
public void stop()
public boolean canRemoveDeadEntry(org.jboss.ha.framework.interfaces.ClusterNode dead, long lastChecked)
TimestampDiscrepancyObserver
TimestampDiscrepancyService
of discrepancy data for a
node that is no longer active in the cluster. Allows the observer to
request that data for historically relevant nodes be retained.
canRemoveDeadEntry
in interface TimestampDiscrepancyObserver
dead
- the nodelastChecked
- the time (in ms since the epoch) the caller was
last able to obtain timestamp information from the
caller
true
if the data can be removed, false
if it must be retained.public void timestampDiscrepancyChanged(org.jboss.ha.framework.interfaces.ClusterNode node, TimestampDiscrepancy discrepancy)
TimestampDiscrepancyObserver
TimestampDiscrepancyService
when it has
changed the TimestampDiscrepancy
associated with a particular
node.
timestampDiscrepancyChanged
in interface TimestampDiscrepancyObserver
node
- the nodediscrepancy
- the new discrepancy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |