public class FadvisedFileRegion
extends org.jboss.netty.channel.DefaultFileRegion
Constructor and Description |
---|
FadvisedFileRegion(RandomAccessFile file,
long position,
long count,
boolean manageOsCache,
int readaheadLength,
org.apache.hadoop.io.ReadaheadPool readaheadPool,
String identifier,
int shuffleBufferSize,
boolean shuffleTransferToAllowed) |
Modifier and Type | Method and Description |
---|---|
void |
releaseExternalResources() |
void |
transferSuccessful()
Call when the transfer completes successfully so we can advise the OS that
we don't need the region to be cached anymore.
|
long |
transferTo(WritableByteChannel target,
long position) |
public FadvisedFileRegion(RandomAccessFile file, long position, long count, boolean manageOsCache, int readaheadLength, org.apache.hadoop.io.ReadaheadPool readaheadPool, String identifier, int shuffleBufferSize, boolean shuffleTransferToAllowed) throws IOException
IOException
public long transferTo(WritableByteChannel target, long position) throws IOException
transferTo
in interface org.jboss.netty.channel.FileRegion
transferTo
in class org.jboss.netty.channel.DefaultFileRegion
IOException
public void releaseExternalResources()
releaseExternalResources
in interface org.jboss.netty.util.ExternalResourceReleasable
releaseExternalResources
in class org.jboss.netty.channel.DefaultFileRegion
public void transferSuccessful()
Copyright © 2016 The Apache Software Foundation. All rights reserved.