protected abstract class RemoteRepository.QueryOrUpdate extends Object implements IPreparedOperation, IPreparedQuery
Right now, the only metadata is the query ID.
| Modifier and Type | Field and Description |
|---|---|
protected ConnectOptions |
opts |
protected String |
query |
| Constructor and Description |
|---|
RemoteRepository.QueryOrUpdate(ConnectOptions opts,
UUID id,
String query) |
RemoteRepository.QueryOrUpdate(ConnectOptions opts,
UUID uuid,
String query,
boolean update) |
| Modifier and Type | Method and Description |
|---|---|
void |
addRequestParam(String name,
String... val) |
String |
getHeader(String name)
Return the value of the specified HTTP header.
|
long |
getMaxQueryMillis()
Return the maximum time in milliseconds that the query will be permitted
to run.
|
UUID |
getQueryId()
Return the
UUID that will be used to uniquely identify this
operation (query, update, etc.). |
boolean |
isUpdate()
Return
true iff this is a SPARQL UPDATE request (versus a
SPARQL query). |
void |
setAcceptHeader(String value)
Convenience method to set the
Accept header. |
void |
setHeader(String name,
String value)
Override the value of the specified HTTP header.
|
void |
setMaxQueryMillis(long timeout)
Specify the maximum time in milliseconds that the query will be permitted
to run.
|
protected void |
setupConnectOptions()
Setup the connection options.
|
protected final ConnectOptions opts
protected final String query
public RemoteRepository.QueryOrUpdate(ConnectOptions opts, UUID id, String query)
public RemoteRepository.QueryOrUpdate(ConnectOptions opts, UUID uuid, String query, boolean update)
id - The query id.query - The SPARQL query or update string.update - true iff this is a SPARQL update.public final UUID getQueryId()
IPreparedOperationUUID that will be used to uniquely identify this
operation (query, update, etc.).getQueryId in interface IPreparedOperationpublic final boolean isUpdate()
IPreparedOperationtrue iff this is a SPARQL UPDATE request (versus a
SPARQL query).isUpdate in interface IPreparedOperationpublic void addRequestParam(String name, String... val)
addRequestParam in interface IPreparedQueryprotected void setupConnectOptions()
public void setAcceptHeader(String value)
IPreparedOperationAccept header.setAcceptHeader in interface IPreparedOperationvalue - The value to be used.public void setHeader(String name, String value)
IPreparedOperationsetHeader in interface IPreparedOperationname - The name of the HTTP header.value - The value to be used.public void setMaxQueryMillis(long timeout)
IPreparedOperationsetMaxQueryMillis in interface IPreparedOperationtimeout - The timeout in milliseconds.(Set timeout on remote query)public long getMaxQueryMillis()
Note: -1L is returned if the http header is not
specified.
getMaxQueryMillis in interface IPreparedOperationpublic String getHeader(String name)
IPreparedOperationgetHeader in interface IPreparedOperationname - The name of the HTTP header.null if the header is not defined.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.