jruby/docs BETA
Navigation
org.apache.lucene.store 54
C AlreadyClosedException
C BaseDirectory
C BufferedChecksum
C BufferedChecksumIndexInput
C BufferedIndexInput
C ByteArrayDataInput
C ByteArrayDataOutput
C ByteBuffersDataInput
C ByteBuffersDataOutput
C ByteBuffersDirectory
C ByteBuffersIndexInput
C ByteBuffersIndexOutput
C ChecksumIndexInput
E DataAccessHint
C DataInput
C DataOutput
C Directory
C FSDirectory
C FSLockFactory
E FileDataHint
C FileSwitchDirectory
E FileTypeHint
C FilterDirectory
C FilterIndexInput
C FilterIndexOutput
I IOContext
C IndexInput
C IndexOutput
C InputStreamDataInput
C Lock
C LockFactory
C LockObtainFailedException
C LockReleaseFailedException
C LockStressTest
C LockValidatingDirectoryWrapper
C LockVerifyServer
C MMapDirectory
C NIOFSDirectory
C NRTCachingDirectory
C NativeFSLockFactory
C NoLockFactory
C OutputStreamDataOutput
C OutputStreamIndexOutput
E PreloadHint
I RandomAccessInput
C RateLimitedIndexOutput
C RateLimiter
E ReadAdvice
E ReadOnceHint
C SimpleFSLockFactory
C SingleInstanceLockFactory
C SleepingLockWrapper
C TrackingDirectoryWrapper
C VerifyingLockFactory
BufferedChecksumIndexInput — members 13+
C new(main)
M checksum() long
M clone() IndexInput
C close()
M file_pointer() long
M length() long
M read_byte() byte
C read_bytes(b, offset, len)
M read_int() int
M read_long() long
C read_longs(dst, offset, length)
M read_short() short
M slice(slice_description, offset, length) IndexInput
from DataInput
C read_bytes(b, offset, len, use_buffer)
C read_floats(floats, offset, len)
C read_group_v_int(dst, offset)
C read_ints(dst, offset, length)
M read_map_of_strings() Map<String,String>
M read_set_of_strings() Set<String>
M read_string() String
M read_v_int() int
M read_v_long() long
M read_z_int() int
M read_z_long() long
from IndexInput
M loaded?() Optional<Boolean>
C prefetch(offset, length)
M random_access_slice(offset, length) RandomAccessInput
C skip_bytes(num_bytes)
M slice(slice_description, offset, length, context) IndexInput
M to_string() String
C update_io_context(context)
from ChecksumIndexInput
C seek(pos)

org.apache.lucene.store.BufferedChecksumIndexInput

class extends ChecksumIndexInput 13 members

Simple implementation of ChecksumIndexInput that wraps another input and delegates calls.

Constructors

new

new ( IndexInput main )
Java: <init>(org.apache.lucene.store.IndexInput main)

Creates a new BufferedChecksumIndexInput

Instance Methods

checksum

long checksum ( )
Java: getChecksum() · also: get_checksum

clone

IndexInput clone ( )
Java: clone()

close

close ( )
Java: close()

file_pointer

long file_pointer ( )
Java: getFilePointer() · also: get_file_pointer

length

long length ( )
Java: length()

read_byte

byte read_byte ( )
Java: readByte()

read_bytes

read_bytes ( byte[] b, int offset, int len )
Java: readBytes(byte[] b, int offset, int len)

read_int

int read_int ( )
Java: readInt()

read_long

long read_long ( )
Java: readLong()

read_longs

read_longs ( long[] dst, int offset, int length )
Java: readLongs(long[] dst, int offset, int length)

read_short

short read_short ( )
Java: readShort()

slice

IndexInput slice ( String slice_description, long offset, long length )
Java: slice(String sliceDescription, long offset, long length)

Inherited

from DataInput

read_bytes

read_bytes ( byte[] b, int offset, int len, boolean use_buffer )
Java: readBytes(byte[] b, int offset, int len, boolean useBuffer)

Reads a specified number of bytes into an array at the specified offset with control over whether the read should be buffered (callers who have their own buffer should pass in "false" for useBuffer). Currently only BufferedIndexInput respects this parameter.

nametypedescription
bbyte[]the array to read bytes into
offsetintthe offset in the array to start storing bytes
lenintthe number of bytes to read
use_bufferbooleanset to false if the caller will handle buffering.

read_floats

read_floats ( float[] floats, int offset, int len )
Java: readFloats(float[] floats, int offset, int len)

Reads a specified number of floats into an array at the specified offset.

nametypedescription
floatsfloat[]the array to read bytes into
offsetintthe offset in the array to start storing floats
lenintthe number of floats to read

read_group_v_int

read_group_v_int ( int[] dst, int offset )
Java: readGroupVInt(int[] dst, int offset)
Deprecated. This method is no longer called by Lucene. It is only kept for backwards compatibility. Code calling this method should migrate to GroupVIntUtil#readGroupVInts(DataInput, int[], int) to decode a full group including tails instead.

Legacy: This method allowed to implement GroupVInt encoding in a more efficient way when this implementation supports random access. It is no longer called by Lucene's code.

If you have implemented this method, simply remove it!

read_ints

read_ints ( int[] dst, int offset, int length )
Java: readInts(int[] dst, int offset, int length)

Reads a specified number of ints into an array at the specified offset.

nametypedescription
dstint[]the array to read bytes into
offsetintthe offset in the array to start storing ints
lengthintthe number of ints to read

read_map_of_strings

Map<String,String> read_map_of_strings ( )
Java: readMapOfStrings()

Reads a Map<String,String> previously written with DataOutput#writeMapOfStrings(Map).

Returns: An immutable map containing the written contents.

read_set_of_strings

Set<String> read_set_of_strings ( )
Java: readSetOfStrings()

Reads a Set<String> previously written with DataOutput#writeSetOfStrings(Set).

Returns: An immutable set containing the written contents.

read_string

String read_string ( )
Java: readString()

Reads a string.

read_v_int

int read_v_int ( )
Java: readVInt()

Reads an int stored in variable-length format. Reads between one and five bytes. Smaller values take fewer bytes. Negative numbers are supported, but should be avoided.

The format is described further in DataOutput#writeVInt(int).

read_v_long

long read_v_long ( )
Java: readVLong()

Reads a long stored in variable-length format. Reads between one and nine bytes. Smaller values take fewer bytes. Negative numbers are not supported.

The format is described further in DataOutput#writeVInt(int).

read_z_int

int read_z_int ( )
Java: readZInt()

Read a zig-zag-encoded variable-length integer.

read_z_long

long read_z_long ( )
Java: readZLong()

Read a zig-zag-encoded variable-length integer. Reads between one and ten bytes.

from IndexInput

loaded?

Optional<Boolean> loaded? ( )
Java: isLoaded() · also: is_loaded

Returns a hint whether all the contents of this input are resident in physical memory. It's a hint because the operating system may have paged out some of the data by the time this method returns. If the optional is true, then it's likely that the contents of this input are resident in physical memory. A value of false does not imply that the contents are not resident in physical memory. An empty optional is returned if it is not possible to determine.

This runs in linear time with the #length() of this input / page size.

The default implementation returns an empty optional.

prefetch

prefetch ( long offset, long length )
Java: prefetch(long offset, long length)

Optional method: Give a hint to this input that some bytes will be read in the near future. IndexInput implementations may take advantage of this hint to start fetching pages of data immediately from storage.

The default implementation is a no-op.

nametypedescription
offsetlongstart offset
lengthlongthe number of bytes to prefetch

random_access_slice

RandomAccessInput random_access_slice ( long offset, long length )
Java: randomAccessSlice(long offset, long length)

Creates a random-access slice of this index input, with the given offset and length.

The default implementation calls #slice, and it doesn't support random access, it implements absolute reads as seek+read.

skip_bytes

skip_bytes ( long num_bytes )
Java: skipBytes(long numBytes)

Behavior is functionally equivalent to seeking to getFilePointer() + numBytes.

slice

IndexInput slice ( String slice_description, long offset, long length, IOContext context )
Java: slice(String sliceDescription, long offset, long length, org.apache.lucene.store.IOContext context)

Create a slice with a new IOContext. This is typically used by CompoundFormat implementations to modify the IOContext for specific files within the compound file.

NOTE: only certain IOContext may be usable here, depending on how this instance was opened.

The default implementation delegates to #slice(String, long, long) and ignores the IOContext.

to_string

String to_string ( )
Java: toString()

update_io_context

update_io_context ( IOContext context )
Java: updateIOContext(org.apache.lucene.store.IOContext context)

Optional method: Updates the IOContext to specify a new read access pattern. IndexInput implementations may take advantage of this hint to optimize reads from storage.

The default implementation is a no-op.

from ChecksumIndexInput

seek

seek ( long pos )
Java: seek(long pos)

ChecksumIndexInput can only seek forward and seeks are expensive since they imply to read bytes in-between the current position and the target position in order to update the checksum.

this work for additional information regarding copyright ownership.