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 Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Callbacks for stream factories.

    Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service

    org.apache.hadoop.service.Service.STATE

    Nested 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 Type
    Method
    Description
    void
    bind(FactoryBindingParameters factoryBindingParameters)
    Set extra initialization parameters.
    Get requirements from the factory which then tune behavior elsewhere in the system.
    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, waitForServiceToStop

    Methods inherited from interface org.apache.hadoop.fs.StreamCapabilities

    hasCapability
  • Method Details

    • bind

      void bind(FactoryBindingParameters factoryBindingParameters) throws IOException
      Set extra initialization parameters. This MUST ONLY be invoked between init() and start().
      Parameters:
      factoryBindingParameters - parameters for the factory binding
      Throws:
      IOException - if IO problems.
    • readObject

      ObjectInputStream readObject(ObjectReadParameters parameters) throws IOException
      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.