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[]
binNames
protected Throttler.ThrottlingGroup
parent
-
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 IStreamThrottler
createFetchStream()
Open a fetch stream.boolean
obtainFetchDocumentPermission()
Get permission to fetch a document.boolean
obtainFetchDocumentPermission(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.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 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:
obtainFetchDocumentPermission
in interfaceIFetchThrottler
- 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 interfaceIFetchThrottler
- Returns:
- the stream throttler to use to throttle the actual data access.
-
-