@InterfaceAudience.Public @InterfaceStability.Stable public abstract class ReplicaAccessor extends Object
| コンストラクタと説明 | 
|---|
| ReplicaAccessor() | 
| 修飾子とタイプ | メソッドと説明 | 
|---|---|
| abstract void | close()Release the resources associated with the ReplicaAccessor. | 
| int | getNetworkDistance()Return the network distance between local machine and the remote machine. | 
| abstract boolean | isLocal()Return true if bytes read via this accessor should count towards the
 local byte count statistics. | 
| abstract boolean | isShortCircuit()Return true if bytes read via this accessor should count towards the
 short-circuit byte count statistics. | 
| abstract int | read(long pos,
    byte[] buf,
    int off,
    int len)Read bytes from the replica. | 
| abstract int | read(long pos,
    ByteBuffer buf)Read bytes from the replica. | 
public ReplicaAccessor()
public abstract int read(long pos, byte[] buf, int off, int len) throws IOException
pos - The position in the replica to start reading at.
                 Must not be negative.buf - The byte array to read into.off - The offset within buf to start reading into.len - The maximum length to read.IOExceptionpublic abstract int read(long pos, ByteBuffer buf) throws IOException
pos - The position in the replica to start reading at.
                 Must not be negative.buf - The byte buffer to read into.  The amount to read will be
                 dictated by the remaining bytes between the current
                 position and the limit.  The ByteBuffer may or may not be
                 direct.IOExceptionpublic abstract void close() throws IOException
IOExceptionpublic abstract boolean isLocal()
public abstract boolean isShortCircuit()
public int getNetworkDistance()
Copyright © 2016 Apache Software Foundation. All rights reserved.