Package com.apicatalog.jsonld.processor
Class Ticker
- java.lang.Object
-
- com.apicatalog.jsonld.processor.ProcessingRuntime
-
- com.apicatalog.jsonld.processor.Ticker
-
class Ticker extends ProcessingRuntime
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.time.Instantticker(package private) java.time.Durationttl-
Fields inherited from class com.apicatalog.jsonld.processor.ProcessingRuntime
options
-
-
Constructor Summary
Constructors Constructor Description Ticker(JsonLdOptions options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidresetTicker()Resume ticker, a next ping decreases remaining time if timeout is set.voidtick()Called in multiple places during a processing to check processing timeout if set.-
Methods inherited from class com.apicatalog.jsonld.processor.ProcessingRuntime
getContextCache, getDocumentCache, getDocumentLoader, getUndefinedTermPolicy, getUriValidation, isNumericId, isRdfStar, isUriValidation, isV10, isV11, of
-
-
-
-
Constructor Detail
-
Ticker
Ticker(JsonLdOptions options)
-
-
Method Detail
-
tick
public void tick() throws JsonLdErrorDescription copied from class:ProcessingRuntimeCalled in multiple places during a processing to check processing timeout if set. Does nothing if timeout is not set. When hit for the first time a timestamp is set, otherwise a duration is decreased by timestamps difference.- Overrides:
tickin classProcessingRuntime- Throws:
JsonLdError- if a processing has exceeded
-
resetTicker
public void resetTicker()
Description copied from class:ProcessingRuntimeResume ticker, a next ping decreases remaining time if timeout is set. Is used after an external method call, to exclude time consumed by the external call. e.g. when calling HTTP client. Does nothing if timeout is not set.- Overrides:
resetTickerin classProcessingRuntime
-
-