Tabnine Logo
org.apache.lucene.store
Code IndexAdd Tabnine to your IDE (free)

How to use org.apache.lucene.store

Best Java code snippets using org.apache.lucene.store (Showing top 20 results out of 1,854)

origin: neo4j/neo4j

TransactionStateLuceneIndexWriter( LuceneFulltextIndex index )
{
  this.index = index;
  directory = new RAMDirectory();
}
origin: org.apache.lucene/lucene-core

@Override
public final int readInt() throws IOException {
 try {
  return guard.getInt(curBuf);
 } catch (BufferUnderflowException e) {
  return super.readInt();
 } catch (NullPointerException npe) {
  throw new AlreadyClosedException("Already closed: " + this);
 }
}
origin: org.apache.lucene/lucene-core

/** Just like {@link #open(Path)}, but allows you to
 *  also specify a custom {@link LockFactory}. */
public static FSDirectory open(Path path, LockFactory lockFactory) throws IOException {
 if (Constants.JRE_IS_64BIT && MMapDirectory.UNMAP_SUPPORTED) {
  return new MMapDirectory(path, lockFactory);
 } else if (Constants.WINDOWS) {
  return new SimpleFSDirectory(path, lockFactory);
 } else {
  return new NIOFSDirectory(path, lockFactory);
 }
}
origin: neo4j/neo4j

@SuppressWarnings( "ResultOfMethodCallIgnored" )
@Override
public Directory open( File dir ) throws IOException
{
  dir.mkdirs();
  FSDirectory directory = USE_DEFAULT_DIRECTORY_FACTORY ? FSDirectory.open( dir.toPath() ) : new NIOFSDirectory( dir.toPath() );
  return new NRTCachingDirectory( directory, MAX_MERGE_SIZE_MB, MAX_CACHED_MB );
}
origin: neo4j/neo4j

  @Override
  public void close() throws IOException
  {
    delegate.close();
  }
}
origin: org.apache.lucene/lucene-core

@Override
public final long readLong() throws IOException {
 try {
  return guard.getLong(curBuf);
 } catch (BufferUnderflowException e) {
  return super.readLong();
 } catch (NullPointerException npe) {
  throw new AlreadyClosedException("Already closed: " + this);
 }
}

origin: neo4j/neo4j

@Override
public String[] listAll() throws IOException
{
  return delegate.listAll();
}
origin: neo4j/neo4j

@Override
public IndexInput openInput( String name, IOContext context ) throws IOException
{
  return delegate.openInput( name, context );
}
origin: neo4j/neo4j

@Override
public IndexOutput createOutput( String name, IOContext context ) throws IOException
{
  return delegate.createOutput( name, context );
}
origin: neo4j/neo4j

@Override
public void deleteFile( String name ) throws IOException
{
  delegate.deleteFile( name );
}
origin: neo4j/neo4j

@Override
public long fileLength( String name ) throws IOException
{
  return delegate.fileLength( name );
}
origin: neo4j/neo4j

@Override
public Lock obtainLock( String name ) throws IOException
{
  return delegate.obtainLock( name );
}
origin: org.apache.lucene/lucene-core

public static ByteBufferIndexInput newInstance(String resourceDescription, ByteBuffer[] buffers, long length, int chunkSizePower, ByteBufferGuard guard) {
 if (buffers.length == 1) {
  return new SingleBufferImpl(resourceDescription, buffers[0], length, chunkSizePower, guard);
 } else {
  return new MultiBufferImpl(resourceDescription, buffers, 0, length, chunkSizePower, guard);
 }
}

origin: neo4j/neo4j

@Override
public void renameFile( String source, String dest ) throws IOException
{
  delegate.renameFile( source, dest );
}
origin: org.apache.lucene/lucene-core

@Override
public void skipBytes(long numBytes) throws IOException {
 ensureOpen();
 super.skipBytes(numBytes);
}
origin: org.apache.lucene/lucene-core

@Override
public void writeLong(long i) throws IOException {
 ensureOpen();
 delegate.writeLong(i);
}
origin: org.apache.lucene/lucene-core

@Override
public void writeString(String s) throws IOException {
 ensureOpen();
 delegate.writeString(s);
}
origin: org.apache.lucene/lucene-core

@Override
public void readBytes(byte[] b, int offset, int len) throws IOException {
 ensureOpen();
 in.readBytes(b, offset, len);
}
origin: org.apache.lucene/lucene-core

@Override
public byte readByte(long pos) throws IOException {
 ensureOpen();
 return in.readByte(pos);
}
origin: neo4j/neo4j

@Override
Directory getDirectory( File baseStorePath, IndexIdentifier identifier )
{
  return new RAMDirectory();
}
org.apache.lucene.store

Most used classes

  • FSDirectory
    Base class for Directory implementations that store index files in the file system. There are curren
  • Directory
    A Directory provides an abstraction layer for storing a list of files. A directory contains only fil
  • RAMDirectory
    A memory-resident Directory implementation. Locking implementation is by default the SingleInstanceL
  • IndexInput
    Abstract base class for input from a file in a Directory. A random-access input stream. Used for all
  • NIOFSDirectory
    An FSDirectory implementation that uses java.nio's FileChannel's positional read, which allows multi
  • MMapDirectory,
  • SimpleFSDirectory,
  • LockObtainFailedException,
  • AlreadyClosedException,
  • Lock,
  • ByteArrayDataInput,
  • DataInput,
  • RAMOutputStream,
  • InputStreamDataInput,
  • LockFactory,
  • SingleInstanceLockFactory,
  • ByteArrayDataOutput,
  • NoLockFactory,
  • NativeFSLockFactory
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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