Module com.aoapps.appcluster.csync2
Package com.aoapps.appcluster.csync2
Class Csync2ResourceSynchronizer
java.lang.Object
com.aoapps.appcluster.ResourceSynchronizer<Csync2Resource,Csync2ResourceNode>
com.aoapps.appcluster.CronResourceSynchronizer<Csync2Resource,Csync2ResourceNode>
com.aoapps.appcluster.csync2.Csync2ResourceSynchronizer
public class Csync2ResourceSynchronizer
extends CronResourceSynchronizer<Csync2Resource,Csync2ResourceNode>
Performs synchronization using csync2.
- Author:
- AO Industries, Inc.
-
Field Summary
Fields inherited from class com.aoapps.appcluster.ResourceSynchronizer
localResourceNode, remoteResourceNode
-
Constructor Summary
ModifierConstructorDescriptionprotected
Csync2ResourceSynchronizer
(Csync2ResourceNode localResourceNode, Csync2ResourceNode remoteResourceNode, Schedule synchronizeSchedule, Schedule testSchedule) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canSynchronize
(ResourceSynchronizationMode mode, ResourceNodeDnsResult localDnsResult, ResourceNodeDnsResult remoteDnsResult) protected ResourceSynchronizationResult
synchronize
(ResourceSynchronizationMode mode, ResourceNodeDnsResult localDnsResult, ResourceNodeDnsResult remoteDnsResult) For synchronize: First run csync2 -G GROUPS -P REMOTE_NODE -xv Must exit 0 For test: First run csync2 -G GROUPS -cr / Must exit 0 Then run csync2 -G GROUPS -T LOCAL_NODE REMOTE_NODE Exit 0 means warning Exit 2 means everything is OK Other exit means errorMethods inherited from class com.aoapps.appcluster.CronResourceSynchronizer
canSynchronizeNow, getCanSynchronizeNow, getCanTestNow, getLastResult, getState, getStateMessage, getSynchronizeSchedule, getTestSchedule, start, stop, synchronizeNow
Methods inherited from class com.aoapps.appcluster.ResourceSynchronizer
getLocalResourceNode, getRemoteResourceNode, getResultStatus, toString
-
Constructor Details
-
Csync2ResourceSynchronizer
protected Csync2ResourceSynchronizer(Csync2ResourceNode localResourceNode, Csync2ResourceNode remoteResourceNode, Schedule synchronizeSchedule, Schedule testSchedule)
-
-
Method Details
-
canSynchronize
protected boolean canSynchronize(ResourceSynchronizationMode mode, ResourceNodeDnsResult localDnsResult, ResourceNodeDnsResult remoteDnsResult) - Specified by:
canSynchronize
in classCronResourceSynchronizer<Csync2Resource,
Csync2ResourceNode>
-
synchronize
protected ResourceSynchronizationResult synchronize(ResourceSynchronizationMode mode, ResourceNodeDnsResult localDnsResult, ResourceNodeDnsResult remoteDnsResult) - For synchronize: First run csync2 -G GROUPS -P REMOTE_NODE -xv Must exit 0 For test: First run csync2 -G GROUPS -cr / Must exit 0
- Then run csync2 -G GROUPS -T LOCAL_NODE REMOTE_NODE Exit 0 means warning Exit 2 means everything is OK Other exit means error
- Specified by:
synchronize
in classCronResourceSynchronizer<Csync2Resource,
Csync2ResourceNode>
-