Class Throttler.FetchThrottler

  • All Implemented Interfaces:
    IFetchThrottler
    Enclosing class:
    Throttler

    protected static class Throttler.FetchThrottler
    extends java.lang.Object
    implements IFetchThrottler
    Fetch throttler implementation class. This basically stores some parameters and links back to ThrottlingGroup.
    • Method Detail

      • obtainFetchDocumentPermission

        public boolean obtainFetchDocumentPermission()
                                              throws java.lang.InterruptedException
        Get permission to fetch a document. This grants permission to start fetching a single document, within the connection that has already been granted permission that created this object.
        Specified by:
        obtainFetchDocumentPermission in interface IFetchThrottler
        Returns:
        false if the throttler is being shut down.
        Throws:
        java.lang.InterruptedException
      • obtainFetchDocumentPermission

        public boolean obtainFetchDocumentPermission​(IBreakCheck breakCheck)
                                              throws java.lang.InterruptedException,
                                                     BreakException
        Get permission to fetch a document. This grants permission to start fetching a single document, within the connection that has already been granted permission that created this object.
        Specified by:
        obtainFetchDocumentPermission in interface IFetchThrottler
        Returns:
        false if the throttler is being shut down.
        Throws:
        java.lang.InterruptedException
        BreakException
      • createFetchStream

        public IStreamThrottler createFetchStream()
        Open a fetch stream. When done (or aborting), call IStreamThrottler.closeStream() to note the completion of the document fetch activity.
        Specified by:
        createFetchStream in interface IFetchThrottler
        Returns:
        the stream throttler to use to throttle the actual data access.