org.apache.accumulo.core.file.blockfile.impl
Class CachableBlockFile.CachedBlockRead

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by java.io.DataInputStream
              extended by org.apache.accumulo.core.file.blockfile.impl.CachableBlockFile.BlockRead
                  extended by 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


Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
CachableBlockFile.CachedBlockRead(CacheEntry cb, byte[] buf)
           
 
Method Summary
<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 block
 void seek(int position)
           
 
Methods inherited from class org.apache.accumulo.core.file.blockfile.impl.CachableBlockFile.BlockRead
getRawSize, 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

CachableBlockFile.CachedBlockRead

public CachableBlockFile.CachedBlockRead(CacheEntry cb,
                                         byte[] buf)
Method Detail

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.