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()
IPreparedOperation
UUID
that will be used to uniquely identify this
operation (query, update, etc.).getQueryId
in interface IPreparedOperation
public final boolean isUpdate()
IPreparedOperation
true
iff this is a SPARQL UPDATE request (versus a
SPARQL query).isUpdate
in interface IPreparedOperation
public void addRequestParam(String name, String... val)
addRequestParam
in interface IPreparedQuery
protected void setupConnectOptions()
public void setAcceptHeader(String value)
IPreparedOperation
Accept
header.setAcceptHeader
in interface IPreparedOperation
value
- The value to be used.public void setHeader(String name, String value)
IPreparedOperation
setHeader
in interface IPreparedOperation
name
- The name of the HTTP header.value
- The value to be used.public void setMaxQueryMillis(long timeout)
IPreparedOperation
setMaxQueryMillis
in interface IPreparedOperation
timeout
- 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 IPreparedOperation
public String getHeader(String name)
IPreparedOperation
getHeader
in interface IPreparedOperation
name
- The name of the HTTP header.null
if the header is not defined.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.