public abstract class SingleInstanceSecuringAnnotatorDecorator extends AbstractAnnotatorDecorator
Annotator which is used to make sure that
the decorated Annotator instance is used by one single thread at a
time. This is needed because of some Singleton based annotator
implementations that lead to an increase of the runtime measurement while
their threads are not working but waiting for a Semaphore. Thus, this
decorator should be used to decorate the time measurement.| Modifier and Type | Field and Description |
|---|---|
protected static Map<Annotator,org.aksw.gerbil.annotator.decorator.SingleInstanceSecuringAnnotatorDecorator.RegistryValue> |
annotatorRegistry |
protected static Semaphore |
registryMutex |
decoratedAnnotator| Modifier | Constructor and Description |
|---|---|
protected |
SingleInstanceSecuringAnnotatorDecorator(Annotator decoratedAnnotator) |
| Modifier and Type | Method and Description |
|---|---|
static SingleInstanceSecuringAnnotatorDecorator |
createDecorator(ExperimentType type,
Annotator annotator) |
protected void |
finalize() |
protected static List<org.aksw.gerbil.transfer.nif.Meaning> |
performC2KB(SingleInstanceSecuringAnnotatorDecorator decorator,
org.aksw.gerbil.transfer.nif.Document document) |
protected static List<org.aksw.gerbil.transfer.nif.MeaningSpan> |
performD2KBTask(SingleInstanceSecuringAnnotatorDecorator decorator,
org.aksw.gerbil.transfer.nif.Document document) |
protected static List<org.aksw.gerbil.transfer.nif.MeaningSpan> |
performExtraction(SingleInstanceSecuringAnnotatorDecorator decorator,
org.aksw.gerbil.transfer.nif.Document document) |
protected static List<org.aksw.gerbil.transfer.nif.data.TypedNamedEntity> |
performOKETask1(SingleInstanceSecuringAnnotatorDecorator decorator,
org.aksw.gerbil.transfer.nif.Document document) |
protected static List<org.aksw.gerbil.transfer.nif.data.TypedNamedEntity> |
performOKETask2(SingleInstanceSecuringAnnotatorDecorator decorator,
org.aksw.gerbil.transfer.nif.Document document) |
protected static List<org.aksw.gerbil.transfer.nif.Span> |
performRecognition(SingleInstanceSecuringAnnotatorDecorator decorator,
org.aksw.gerbil.transfer.nif.Document document) |
protected static List<org.aksw.gerbil.transfer.nif.TypedSpan> |
performRT2KBTask(SingleInstanceSecuringAnnotatorDecorator decorator,
org.aksw.gerbil.transfer.nif.Document document) |
protected static List<org.aksw.gerbil.transfer.nif.TypedSpan> |
performTyping(SingleInstanceSecuringAnnotatorDecorator decorator,
org.aksw.gerbil.transfer.nif.Document document) |
protected static Semaphore |
registerAnnotator(Annotator decoratedAnnotator)
Registers the given
Annotator (if it is not already present in
the registration) and returns its semaphore. |
protected static void |
unregisterAnnotator(Annotator decoratedAnnotator)
Removes the given
Annotator from the registration. |
close, getDecoratedAnnotator, getName, setClosePermitionGranter, setNameprotected static final Map<Annotator,org.aksw.gerbil.annotator.decorator.SingleInstanceSecuringAnnotatorDecorator.RegistryValue> annotatorRegistry
protected static final Semaphore registryMutex
protected SingleInstanceSecuringAnnotatorDecorator(Annotator decoratedAnnotator)
public static SingleInstanceSecuringAnnotatorDecorator createDecorator(ExperimentType type, Annotator annotator)
protected static List<org.aksw.gerbil.transfer.nif.Meaning> performC2KB(SingleInstanceSecuringAnnotatorDecorator decorator, org.aksw.gerbil.transfer.nif.Document document) throws GerbilException
GerbilExceptionprotected static List<org.aksw.gerbil.transfer.nif.MeaningSpan> performD2KBTask(SingleInstanceSecuringAnnotatorDecorator decorator, org.aksw.gerbil.transfer.nif.Document document) throws GerbilException
GerbilExceptionprotected static List<org.aksw.gerbil.transfer.nif.MeaningSpan> performExtraction(SingleInstanceSecuringAnnotatorDecorator decorator, org.aksw.gerbil.transfer.nif.Document document) throws GerbilException
GerbilExceptionprotected static List<org.aksw.gerbil.transfer.nif.TypedSpan> performTyping(SingleInstanceSecuringAnnotatorDecorator decorator, org.aksw.gerbil.transfer.nif.Document document) throws GerbilException
GerbilExceptionprotected static List<org.aksw.gerbil.transfer.nif.Span> performRecognition(SingleInstanceSecuringAnnotatorDecorator decorator, org.aksw.gerbil.transfer.nif.Document document) throws GerbilException
GerbilExceptionprotected static List<org.aksw.gerbil.transfer.nif.data.TypedNamedEntity> performOKETask1(SingleInstanceSecuringAnnotatorDecorator decorator, org.aksw.gerbil.transfer.nif.Document document) throws GerbilException
GerbilExceptionprotected static List<org.aksw.gerbil.transfer.nif.data.TypedNamedEntity> performOKETask2(SingleInstanceSecuringAnnotatorDecorator decorator, org.aksw.gerbil.transfer.nif.Document document) throws GerbilException
GerbilExceptionprotected static List<org.aksw.gerbil.transfer.nif.TypedSpan> performRT2KBTask(SingleInstanceSecuringAnnotatorDecorator decorator, org.aksw.gerbil.transfer.nif.Document document) throws GerbilException
GerbilExceptionprotected static Semaphore registerAnnotator(Annotator decoratedAnnotator)
Annotator (if it is not already present in
the registration) and returns its semaphore.decoratedAnnotator - protected static void unregisterAnnotator(Annotator decoratedAnnotator)
Annotator from the registration.decoratedAnnotator - Copyright © 2014–2017. All rights reserved.