Package org.apache.helix.lock

Examples of org.apache.helix.lock.HelixLock.unlock()


    boolean locked = lock.lock();
    if (locked) {
      try {
        return _clusterAccessor.readResource(resourceId);
      } finally {
        lock.unlock();
      }
    }
    return null;
  }
View Full Code Here


    boolean locked = lock.lock();
    if (locked) {
      try {
        return _clusterAccessor.updateResource(resourceId, resourceDelta);
      } finally {
        lock.unlock();
      }
    }
    return null;
  }
}
View Full Code Here

    boolean locked = lock.lock();
    if (locked) {
      try {
        return _resourceAccessor.readResource(resourceId);
      } finally {
        lock.unlock();
      }
    }
    return null;
  }
View Full Code Here

    boolean locked = lock.lock();
    if (locked) {
      try {
        return _resourceAccessor.updateResource(resourceId, resourceDelta);
      } finally {
        lock.unlock();
      }
    }
    return null;
  }
View Full Code Here

    boolean locked = lock.lock();
    if (locked) {
      try {
        return _resourceAccessor.setRebalancerContext(resourceId, context);
      } finally {
        lock.unlock();
      }
    }
    return false;
  }
View Full Code Here

    boolean locked = lock.lock();
    if (locked) {
      try {
        return _resourceAccessor.setResource(resourceConfig);
      } finally {
        lock.unlock();
      }
    }
    return false;
  }
View Full Code Here

    if (locked) {
      try {
        return _resourceAccessor.generateDefaultAssignment(resourceId, replicaCount,
            participantGroupTag);
      } finally {
        lock.unlock();
      }
    }
    return false;
  }
View Full Code Here

    boolean locked = lock.lock();
    if (locked) {
      try {
        return _clusterAccessor.createCluster(cluster);
      } finally {
        lock.unlock();
      }
    }
    return false;
  }
View Full Code Here

    boolean locked = lock.lock();
    if (locked) {
      try {
        return _clusterAccessor.dropCluster();
      } finally {
        lock.unlock();
      }
    }
    return false;
  }
View Full Code Here

    boolean locked = lock.lock();
    if (locked) {
      try {
        return _clusterAccessor.readCluster();
      } finally {
        lock.unlock();
      }
    }
    return null;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.