Codota Logo
org.infinispan.lucene.readlocks
Code IndexAdd Codota to your IDE (free)

How to use org.infinispan.lucene.readlocks

Best Java code snippets using org.infinispan.lucene.readlocks (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: org.infinispan/infinispan-embedded-query

/**
* {@inheritDoc}
*/
@Override
public synchronized void deleteOrReleaseReadLock(String name) {
 getLocalLockByName(name).release();
}
origin: org.infinispan/infinispan-embedded-query

/**
* Create a new LocalLockMergingSegmentReadLocker with special purpose caches
* @param locksCache the cache to be used to store distributed locks
* @param chunksCache the cache containing the chunks, this is where the bulk of data is stored
* @param metadataCache smaller cache for the metadata of stored elements
* @param indexName
*/
public LocalLockMergingSegmentReadLocker(Cache<?, ?> locksCache, Cache<?, ?> chunksCache, Cache<?, ?> metadataCache, String indexName, int affinitySegmentId) {
 this.delegate = new DistributedSegmentReadLocker((Cache<Object, Integer>) locksCache, chunksCache, metadataCache, indexName, affinitySegmentId);
}
origin: org.infinispan/infinispan-lucene-directory

/**
* {@inheritDoc}
*/
@Override
public synchronized boolean acquireReadLock(String name) {
 LocalReadLock localReadLock = getLocalLockByName(name);
 boolean acquired = localReadLock.acquire();
 if (acquired) {
   return true;
 }
 else {
   // cleanup
   localLocks.remove(name);
   return false;
 }
}
origin: org.infinispan/infinispan-lucene-directory

 void release() {
   value--;
   if (value <= 0) {
    localLocks.remove(name);
    delegate.deleteOrReleaseReadLock(name);
   }
 }
}
origin: org.infinispan/infinispan-lucene-directory

@Test
public void testAdditionalIndexWritingAndFinding() throws IOException, InterruptedException {
 prepareEnvironment(true);
 testIndexWritingAndFinding();
}
origin: org.infinispan/infinispan-lucene-directory

void verifyIgnoringFiles(Cache cache0, Cache cache1, Set<String> files) {
 verifyIgnoringFiles(cache0, files);
 verifyIgnoringFiles(cache1, files);
}
origin: org.infinispan/infinispan-lucene-directory

@Override
protected void createCacheManagers() throws Throwable {
 ConfigurationBuilder configurationBuilder = CacheTestSupport.createTestConfiguration(TransactionMode.NON_TRANSACTIONAL);
 createClusteredCaches(2, CACHE_NAME, configurationBuilder);
}
origin: org.infinispan/infinispan-lucene-v3

/**
* Create a new LocalLockMergingSegmentReadLocker for specified cache and index name.
*
* @param cache
* @param indexName
*/
public LocalLockMergingSegmentReadLocker(Cache<?, ?> cache, String indexName) {
 this.delegate = new DistributedSegmentReadLocker((Cache<Object, Integer>) cache, cache, cache, indexName);
}
origin: org.infinispan/infinispan-lucene-v3

/**
* {@inheritDoc}
*/
@Override
public void deleteOrReleaseReadLock(String name) {
 getLocalLockByName(name).release();
}
origin: org.infinispan/infinispan-embedded-query

/**
* {@inheritDoc}
*/
@Override
public synchronized boolean acquireReadLock(String name) {
 LocalReadLock localReadLock = getLocalLockByName(name);
 boolean acquired = localReadLock.acquire();
 if (acquired) {
   return true;
 }
 else {
   // cleanup
   localLocks.remove(name);
   return false;
 }
}
origin: org.infinispan/infinispan-lucene-directory

/**
* Create a new LocalLockMergingSegmentReadLocker with special purpose caches
* @param locksCache the cache to be used to store distributed locks
* @param chunksCache the cache containing the chunks, this is where the bulk of data is stored
* @param metadataCache smaller cache for the metadata of stored elements
* @param indexName
*/
public LocalLockMergingSegmentReadLocker(Cache<?, ?> locksCache, Cache<?, ?> chunksCache, Cache<?, ?> metadataCache, String indexName, int affinitySegmentId) {
 this.delegate = new DistributedSegmentReadLocker((Cache<Object, Integer>) locksCache, chunksCache, metadataCache, indexName, affinitySegmentId);
}
origin: org.infinispan/infinispan-lucene-directory

/**
* {@inheritDoc}
*/
@Override
public synchronized void deleteOrReleaseReadLock(String name) {
 getLocalLockByName(name).release();
}
origin: org.infinispan/infinispan-lucene-v3

/**
* {@inheritDoc}
*/
@Override
public boolean acquireReadLock(String name) {
 LocalReadLock localReadLock = getLocalLockByName(name);
 boolean acquired = localReadLock.acquire();
 if (acquired) {
   return true;
 }
 else {
   // cleanup
   localLocks.remove(name);
   return false;
 }
}
origin: org.infinispan/infinispan-lucene-directory

/**
* Create a new LocalLockMergingSegmentReadLocker for specified cache and index name.
*
* @param cache
* @param indexName
*/
public LocalLockMergingSegmentReadLocker(Cache<?, ?> cache, String indexName, int affinitySegmentId) {
 this.delegate = new DistributedSegmentReadLocker((Cache<Object, Integer>) cache, cache, cache, indexName, affinitySegmentId);
}
origin: org.infinispan/infinispan-embedded-query

/**
* Create a new LocalLockMergingSegmentReadLocker for specified cache and index name.
*
* @param cache
* @param indexName
*/
public LocalLockMergingSegmentReadLocker(Cache<?, ?> cache, String indexName, int affinitySegmentId) {
 this.delegate = new DistributedSegmentReadLocker((Cache<Object, Integer>) cache, cache, cache, indexName, affinitySegmentId);
}
origin: org.infinispan/infinispan-lucene-v3

/**
* Create a new LocalLockMergingSegmentReadLocker with special purpose caches
* @param locksCache the cache to be used to store distributed locks
* @param chunksCache the cache containing the chunks, this is where the bulk of data is stored
* @param metadataCache smaller cache for the metadata of stored elements
* @param indexName
*/
public LocalLockMergingSegmentReadLocker(Cache<?, ?> locksCache, Cache<?, ?> chunksCache, Cache<?, ?> metadataCache, String indexName) {
 this.delegate = new DistributedSegmentReadLocker((Cache<Object, Integer>) locksCache, chunksCache, metadataCache, indexName);
}
origin: org.infinispan/infinispan-embedded-query

public LocalLockMergingSegmentReadLocker(Cache<?, ?> locksCache, Cache<?, ?> chunksCache, Cache<?, ?> metadataCache, String indexName, boolean forceSynchronousDeletes, int affinitySegmentId) {
 this.delegate = new DistributedSegmentReadLocker((Cache<Object, Integer>) locksCache, chunksCache, metadataCache, indexName, affinitySegmentId,forceSynchronousDeletes);
}
origin: org.infinispan/infinispan-lucene-directory

public LocalLockMergingSegmentReadLocker(Cache<?, ?> locksCache, Cache<?, ?> chunksCache, Cache<?, ?> metadataCache, String indexName, boolean forceSynchronousDeletes, int affinitySegmentId) {
 this.delegate = new DistributedSegmentReadLocker((Cache<Object, Integer>) locksCache, chunksCache, metadataCache, indexName, affinitySegmentId,forceSynchronousDeletes);
}
origin: org.infinispan/infinispan-lucene-directory

private SegmentReadLocker makeTestableReadLocker(Cache cache, String indexName) {
 return new DistributedSegmentReadLocker(cache, cache, cache, indexName, -1 ,true);
}
origin: org.infinispan/infinispan-lucene-v3

private static SegmentReadLocker makeDefaultSegmentReadLocker(Cache<?, ?> metadataCache, Cache<?, ?> chunksCache, Cache<?, ?> distLocksCache, String indexName) {
 checkNotNull(distLocksCache, "distLocksCache");
 checkNotNull(indexName, "indexName");
 return new DistributedSegmentReadLocker((Cache<Object, Integer>) distLocksCache, chunksCache, metadataCache, indexName);
}
org.infinispan.lucene.readlocks

Most used classes

  • DistributedSegmentReadLocker
    DistributedSegmentReadLocker stores reference counters in the cache to keep track of the number of c
  • LocalLockMergingSegmentReadLocker
    LocalLockMergingSegmentReadLocker decorates the DistributedSegmentReadLocker to minimize remote oper
  • LocalLockMergingSegmentReadLocker$LocalReadLock
  • SegmentReadLocker
    SegmentReadLocker implementations have to make sure that segments are not deleted while they are bei
  • DistributedSegmentReadLockerTest$CacheLockListener
  • LocalLockMergingSegmentReadLockerTest,
  • NoopSegmentReadLocker,
  • NoopSegmentReadLockerTest
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now