Class CachableBlockFile.CachedBlockRead
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- java.io.DataInputStream
-
- org.apache.accumulo.core.file.blockfile.impl.CachableBlockFile.BlockRead
-
- org.apache.accumulo.core.file.blockfile.impl.CachableBlockFile.CachedBlockRead
-
- All Implemented Interfaces:
Closeable
,DataInput
,AutoCloseable
,ABlockReader
- Enclosing class:
- CachableBlockFile
public static class CachableBlockFile.CachedBlockRead extends CachableBlockFile.BlockRead
-
-
Field Summary
-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description CachedBlockRead(CacheEntry cb, byte[] buf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getBuffer()
The byte array returned by this method is only for read optimizations, it should not be modified.<T> T
getIndex(Class<T> clazz)
int
getPosition()
Get the file position.boolean
isIndexable()
An indexable block supports seeking, getting a position, and associating an arbitrary index with the blockvoid
seek(int position)
-
Methods inherited from class org.apache.accumulo.core.file.blockfile.impl.CachableBlockFile.BlockRead
getStream
-
Methods inherited from class java.io.DataInputStream
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytes
-
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset, skip
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.accumulo.core.file.blockfile.ABlockReader
close
-
Methods inherited from interface java.io.DataInput
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes
-
-
-
-
Constructor Detail
-
CachedBlockRead
public CachedBlockRead(CacheEntry cb, byte[] buf)
-
-
Method Detail
-
seek
public void seek(int position)
- Specified by:
seek
in interfaceABlockReader
- Overrides:
seek
in classCachableBlockFile.BlockRead
-
getPosition
public int getPosition()
Description copied from interface:ABlockReader
Get the file position.- Specified by:
getPosition
in interfaceABlockReader
- Overrides:
getPosition
in classCachableBlockFile.BlockRead
- Returns:
- the file position.
-
isIndexable
public boolean isIndexable()
Description copied from interface:ABlockReader
An indexable block supports seeking, getting a position, and associating an arbitrary index with the block- Specified by:
isIndexable
in interfaceABlockReader
- Overrides:
isIndexable
in classCachableBlockFile.BlockRead
- Returns:
- true, if the block is indexable; otherwise false.
-
getBuffer
public byte[] getBuffer()
Description copied from class:CachableBlockFile.BlockRead
The byte array returned by this method is only for read optimizations, it should not be modified.- Specified by:
getBuffer
in interfaceABlockReader
- Overrides:
getBuffer
in classCachableBlockFile.BlockRead
-
getIndex
public <T> T getIndex(Class<T> clazz)
- Specified by:
getIndex
in interfaceABlockReader
- Overrides:
getIndex
in classCachableBlockFile.BlockRead
-
-