Class FederationAccessManagerWithCache
java.lang.Object
se.liu.ida.hefquin.engine.federation.access.impl.FederationAccessManagerWithCache
- All Implemented Interfaces:
StatsProvider
,FederationAccessManager
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
protected static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Cache<FederationAccessManagerWithCache.Key,
CompletableFuture<? extends DataRetrievalResponse>> protected long
protected long
protected long
protected long
protected long
protected long
protected long
protected final Map<TriplePattern,
CompletableFuture<CardinalityResponse>> protected long
protected long
protected long
protected long
protected final FederationAccessManager
-
Constructor Summary
ConstructorsConstructorDescriptionFederationAccessManagerWithCache
(ExecutorService execService) Creates aFederationAccessManagerWithCache
with a default configuration.FederationAccessManagerWithCache
(FederationAccessManager fedAccMan, int cacheCapacity) FederationAccessManagerWithCache
(FederationAccessManager fedAccMan, int cacheCapacity, CachePolicies<FederationAccessManagerWithCache.Key, CompletableFuture<? extends DataRetrievalResponse>, ? extends CacheEntry<CompletableFuture<? extends DataRetrievalResponse>>> cachePolicies) -
Method Summary
Modifier and TypeMethodDescriptiongetStats()
Requests the cardinality of the result of the given request.issueCardinalityRequest
(TPFRequest req, BRTPFServer fm) issueCardinalityRequest
(TPFRequest req, TPFServer fm) issueRequest
(BRTPFRequest req, BRTPFServer fm) issueRequest
(Neo4jRequest req, Neo4jServer fm) issueRequest
(SPARQLRequest req, SPARQLEndpoint fm) issueRequest
(TPFRequest req, BRTPFServer fm) issueRequest
(TPFRequest req, TPFServer fm) void
-
Field Details
-
fedAccMan
-
cacheMap
-
cache
protected final Cache<FederationAccessManagerWithCache.Key,CompletableFuture<? extends DataRetrievalResponse>> cache -
cacheRequestsSPARQL
protected long cacheRequestsSPARQL -
cacheRequestsTPF
protected long cacheRequestsTPF -
cacheRequestsBRTPF
protected long cacheRequestsBRTPF -
cacheRequestsNeo4j
protected long cacheRequestsNeo4j -
cacheHitsSPARQL
protected long cacheHitsSPARQL -
cacheHitsTPF
protected long cacheHitsTPF -
cacheHitsBRTPF
protected long cacheHitsBRTPF -
cacheHitsNeo4j
protected long cacheHitsNeo4j -
cacheHitsSPARQLCardinality
protected long cacheHitsSPARQLCardinality -
cacheHitsTPFCardinality
protected long cacheHitsTPFCardinality -
cacheHitsBRTPFCardinality
protected long cacheHitsBRTPFCardinality
-
-
Constructor Details
-
FederationAccessManagerWithCache
public FederationAccessManagerWithCache(FederationAccessManager fedAccMan, int cacheCapacity, CachePolicies<FederationAccessManagerWithCache.Key, CompletableFuture<? extends DataRetrievalResponse>, ? extends CacheEntry<CompletableFuture<? extends DataRetrievalResponse>>> cachePolicies) -
FederationAccessManagerWithCache
-
FederationAccessManagerWithCache
Creates aFederationAccessManagerWithCache
with a default configuration.
-
-
Method Details
-
issueRequest
public CompletableFuture<SolMapsResponse> issueRequest(SPARQLRequest req, SPARQLEndpoint fm) throws FederationAccessException - Specified by:
issueRequest
in interfaceFederationAccessManager
- Throws:
FederationAccessException
-
issueRequest
public CompletableFuture<TPFResponse> issueRequest(TPFRequest req, TPFServer fm) throws FederationAccessException - Specified by:
issueRequest
in interfaceFederationAccessManager
- Throws:
FederationAccessException
-
issueRequest
public CompletableFuture<TPFResponse> issueRequest(TPFRequest req, BRTPFServer fm) throws FederationAccessException - Specified by:
issueRequest
in interfaceFederationAccessManager
- Throws:
FederationAccessException
-
issueRequest
public CompletableFuture<TPFResponse> issueRequest(BRTPFRequest req, BRTPFServer fm) throws FederationAccessException - Specified by:
issueRequest
in interfaceFederationAccessManager
- Throws:
FederationAccessException
-
issueRequest
public CompletableFuture<RecordsResponse> issueRequest(Neo4jRequest req, Neo4jServer fm) throws FederationAccessException - Specified by:
issueRequest
in interfaceFederationAccessManager
- Throws:
FederationAccessException
-
issueCardinalityRequest
public CompletableFuture<CardinalityResponse> issueCardinalityRequest(SPARQLRequest req, SPARQLEndpoint fm) throws FederationAccessException Description copied from interface:FederationAccessManager
Requests the cardinality of the result of the given request. Assumes that the given request contains aSPARQLGraphPattern
rather than a fullSPARQLQuery
. If it does not, then this method throws anIllegalArgumentException
.- Specified by:
issueCardinalityRequest
in interfaceFederationAccessManager
- Throws:
FederationAccessException
-
issueCardinalityRequest
public CompletableFuture<CardinalityResponse> issueCardinalityRequest(TPFRequest req, TPFServer fm) throws FederationAccessException - Specified by:
issueCardinalityRequest
in interfaceFederationAccessManager
- Throws:
FederationAccessException
-
issueCardinalityRequest
public CompletableFuture<CardinalityResponse> issueCardinalityRequest(TPFRequest req, BRTPFServer fm) throws FederationAccessException - Specified by:
issueCardinalityRequest
in interfaceFederationAccessManager
- Throws:
FederationAccessException
-
issueCardinalityRequest
public CompletableFuture<CardinalityResponse> issueCardinalityRequest(BRTPFRequest req, BRTPFServer fm) throws FederationAccessException - Specified by:
issueCardinalityRequest
in interfaceFederationAccessManager
- Throws:
FederationAccessException
-
resetStats
public void resetStats()- Specified by:
resetStats
in interfaceStatsProvider
-
getStats
- Specified by:
getStats
in interfaceFederationAccessManager
- Specified by:
getStats
in interfaceStatsProvider
-