Examples of tryLockExclusive()


Examples of com.splunk.shuttl.archiver.bucketlock.BucketLock.tryLockExclusive()

      throw new IllegalStateException("We must ensure that the"
          + " bucket archiver has a " + "lock to the bucket it will transfer");

    BucketLock transferLock = new BucketTransferLocker(
        LocalFileSystemPaths.create()).getLockForBucket(bucket);
    if (!transferLock.tryLockExclusive())
      throw new RuntimeException("Could not transfer bucket: " + bucket
          + ", because transfer lock was not accquired");

    return asList(bucketLock, transferLock);
  }
View Full Code Here

Examples of com.splunk.shuttl.archiver.bucketlock.BucketLock.tryLockExclusive()

    verifyZeroInteractions(getsBucketsFromArchive);
  }

  public void thawBuckets_bucketIsAlreadyLocked_doesNotThaw() {
    BucketLock bucketLock = thawBucketLocker.getLockForBucket(bucket);
    assertTrue(bucketLock.tryLockExclusive());
    when(
        listsBucketsFiltered.listFilteredBucketsAtIndex(index, earliestTime,
            latestTime)).thenReturn(asList(bucket));

    bucketThawer.thawBuckets(index, earliestTime, latestTime);
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.