Interface ObjectInputStreamFactory
- All Superinterfaces:
AutoCloseable,Closeable,org.apache.hadoop.service.Service,org.apache.hadoop.fs.StreamCapabilities
- All Known Subinterfaces:
S3AStore
- All Known Implementing Classes:
AbstractObjectInputStreamFactory,AnalyticsStreamFactory,ClassicObjectInputStreamFactory,PrefetchingInputStreamFactory,S3AStoreImpl
public interface ObjectInputStreamFactory
extends org.apache.hadoop.service.Service, org.apache.hadoop.fs.StreamCapabilities
A Factory for
ObjectInputStream streams.
This class is instantiated during initialization of
S3AStore, it then follows the same service
lifecycle.
Note for maintainers: do try and keep this mostly stable.
If new parameters need to be added, expand the
ObjectReadParameters class, rather than change the
interface signature.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceCallbacks for stream factories.Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATENested classes/interfaces inherited from interface org.apache.hadoop.fs.StreamCapabilities
org.apache.hadoop.fs.StreamCapabilities.StreamCapability -
Field Summary
Fields inherited from interface org.apache.hadoop.fs.StreamCapabilities
ABORTABLE_STREAM, DROPBEHIND, HFLUSH, HSYNC, IOSTATISTICS, IOSTATISTICS_CONTEXT, PREADBYTEBUFFER, READAHEAD, READBYTEBUFFER, UNBUFFER, VECTOREDIO, VECTOREDIO_BUFFERS_SLICED -
Method Summary
Modifier and TypeMethodDescriptionvoidbind(FactoryBindingParameters factoryBindingParameters) Set extra initialization parameters.Get requirements from the factory which then tune behavior elsewhere in the system.readObject(ObjectReadParameters parameters) Create a new input stream.Get the input stream type.Methods inherited from interface org.apache.hadoop.service.Service
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, registerServiceListener, start, stop, unregisterServiceListener, waitForServiceToStopMethods inherited from interface org.apache.hadoop.fs.StreamCapabilities
hasCapability
-
Method Details
-
bind
Set extra initialization parameters. This MUST ONLY be invoked betweeninit()andstart().- Parameters:
factoryBindingParameters- parameters for the factory binding- Throws:
IOException- if IO problems.
-
readObject
Create a new input stream. There is no requirement to actually contact the store; this is generally done lazily.- Parameters:
parameters- parameters.- Returns:
- the input stream
- Throws:
IOException- problem creating the stream.
-
factoryRequirements
StreamFactoryRequirements factoryRequirements()Get requirements from the factory which then tune behavior elsewhere in the system.- Returns:
- the count of background threads.
-
streamType
InputStreamType streamType()Get the input stream type.- Returns:
- the specific stream type this factory produces.
-