at.newmedialab.ldclient.api
Interface LDCacheProvider

All Known Implementing Classes:
AbstractLDBackend, LDMemoryBackend, LDPersistentBackend

public interface LDCacheProvider

An interface specifying a factory that provides different caching mechanisms, e.g. in-memory or file storage. A cache provider typically offers two kinds of caching services, one for the retrieved triples (a sesame repository) and one for the caching metadata (a map from URIs to CacheEntry).

Author: Sebastian Schaffert


Method Summary
 Map<String,CacheEntry> getMetadataRepository()
          Return a map that can be used to store caching metadata about resources.
 org.openrdf.repository.Repository getTripleRepository()
          Return the sesame repository used for storing the triples that are retrieved from the Linked Data Cloud.
 Collection<Endpoint> listEndpoints()
          List all endpoints currently registered with the Linked Data cache provider.
 void registerEndpoint(Endpoint endpoint)
          Register a new Linked Data endpoint with this cache provider.
 void unregisterEndpoint(Endpoint endpoint)
          Unregister the Linked Data endpoint given as argument.
 

Method Detail

getTripleRepository

org.openrdf.repository.Repository getTripleRepository()
Return the sesame repository used for storing the triples that are retrieved from the Linked Data Cloud. Triples will always be added to the context http://www.newmedialab.at/ldclient/cache to be able to distinguish them from other triples.

Returns:
an initialised Sesame repository that can be used for caching triples

getMetadataRepository

Map<String,CacheEntry> getMetadataRepository()
Return a map that can be used to store caching metadata about resources. The LDCacheProvider should take care of persisting the metadata if desired.

Returns:
a map for storing caching metadata

registerEndpoint

void registerEndpoint(Endpoint endpoint)
Register a new Linked Data endpoint with this cache provider.

Parameters:
endpoint -

listEndpoints

Collection<Endpoint> listEndpoints()
List all endpoints currently registered with the Linked Data cache provider.

Returns:
a collection of endpoints

unregisterEndpoint

void unregisterEndpoint(Endpoint endpoint)
Unregister the Linked Data endpoint given as argument.

Parameters:
endpoint - the endpoint to unregister


Copyright © 2012-2013 Salzburg Research. All Rights Reserved.