public class ReferenceSetServiceImpl extends AbstractReferenceSetServiceImpl implements ReferenceSetService
referenceSetAugmentor, referenceSetDao, t2ReferenceGenerator
Constructor and Description |
---|
ReferenceSetServiceImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
delete(T2Reference reference) |
void |
deleteReferenceSetsForWorkflowRun(String workflowRunId)
Delete all
ReferenceSet S used by the specific workflow run. |
ReferenceSet |
getReferenceSet(T2Reference id)
Get a previously registered
ReferenceSet by T2Reference . |
ReferenceSet |
getReferenceSetWithAugmentation(T2Reference id,
Set<Class<ExternalReferenceSPI>> ensureTypes,
ReferenceContext context)
Functionality the same as
getReferenceSet but with the additional option to specify a set of
ExternalReferenceSPI classes. |
ReferenceSet |
registerReferenceSet(Set<ExternalReferenceSPI> references,
ReferenceContext context)
Register a set of
ExternalReferenceSPI instances, all of which
should point to byte equivalent data, and return the newly created
ReferenceSet . |
checkAugmentor, checkDao, checkGenerator, getReferenceSetAsynch, getReferenceSetWithAugmentationAsynch, setReferenceSetAugmentor, setReferenceSetDao, setT2ReferenceGenerator
executeRunnable, makeExecutionThread
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getReferenceSetAsynch, getReferenceSetWithAugmentationAsynch
public ReferenceSet getReferenceSet(T2Reference id) throws ReferenceSetServiceException
ReferenceSetService
ReferenceSet
by T2Reference
.
Note that this method blocks and may take some time to return in the case
of distributed reference managers; if this is likely to be an issue then
you should use the asynchronous form
getReferenceSetAsynch
instead of this method.getReferenceSet
in interface ReferenceSetService
id
- a T2Reference
identifying a ReferenceSet
to
retrieveReferenceSet
ReferenceSetServiceException
public ReferenceSet getReferenceSetWithAugmentation(T2Reference id, Set<Class<ExternalReferenceSPI>> ensureTypes, ReferenceContext context) throws ReferenceSetServiceException
ReferenceSetService
getReferenceSet
but with the additional option to specify a set of
ExternalReferenceSPI
classes. The reference set manager will
attempt to ensure that the returned ReferenceSet
contains an
instance of at least one of the specified classes. This method blocks,
and may potentially incur both the remote lookup overhead of the simpler
version of this call and any translation logic. It is strongly
recommended that you do not use this version of the call and instead use
the asynchronous form
getReferenceSetWithAugmentationAsynch
instead.
If the translation logic cannot provide at least one of the required
types this call will fail, even if the ReferenceSet
requested is
otherwise available.
getReferenceSetWithAugmentation
in interface ReferenceSetService
id
- a T2Reference
identifying a ReferenceSet
to
retrieveensureTypes
- a set of ExternalReferenceSPI
classes. The framework
will attempt to ensure there is an instance of at least one of
these classes in the returned ReferenceSet
context
- if translation of references is required the translation
infrastructure will need information in this
ReferenceContext
parameter.
If null the implementation should insert a new empty context and proceed.
ReferenceSet
ReferenceSetServiceException
public ReferenceSet registerReferenceSet(Set<ExternalReferenceSPI> references, ReferenceContext context) throws ReferenceSetServiceException
ReferenceSetService
ExternalReferenceSPI
instances, all of which
should point to byte equivalent data, and return the newly created
ReferenceSet
. This method blocks on the underlying store, but
guarantees that the returned value has been persisted.
The created references will be related with a workflow run id passed through ReferenceContext so we can track all data referenced by a specific run.
registerReferenceSet
in interface ReferenceSetService
references
- a set of ExternalReferenceSPI
implementations to
register as a ReferenceSet
ReferenceSet
ReferenceSetServiceException
public boolean delete(T2Reference reference) throws ReferenceServiceException
delete
in interface ReferenceSetService
ReferenceServiceException
public void deleteReferenceSetsForWorkflowRun(String workflowRunId) throws ReferenceServiceException
ReferenceSetService
ReferenceSet
S used by the specific workflow run.deleteReferenceSetsForWorkflowRun
in interface ReferenceSetService
ReferenceServiceException
Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.