congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
DirectoryImplementor
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.infinispan/infinispan-lucene-directory

/**
* @param metadataCache the cache to be used for all smaller metadata: prefer replication over distribution, avoid eviction
* @param chunksCache the cache to use for the space consuming segments: prefer distribution, enable eviction if needed
* @param distLocksCache the cache to use for locks, to avoid more than one process to write to the index
* @param indexName the unique index name, useful to store multiple indexes in the same caches
* @param lf the LockFactory to be used by IndexWriters. @see org.infinispan.lucene.locking
* @param chunkSize segments are fragmented in chunkSize bytes; larger values are more efficient for searching but less for distribution and network replication
* @param readLocker @see org.infinispan.lucene.readlocks for some implementations; you might be able to provide more efficient implementations by controlling the IndexReader's lifecycle.
* @param fileListUpdatedAsync When true, the writes to the list of currently existing files in the Directory will use the putAsync method rather than put.
* @param deleteExecutor The Executor to run file deletes in the background
* @param affinitySegmentId A hint interpreted by the consistent hashing function to force locality with a specific segment identifier
*/
public DirectoryLucene(Cache<?, ?> metadataCache, Cache<?, ?> chunksCache, Cache<?, ?> distLocksCache, String indexName, LockFactory lf, int chunkSize, SegmentReadLocker readLocker, boolean fileListUpdatedAsync, Executor deleteExecutor, int affinitySegmentId) {
 this.deleteExecutor = deleteExecutor;
 this.affinitySegmentId = affinitySegmentId;
 this.impl = new DirectoryImplementor(metadataCache, chunksCache, distLocksCache, indexName, chunkSize, readLocker, fileListUpdatedAsync, affinitySegmentId);
 this.indexName = indexName;
 this.lockFactory = lf;
}
origin: org.infinispan/infinispan-lucene-directory

/**
* {@inheritDoc}
*/
@Override
public IndexOutput createOutput(final String name, final IOContext context) throws IOException {
 return impl.createOutput(name);
}
origin: org.infinispan/infinispan-lucene-directory

 @Override
 public void run() {
   impl.deleteFile(fileName);
 }
}
origin: org.infinispan/infinispan-lucene-v4

/**
* {@inheritDoc}
*/
@Override
public void renameFile(final String from, final String to) {
 impl.renameFile(from, to);
}
origin: org.infinispan/infinispan-lucene-v4

/**
* {@inheritDoc}
*/
@Override
public long fileLength(final String name) {
 ensureOpen();
 return impl.fileLength(name);
}
origin: org.infinispan/infinispan-lucene-directory

/**
* {@inheritDoc}
*/
@Override
public String[] listAll() {
 return impl.list();
}
origin: org.infinispan/infinispan-embedded-query

/**
* {@inheritDoc}
*/
@Override
public IndexInput openInput(final String name, final IOContext context) throws IOException {
 final IndexInputContext indexInputContext = impl.openInput(name);
 if (indexInputContext.readLocks == null) {
   return new SingleChunkIndexInput(indexInputContext);
 } else {
   return new InfinispanIndexInput(indexInputContext);
 }
}
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-v3

/**
* {@inheritDoc}
*/
@Override
public boolean fileExists(final String name) {
 ensureOpen();
 return impl.fileExists(name);
}
origin: org.infinispan/infinispan-embedded-query

@Override
public int getChunkSize() {
 return impl.getChunkSize();
}
origin: org.infinispan/infinispan-lucene-v3

/**
* {@inheritDoc}
*/
@Override
public void renameFile(final String from, final String to) {
 impl.renameFile(from, to);
}
origin: org.infinispan/infinispan-lucene-v3

/**
* {@inheritDoc}
*/
@Override
public long fileLength(final String name) {
 ensureOpen();
 return impl.fileLength(name);
}
origin: org.infinispan/infinispan-lucene-v4

/**
* {@inheritDoc}
*/
@Override
public String[] listAll() {
 return impl.list();
}
origin: org.infinispan/infinispan-lucene-directory

/**
* {@inheritDoc}
*/
@Override
public IndexInput openInput(final String name, final IOContext context) throws IOException {
 final IndexInputContext indexInputContext = impl.openInput(name);
 if (indexInputContext.readLocks == null) {
   return new SingleChunkIndexInput(indexInputContext);
 } else {
   return new InfinispanIndexInput(indexInputContext);
 }
}
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-v4

/**
* {@inheritDoc}
*/
@Override
public boolean fileExists(final String name) {
 ensureOpen();
 return impl.fileExists(name);
}
origin: org.infinispan/infinispan-lucene-directory

@Override
public int getChunkSize() {
 return impl.getChunkSize();
}
origin: org.infinispan/infinispan-lucene-v4

/**
* {@inheritDoc}
*/
@Override
public IndexOutput createOutput(final String name, final IOContext context) throws IOException {
 return impl.createOutput(name);
}
origin: org.infinispan/infinispan-embedded-query

/**
* {@inheritDoc}
*/
@Override
public void renameFile(final String from, final String to) {
 impl.renameFile(from, to);
}
origin: org.infinispan/infinispan-lucene-directory

/**
* {@inheritDoc}
*/
@Override
public long fileLength(final String name) {
 ensureOpen();
 return impl.fileLength(name);
}
org.infinispan.lucene.implDirectoryImplementor

Javadoc

Common code for different Directory implementations.

Most used methods

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

Popular in Java

  • Reading from database using SQL prepared statement
  • startActivity (Activity)
  • getContentResolver (Context)
  • onRequestPermissionsResult (Fragment)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Reference (javax.naming)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Top 12 Jupyter Notebook Extensions
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