congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
DirectoryImplementor.getAddress
Code IndexAdd Tabnine to your IDE (free)

How to use
getAddress
method
in
org.infinispan.lucene.impl.DirectoryImplementor

Best Java code snippets using org.infinispan.lucene.impl.DirectoryImplementor.getAddress (Showing top 8 results out of 315)

origin: org.infinispan/infinispan-embedded-query

void deleteFile(final String name) {
  fileOps.deleteFileName(name);
  readLocks.deleteOrReleaseReadLock(name);
  if (log.isDebugEnabled()) {
   log.debugf("Removed file: %s from index: %s from %s", name, indexName, getAddress(chunksCache));
  }
}
origin: org.infinispan/infinispan-lucene-directory

IndexOutput createOutput(final String name) {
  if(log.isDebugEnabled()) {
   log.tracef("Creating output file %s in index %s from %s", name, indexName,  getAddress(metadataCache));
  }
  if (IndexFileNames.SEGMENTS.equals(name)) {
   return new InfinispanIndexOutput(metadataCache, chunksCache, segmentsGenFileKey, chunkSize, fileOps, affinitySegmentId);
  }
  else {
   final FileCacheKey key = new FileCacheKey(indexName, name, affinitySegmentId);
   // creating new file, metadata is added on flush() or close() of
   // IndexOutPut
   return new InfinispanIndexOutput(metadataCache, chunksCache, key, chunkSize, fileOps, affinitySegmentId);
  }
}
origin: org.infinispan/infinispan-lucene-directory

void deleteFile(final String name) {
  fileOps.deleteFileName(name);
  readLocks.deleteOrReleaseReadLock(name);
  if (log.isDebugEnabled()) {
   log.debugf("Removed file: %s from index: %s from %s", name, indexName, getAddress(chunksCache));
  }
}
origin: org.infinispan/infinispan-embedded-query

IndexOutput createOutput(final String name) {
  if(log.isDebugEnabled()) {
   log.tracef("Creating output file %s in index %s from %s", name, indexName,  getAddress(metadataCache));
  }
  if (IndexFileNames.SEGMENTS.equals(name)) {
   return new InfinispanIndexOutput(metadataCache, chunksCache, segmentsGenFileKey, chunkSize, fileOps, affinitySegmentId);
  }
  else {
   final FileCacheKey key = new FileCacheKey(indexName, name, affinitySegmentId);
   // creating new file, metadata is added on flush() or close() of
   // IndexOutPut
   return new InfinispanIndexOutput(metadataCache, chunksCache, key, chunkSize, fileOps, affinitySegmentId);
  }
}
origin: org.infinispan/infinispan-embedded-query

/**
* Makes sure the Cache is updated.
* @param fileList the new content
*/
@GuardedBy("writeLock")
private void updateFileList(FileListCacheValue fileList) {
 if (writeAsync) {
   cacheNoRetrieve.putAsync(fileListCacheKey, fileList);
 }
 else {
   if (trace) {
    log.tracef("Updating file listing view from %s", getAddress(cacheNoRetrieve));
   }
   cacheNoRetrieve.put(fileListCacheKey, fileList);
 }
}
origin: org.infinispan/infinispan-lucene-directory

/**
* Makes sure the Cache is updated.
* @param fileList the new content
*/
@GuardedBy("writeLock")
private void updateFileList(FileListCacheValue fileList) {
 if (writeAsync) {
   cacheNoRetrieve.putAsync(fileListCacheKey, fileList);
 }
 else {
   if (trace) {
    log.tracef("Updating file listing view from %s", getAddress(cacheNoRetrieve));
   }
   cacheNoRetrieve.put(fileListCacheKey, fileList);
 }
}
origin: org.infinispan/infinispan-lucene-directory

void renameFile(final String from, final String to) {
  final FileCacheKey fromKey = new FileCacheKey(indexName, from, affinitySegmentId);
  final FileMetadata metadata = metadataCache.get(fromKey);
  final int bufferSize = metadata.getBufferSize();
  // preparation: copy all chunks to new keys
  int i = -1;
  Object ob;
  do {
   final ChunkCacheKey fromChunkKey = new ChunkCacheKey(indexName, from, ++i, bufferSize, affinitySegmentId);
   ob = chunksCache.get(fromChunkKey);
   if (ob == null) {
     break;
   }
   final ChunkCacheKey toChunkKey = new ChunkCacheKey(indexName, to, i, bufferSize, affinitySegmentId);
   chunksCache.withFlags(Flag.IGNORE_RETURN_VALUES).put(toChunkKey, ob);
  } while (true);
  // rename metadata first
  metadataCache.put(new FileCacheKey(indexName, to, affinitySegmentId), metadata);
  fileOps.removeAndAdd(from, to);
  // now trigger deletion of old file chunks:
  readLocks.deleteOrReleaseReadLock(from);
  if (trace) {
   log.tracef("Renamed file from: %s to: %s in index %s from %s", from, to, indexName, getAddress(metadataCache));
  }
}
origin: org.infinispan/infinispan-embedded-query

void renameFile(final String from, final String to) {
  final FileCacheKey fromKey = new FileCacheKey(indexName, from, affinitySegmentId);
  final FileMetadata metadata = metadataCache.get(fromKey);
  final int bufferSize = metadata.getBufferSize();
  // preparation: copy all chunks to new keys
  int i = -1;
  Object ob;
  do {
   final ChunkCacheKey fromChunkKey = new ChunkCacheKey(indexName, from, ++i, bufferSize, affinitySegmentId);
   ob = chunksCache.get(fromChunkKey);
   if (ob == null) {
     break;
   }
   final ChunkCacheKey toChunkKey = new ChunkCacheKey(indexName, to, i, bufferSize, affinitySegmentId);
   chunksCache.withFlags(Flag.IGNORE_RETURN_VALUES).put(toChunkKey, ob);
  } while (true);
  // rename metadata first
  metadataCache.put(new FileCacheKey(indexName, to, affinitySegmentId), metadata);
  fileOps.removeAndAdd(from, to);
  // now trigger deletion of old file chunks:
  readLocks.deleteOrReleaseReadLock(from);
  if (trace) {
   log.tracef("Renamed file from: %s to: %s in index %s from %s", from, to, indexName, getAddress(metadataCache));
  }
}
org.infinispan.lucene.implDirectoryImplementorgetAddress

Popular methods of DirectoryImplementor

  • <init>
  • createOutput
  • deleteFile
  • fileLength
  • list
  • openInput
  • renameFile
  • fileExists
  • getChunkSize
  • getDataCache
  • getDistLocksCache
  • getMetadataCache
  • getDistLocksCache,
  • getMetadataCache,
  • fileModified,
  • touchFile

Popular in Java

  • Finding current android device location
  • getContentResolver (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now