Creates this service on the instance.
Dataset.addService and Dataset.ensureService call this for you; use it directly only for a
service object you built yourself. The service starts out empty and syncs in the background,
so follow it with Service.waitUntilRunning.
The dataset this service makes queryable.
Which graphs this service has loaded, and how many statements each holds.
Refetch rather than using the cached copy.
This service's metadata: its type, status, and whether it is in sync with the dataset.
Whether this service reflects the dataset's current contents.
A service goes out of sync when the dataset changes under it, and keeps answering queries from the older data until it is updated — so a query can succeed and still be stale. Bring it back in line with Service.update. Always refetches, so this costs a request.
Runs a SPARQL query against this service.
The query to run.
The service has to be running, and to offer a SPARQL endpoint — an Elasticsearch service does not. It answers from the data it was built with, so a service that has fallen out of sync answers from the older data until you bring it up to date with Service.update. To query the dataset's data directly, using speedy, use Dataset.sparqlQuery.
Nothing is sent until you pick a result form on what this returns — see SparqlResults. Every form is a single request that returns the whole result set.
SPARQL Update is not available through a service; it goes through Dataset.sparqlUpdate.
From the awaited result form, if queryString is not valid SPARQL or is a SPARQL
Update, or if this service cannot answer queries.
Brings this service back in sync with the dataset, with downtime.
Optionalopts: { rollingUpdate: false }Brings this service back in sync with the dataset without downtime.
Optionalopts: {Set rollingUpdate: true; onProgress reports each step as it happens.
Builds a replacement alongside the running service and swaps them once it is ready, so queries keep being answered throughout. It costs the resources of two services while it runs.
If the service is already in sync with the dataset, or if its status is anything other
than "running" — unlike the plain form, which reloads regardless. Read
Service.getInfo's outOfSync and status first, or use the plain form.
Waits until this service can answer queries.
A service that makes a Dataset queryable — a SPARQL endpoint or a search index.
Remarks
Obtain one with Dataset.getService, Dataset.addService or Dataset.ensureService. Services are never constructed directly.
A newly created service is not immediately usable; wait for it with Service.waitUntilRunning.
A service reloads the dataset only when Service.update is called, never on its own. That is what lets one dataset carry several services on different states of the data at once — an acceptance service on the new data beside a production service still on the old, or an endpoint held back for a consumer that has not migrated yet.
Example: Make sure a dataset has a SPARQL service, and wait for it