Class Throttler.FetchThrottler
- java.lang.Object
-
- org.apache.manifoldcf.connectorcommon.throttler.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.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String[]binNamesprotected Throttler.ThrottlingGroupparent-
Fields inherited from interface org.apache.manifoldcf.connectorcommon.interfaces.IFetchThrottler
_rcsid
-
-
Constructor Summary
Constructors Constructor Description FetchThrottler(Throttler.ThrottlingGroup parent, java.lang.String[] binNames)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IStreamThrottlercreateFetchStream()Open a fetch stream.booleanobtainFetchDocumentPermission()Get permission to fetch a document.booleanobtainFetchDocumentPermission(IBreakCheck breakCheck)Get permission to fetch a document.
-
-
-
Field Detail
-
parent
protected final Throttler.ThrottlingGroup parent
-
binNames
protected final java.lang.String[] binNames
-
-
Constructor Detail
-
FetchThrottler
public FetchThrottler(Throttler.ThrottlingGroup parent, java.lang.String[] binNames)
-
-
Method Detail
-
obtainFetchDocumentPermission
public boolean obtainFetchDocumentPermission() throws java.lang.InterruptedExceptionGet 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:
obtainFetchDocumentPermissionin interfaceIFetchThrottler- 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:
obtainFetchDocumentPermissionin interfaceIFetchThrottler- Returns:
- false if the throttler is being shut down.
- Throws:
java.lang.InterruptedExceptionBreakException
-
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:
createFetchStreamin interfaceIFetchThrottler- Returns:
- the stream throttler to use to throttle the actual data access.
-
-