@@ -0,0 +1,887 @@
+package com.stratio.decision.clustering;%0A%0Aimport java.util.concurrent.TimeUnit;%0A%0Aimport org.apache.curator.framework.recipes.barriers.DistributedDoubleBarrier;%0A%0A/**%0A * Created by josepablofernandez on 2/02/16.%0A */%0Apublic class ClusterBarrierManager %7B%0A%0A    private ClusterSyncManager clusterSyncManagerInstance;%0A    private Long ackTimeout;%0A%0A    public ClusterBarrierManager(ClusterSyncManager clusterSyncManagerInstance, Long ackTimeOut)%7B%0A%0A        this.clusterSyncManagerInstance = clusterSyncManagerInstance;%0A        this.ackTimeout = ackTimeOut;%0A%0A    %7D%0A%0A    public Boolean manageAckBarrier(String barrierPath, Integer nodesExpected) throws Exception %7B%0A%0A        DistributedDoubleBarrier barrier = new DistributedDoubleBarrier(clusterSyncManagerInstance.getClient(), barrierPath,%0A                nodesExpected);%0A%0A        return barrier.enter(ackTimeout, TimeUnit.MILLISECONDS);%0A%0A    %7D%0A%7D%0A

add ClusterBarrierManager