Class SessionImpl

  • All Implemented Interfaces:
    Session, java.lang.AutoCloseable

    @Deprecated
    public class SessionImpl
    extends java.lang.Object
    implements Session
    Deprecated.
    This class wires up the Session API using MultiClusterHandler and MultiClusterSessionOutputStream.
    • Constructor Summary

      Constructors 
      Constructor Description
      SessionImpl​(SessionParams sessionParams, java.util.concurrent.ScheduledThreadPoolExecutor timeoutExecutor)
      Deprecated.
       
    • Constructor Detail

      • SessionImpl

        public SessionImpl​(SessionParams sessionParams,
                           java.util.concurrent.ScheduledThreadPoolExecutor timeoutExecutor)
        Deprecated.
    • Method Detail

      • stream

        public java.io.OutputStream stream​(java.lang.CharSequence documentId)
        Deprecated.
        Description copied from interface: Session
        Returns an OutputStream that can be used to write ONE operation, identified by the given document ID. The data format must match the FeedParams.DataFormat given when this Session was instantiated. Note that most data formats include the document ID in the actual buffer, which must match the document ID given as a parameter to this method. It is (as always) important to close the OutputStream returned - nothing is written to the wire until this is done. Note also that the Session holds a certain, dynamically determined maximum number of document operations in memory. When this threshold is reached, OutputStream.close() will block.
        Specified by:
        stream in interface Session
        Parameters:
        documentId - the unique ID identifying this operation in the system
        Returns:
        an OutputStream to write the operation payload into
      • results

        public java.util.concurrent.BlockingQueue<Result> results()
        Deprecated.
        Description copied from interface: Session
        Returns Results for all operations enqueued by Session.stream(CharSequence). Note that the order of results is non-deterministic, with one exception - results for one document ID are returned in the order they were enqueued. In all other cases Results may appear out-of-order.
        Specified by:
        results in interface Session
        Returns:
        a blocking queue for retrieving results
        See Also:
        Result
      • close

        public void close()
        Deprecated.
        Description copied from interface: Session
        Closes this Session. All resources are freed, persistent connections are closed and internal threads are stopped.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface Session
      • getStatsAsJson

        public java.lang.String getStatsAsJson()
        Deprecated.
        Description copied from interface: Session
        Returns stats about the cluster.
        Specified by:
        getStatsAsJson in interface Session
        Returns:
        JSON string with information about cluster.
      • getIncompleteResultQueueSize

        public int getIncompleteResultQueueSize()
        Deprecated.