Package org.apache.helix.lock

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


      LOG.error("participant config cannot be null");
      return false;
    }
    HelixLock lock =
        _lockProvider.getLock(_clusterId, Scope.participant(participantConfig.getId()));
    boolean locked = lock.lock();
    if (locked) {
      try {
        return _participantAccessor.setParticipant(participantConfig);
      } finally {
        lock.unlock();
View Full Code Here


  @Override
  public ParticipantConfig updateParticipant(ParticipantId participantId,
      ParticipantConfig.Delta participantDelta) {
    HelixLock lock = _lockProvider.getLock(_clusterId, Scope.participant(participantId));
    boolean locked = lock.lock();
    if (locked) {
      try {
        return _participantAccessor.updateParticipant(participantId, participantDelta);
      } finally {
        lock.unlock();
View Full Code Here

  }

  @Override
  boolean dropParticipant(ParticipantId participantId) {
    HelixLock lock = _lockProvider.getLock(_clusterId, Scope.participant(participantId));
    boolean locked = lock.lock();
    if (locked) {
      try {
        return _participantAccessor.dropParticipant(participantId);
      } finally {
        lock.unlock();
View Full Code Here

  @Override
  public void insertMessagesToParticipant(ParticipantId participantId,
      Map<MessageId, Message> msgMap) {
    HelixLock lock = _lockProvider.getLock(_clusterId, Scope.participant(participantId));
    boolean locked = lock.lock();
    if (locked) {
      try {
        _participantAccessor.insertMessagesToParticipant(participantId, msgMap);
      } finally {
        lock.unlock();
View Full Code Here

  }

  @Override
  public void updateMessageStatus(ParticipantId participantId, Map<MessageId, Message> msgMap) {
    HelixLock lock = _lockProvider.getLock(_clusterId, Scope.participant(participantId));
    boolean locked = lock.lock();
    if (locked) {
      try {
        _participantAccessor.updateMessageStatus(participantId, msgMap);
      } finally {
        lock.unlock();
View Full Code Here

  }

  @Override
  public void deleteMessagesFromParticipant(ParticipantId participantId, Set<MessageId> msgIdSet) {
    HelixLock lock = _lockProvider.getLock(_clusterId, Scope.participant(participantId));
    boolean locked = lock.lock();
    if (locked) {
      try {
        _participantAccessor.deleteMessagesFromParticipant(participantId, msgIdSet);
      } finally {
        lock.unlock();
View Full Code Here

  }

  @Override
  public void initParticipantStructure(ParticipantId participantId) {
    HelixLock lock = _lockProvider.getLock(_clusterId, Scope.participant(participantId));
    boolean locked = lock.lock();
    if (locked) {
      try {
        _participantAccessor.initParticipantStructure(participantId);
      } finally {
        lock.unlock();
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.