@InterfaceAudience.Private public abstract class FetchedInput extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
FetchedInput.State |
static class |
FetchedInput.Type |
| Modifier | Constructor and Description |
|---|---|
protected |
FetchedInput(InputAttemptIdentifier inputAttemptIdentifier,
FetchedInputCallback callbackHandler) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
abort()
Abort the output.
|
abstract void |
commit()
Commit the output.
|
boolean |
equals(Object obj) |
abstract void |
free()
Called when this input has been consumed, so that resources can be
reclaimed.
|
protected int |
getId() |
InputAttemptIdentifier |
getInputAttemptIdentifier() |
abstract InputStream |
getInputStream()
Return an input stream to be used to read the previously fetched data.
|
abstract OutputStream |
getOutputStream()
Returns the output stream to be used to write fetched data.
|
abstract long |
getSize() |
protected FetchedInput.State |
getState() |
abstract FetchedInput.Type |
getType() |
int |
hashCode() |
protected boolean |
isState(FetchedInput.State state) |
void |
notifyFetchComplete()
Inform the Allocator about a committed resource.
|
void |
notifyFetchFailure()
Inform the Allocator about a failed resource.
|
void |
notifyFreedResource()
Inform the Allocator about a completed resource being released.
|
protected void |
setState(FetchedInput.State state) |
protected FetchedInput(InputAttemptIdentifier inputAttemptIdentifier, FetchedInputCallback callbackHandler)
public abstract FetchedInput.Type getType()
protected boolean isState(FetchedInput.State state)
protected void setState(FetchedInput.State state)
protected FetchedInput.State getState()
protected int getId()
public abstract long getSize()
public InputAttemptIdentifier getInputAttemptIdentifier()
public void notifyFetchComplete()
public void notifyFetchFailure()
public void notifyFreedResource()
public abstract OutputStream getOutputStream() throws IOException
IOExceptionpublic abstract InputStream getInputStream() throws IOException
IOExceptionpublic abstract void commit()
throws IOException
IOExceptionpublic abstract void abort()
throws IOException
IOExceptionpublic abstract void free()
Copyright © 2017 Apache Software Foundation. All rights reserved.