Interface Endpoint
- All Known Implementing Classes:
EndpointBase
,ManagedRepositoryEndpoint
,RepositoryEndpoint
,ResolvableEndpoint
public interface Endpoint
Structure to maintain endpoint information, e.g.
Repository
type, location.
The Repository
to use can be obtained by calling getRepository()
A RepositoryConnection
for interacting with the store can be obtained using getConnection()
. Note
that typically the TripleSource
of the endpoint should be used.
- Author:
- Andreas Schwarte
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturn aRepositoryConnection
for theRepository
represented by this endpoint.Get the endpoint location, e.g.Additional endpoint specific configuration.getId()
getName()
void
init
(FederationContext federationContext) Initialize thisEndpoint
boolean
boolean
void
shutDown()
Shutdown thisEndpoint
long
size()
Returns the size of the given repository, i.e.
-
Method Details
-
getRepository
Repository getRepository()- Returns:
- the initialized
Repository
-
getConnection
RepositoryConnection getConnection()Return aRepositoryConnection
for theRepository
represented by this endpoint.Callers of this method need to ensure to close the connection after use.
Typical pattern:
try (RepositoryConnection conn = endpoint.getConnection()) { // do something with the connection }
If the
RepositoryConnection
needs to stay open outside the scope of a method (e.g. for streaming results), consider usingCloseDependentConnectionIteration
.- Returns:
- the repository connection
- Throws:
RepositoryException
- if the repository is not initialized
-
getTripleSource
TripleSource getTripleSource()- Returns:
- the
TripleSource
-
getEndpointClassification
EndpointClassification getEndpointClassification()- Returns:
- the
EndpointClassification
-
isWritable
boolean isWritable()- Returns:
- whether this endpoint is writable
-
getId
String getId()- Returns:
- the identifier of the federation member
-
getName
String getName()- Returns:
- the name of the federation member
-
getEndpoint
String getEndpoint()Get the endpoint location, e.g. for SPARQL endpoints the url- Returns:
- the endpoint location
-
size
Returns the size of the given repository, i.e. the number of triples.- Returns:
- the size of the endpoint
- Throws:
RepositoryException
-
init
Initialize thisEndpoint
- Parameters:
federationContext
-- Throws:
RepositoryException
-
shutDown
-
isInitialized
boolean isInitialized()- Returns:
- whether this Endpoint is initialized
-
getEndpointConfiguration
EndpointConfiguration getEndpointConfiguration()Additional endpoint specific configuration.- Returns:
- the endpointConfiguration
-