O
- type of values accepted by this outputpublic abstract class ForwardingOutputWriter<O> extends OutputWriter<O>
Constructor and Description |
---|
ForwardingOutputWriter() |
Modifier and Type | Method and Description |
---|---|
boolean |
allowSliceRetry() |
void |
beginShard()
Will be called once before any calls to write.
|
void |
beginSlice()
Prepares the writer for writing after possibly having gone through
serialization or deserialization.
|
void |
endShard()
Called when no more output will be written to this writer.
|
void |
endSlice()
Prepares the writer for possible serialization.
|
long |
estimateMemoryRequirement()
Returns the estimated memory that will be used by this writer in bytes.
|
ShardContext |
getContext()
Returns the current context, or null if none.
|
protected abstract OutputWriter<?> |
getDelegate() |
void |
setContext(ShardContext context)
Used internally to sets the context to be used for the processing that follows.
|
cleanup, close, open, write
protected abstract OutputWriter<?> getDelegate()
public void beginShard() throws IOException
OutputWriter
beginShard
in class OutputWriter<O>
IOException
- in the event of failurepublic void beginSlice() throws IOException
OutputWriter
beginSlice
in class OutputWriter<O>
IOException
- in the event of failurepublic void endSlice() throws IOException
OutputWriter
endSlice
in class OutputWriter<O>
IOException
- in the event of failurepublic void endShard() throws IOException
OutputWriter
endShard
in class OutputWriter<O>
IOException
public long estimateMemoryRequirement()
OutputWriter
estimateMemoryRequirement
in class OutputWriter<O>
public void setContext(ShardContext context)
OutputWriter
setContext
in class OutputWriter<O>
public ShardContext getContext()
OutputWriter
getContext
in class OutputWriter<O>
public boolean allowSliceRetry()
allowSliceRetry
in class OutputWriter<O>
Copyright © 2015 Google. All rights reserved.