Package com.amazon.ion
Class BufferConfiguration<Configuration extends BufferConfiguration<Configuration>>
- java.lang.Object
-
- com.amazon.ion.BufferConfiguration<Configuration>
-
- Type Parameters:
Configuration
- the type of the concrete subclass of this BufferConfiguration that is applicable to the ReaderLookaheadBufferBase subclass.
- Direct Known Subclasses:
IonBufferConfiguration
public abstract class BufferConfiguration<Configuration extends BufferConfiguration<Configuration>> extends java.lang.Object
Provides logic common to all BufferConfiguration implementations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BufferConfiguration.Builder<Configuration extends BufferConfiguration<Configuration>,BuilderType extends BufferConfiguration.Builder<Configuration,BuilderType>>
Provides logic common to all BufferConfiguration Builder implementations.static interface
BufferConfiguration.DataHandler
Functional interface for reporting processed data.static interface
BufferConfiguration.OversizedValueHandler
Functional interface for handling oversized values.
-
Constructor Summary
Constructors Modifier Constructor Description protected
BufferConfiguration(BufferConfiguration.Builder<Configuration,?> builder)
Constructs an instance from the given Builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BufferConfiguration.DataHandler
getDataHandler()
int
getInitialBufferSize()
int
getMaximumBufferSize()
BufferConfiguration.OversizedValueHandler
getOversizedValueHandler()
protected void
requireUnlimitedBufferSize()
Requires that the maximum buffer size not be limited.
-
-
-
Constructor Detail
-
BufferConfiguration
protected BufferConfiguration(BufferConfiguration.Builder<Configuration,?> builder)
Constructs an instance from the given Builder.- Parameters:
builder
- the builder containing the settings to apply to the new configuration.
-
-
Method Detail
-
requireUnlimitedBufferSize
protected void requireUnlimitedBufferSize()
Requires that the maximum buffer size not be limited.
-
getInitialBufferSize
public final int getInitialBufferSize()
- Returns:
- the initial size of the lookahead buffer, in bytes.
-
getMaximumBufferSize
public final int getMaximumBufferSize()
- Returns:
- the maximum number of bytes that will be buffered.
-
getOversizedValueHandler
public final BufferConfiguration.OversizedValueHandler getOversizedValueHandler()
- Returns:
- the handler that will be notified when oversized values are encountered.
-
getDataHandler
public final BufferConfiguration.DataHandler getDataHandler()
- Returns:
- the handler that will be notified when data is processed.
-
-