org.apache.accumulo.core.file.blockfile.impl
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, ABlockReader
- Enclosing class:
- CachableBlockFile
public static class CachableBlockFile.CachedBlockRead
- extends CachableBlockFile.BlockRead
Method Summary |
|
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 block |
void |
seek(int position)
|
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.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 |
CachableBlockFile.CachedBlockRead
public CachableBlockFile.CachedBlockRead(CacheEntry cb,
byte[] buf)
seek
public void seek(int position)
- Specified by:
seek
in interface ABlockReader
- Overrides:
seek
in class CachableBlockFile.BlockRead
getPosition
public int getPosition()
- Description copied from interface:
ABlockReader
- Get the file position.
- Specified by:
getPosition
in interface ABlockReader
- Overrides:
getPosition
in class CachableBlockFile.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 interface ABlockReader
- Overrides:
isIndexable
in class CachableBlockFile.BlockRead
- Returns:
- true, if the block is indexable; otherwise false.
getIndex
public <T> T getIndex(Class<T> clazz)
- Specified by:
getIndex
in interface ABlockReader
- Overrides:
getIndex
in class CachableBlockFile.BlockRead
Copyright © 2015 Apache Accumulo Project. All rights reserved.