Package sk.iway.iwcm.system.cluster
Class ClusterRefresher
java.lang.Object
java.util.TimerTask
sk.iway.iwcm.system.cluster.ClusterRefresher
- All Implemented Interfaces:
Runnable
ClusterRefresher.java
objekt pravidelne kontrolujuci databazu clustra pre obnovu dat
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionKonstruktor, ak je nastavene clusterNames tak inicializuje Timer task -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic intIf clusterNames is set to "auto", returns a random delay in milliseconds up to the value of clusterAutoRandomDelay constant, otherwise returns 0.voidrun()Kontrola aktualizacii objektovMethods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
-
Field Details
-
THREAD_NAME
- See Also:
-
-
Constructor Details
-
ClusterRefresher
public ClusterRefresher()Konstruktor, ak je nastavene clusterNames tak inicializuje Timer task
-
-
Method Details
-
getAutoModeRandomDelay
public static int getAutoModeRandomDelay()If clusterNames is set to "auto", returns a random delay in milliseconds up to the value of clusterAutoRandomDelay constant, otherwise returns 0. This method is used to add a random delay to the start of tasks to reduce the risk of DB deadlocks by spreading out the execution across nodes.- Returns:
-
run
public void run()Kontrola aktualizacii objektov -
cancelTask
public void cancelTask()
-