Skip to content

Commit

Permalink
removed the EXTRACT constant. it doesn't really make sense for CORE s…
Browse files Browse the repository at this point in the history
…ymmetric
  • Loading branch information
chenson42 committed Dec 20, 2007
1 parent adcf7dc commit 7b76809
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 19 deletions.
Expand Up @@ -17,20 +17,26 @@
* License along with this library; if not, see
* <http://www.gnu.org/licenses/>.
*/

package org.jumpmind.symmetric.service;

import org.jumpmind.symmetric.model.Node;

public interface IClusterService {

public interface IClusterService
{

public void initLockTable();

public void initLockTableForNode(Node node);

public void initLockTable(LockAction action, String lockId);

public boolean lock(LockAction action, Node node);

public boolean lock(LockAction action);

public void unlock(LockAction action);


public void unlock(final LockAction action, final Node node);

}
Expand Up @@ -17,8 +17,10 @@
* License along with this library; if not, see
* <http://www.gnu.org/licenses/>.
*/

package org.jumpmind.symmetric.service;

public enum LockAction {
PUSH, PULL, PURGE, HEARTBEAT, SYNCTRIGGERS, EXTRACT, OTHER
public enum LockAction
{
PUSH, PULL, PURGE, HEARTBEAT, SYNCTRIGGERS, OTHER
}
Expand Up @@ -61,8 +61,6 @@ public class ClusterService extends AbstractService implements IClusterService

private boolean lockDuringSyncTriggers = false;

private boolean lockDuringExtract = false;

private INodeService nodeService;

public void initLockTable()
Expand All @@ -71,7 +69,6 @@ public void initLockTable()
initLockTableForNodes(nodeService.findNodesToPushTo());
initLockTable(LockAction.PURGE, COMMON_LOCK_ID);
initLockTable(LockAction.SYNCTRIGGERS, COMMON_LOCK_ID);
initLockTable(LockAction.EXTRACT, COMMON_LOCK_ID);
}

private void initLockTableForNodes(final List<Node> nodes)
Expand All @@ -89,7 +86,7 @@ public void initLockTableForNode(final Node node)
initLockTable(LockAction.HEARTBEAT, node.getNodeId());
}

private void initLockTable(final LockAction action, final String lockId)
public void initLockTable(final LockAction action, final String lockId)
{
try
{
Expand Down Expand Up @@ -166,8 +163,6 @@ private boolean isClusteringEnabled(final LockAction action)
return lockDuringHeartbeat;
case SYNCTRIGGERS:
return lockDuringSyncTriggers;
case EXTRACT:
return lockDuringExtract;
case OTHER:
return true;
default:
Expand Down Expand Up @@ -225,9 +220,4 @@ public void setLockDuringSyncTriggers(final boolean lockDuringSyncTriggers)
this.lockDuringSyncTriggers = lockDuringSyncTriggers;
}

public void setLockDuringExtract(final boolean lockDuringExtract)
{
this.lockDuringExtract = lockDuringExtract;
}

}
1 change: 0 additions & 1 deletion symmetric/src/main/resources/symmetric-default.properties
Expand Up @@ -82,7 +82,6 @@ symmetric.runtime.cluster.lock.during.pull=false
symmetric.runtime.cluster.lock.during.push=false
symmetric.runtime.cluster.lock.during.heartbeat=false
symmetric.runtime.cluster.lock.during.sync.triggers=false
symmetric.runtime.cluster.lock.during.extract=false

# Set this if the triggers need to be prefixed. This is useful when running two symmetric instances
# against the same database.
Expand Down
1 change: 0 additions & 1 deletion symmetric/src/main/resources/symmetric-services.xml
Expand Up @@ -628,7 +628,6 @@
<property name="lockDuringPull" value="${symmetric.runtime.cluster.lock.during.pull}" />
<property name="lockDuringPush" value="${symmetric.runtime.cluster.lock.during.push}" />
<property name="lockDuringHeartbeat" value="${symmetric.runtime.cluster.lock.during.heartbeat}" />
<property name="lockDuringExtract" value="${symmetric.runtime.cluster.lock.during.extract}" />
<property name="lockDuringSyncTriggers" value="${symmetric.runtime.cluster.lock.during.sync.triggers}" />
<property name="aquireLockSql">
<value>
Expand Down

0 comments on commit 7b76809

Please sign in to comment.