Package org.fcrepo.kernel.impl.services
Class ReferenceServiceMetrics
- java.lang.Object
-
- org.fcrepo.kernel.impl.services.ReferenceServiceMetrics
-
- All Implemented Interfaces:
ReferenceService
@Component("referenceService") public class ReferenceServiceMetrics extends Object implements ReferenceService
ReferenceService wrapper for collecting metrics- Author:
- pwinckles
-
-
Constructor Summary
Constructors Constructor Description ReferenceServiceMetrics()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
commitTransaction(Transaction tx)
Commit any pending references.void
deleteAllReferences(Transaction tx, FedoraId resourceId)
Delete all references from a resource to any other resource.RdfStream
getInboundReferences(Transaction tx, FedoraResource resource)
Return a RDF stream of statements referring to the provided resource.void
reset()
Truncates the reference index.void
rollbackTransaction(Transaction tx)
Rollback any pending references.void
updateReferences(Transaction tx, FedoraId resourceId, String userPrincipal, RdfStream rdfStream)
Parse the stream of triples for references, add any new ones and remove any missing ones.
-
-
-
Constructor Detail
-
ReferenceServiceMetrics
public ReferenceServiceMetrics()
-
-
Method Detail
-
getInboundReferences
public RdfStream getInboundReferences(Transaction tx, FedoraResource resource)
Description copied from interface:ReferenceService
Return a RDF stream of statements referring to the provided resource.- Specified by:
getInboundReferences
in interfaceReferenceService
- Parameters:
tx
- the transaction or null if no transaction.resource
- the resource to get inbound references for.- Returns:
- RDF stream of inbound reference triples.
-
deleteAllReferences
public void deleteAllReferences(Transaction tx, FedoraId resourceId)
Description copied from interface:ReferenceService
Delete all references from a resource to any other resource.- Specified by:
deleteAllReferences
in interfaceReferenceService
- Parameters:
tx
- the transactionresourceId
- the ID of the resource referencing others.
-
updateReferences
public void updateReferences(Transaction tx, FedoraId resourceId, String userPrincipal, RdfStream rdfStream)
Description copied from interface:ReferenceService
Parse the stream of triples for references, add any new ones and remove any missing ones.- Specified by:
updateReferences
in interfaceReferenceService
- Parameters:
tx
- the transactionresourceId
- the subject ID of the triples.userPrincipal
- the user who's action is updating references.rdfStream
- the RDF stream.
-
commitTransaction
public void commitTransaction(Transaction tx)
Description copied from interface:ReferenceService
Commit any pending references.- Specified by:
commitTransaction
in interfaceReferenceService
- Parameters:
tx
- the transaction.
-
rollbackTransaction
public void rollbackTransaction(Transaction tx)
Description copied from interface:ReferenceService
Rollback any pending references.- Specified by:
rollbackTransaction
in interfaceReferenceService
- Parameters:
tx
- the transaction.
-
reset
public void reset()
Description copied from interface:ReferenceService
Truncates the reference index. This should only be called when rebuilding the index.- Specified by:
reset
in interfaceReferenceService
-
-