public class BigdataGraphEmbedded extends BigdataGraph implements com.tinkerpop.blueprints.TransactionalGraph, IChangeLog
BigdataSailRepository
and holds open an
unisolated connection to the database for the lifespan of the Graph (until
shutdown()
is called.Modifier and Type | Class and Description |
---|---|
class |
BigdataGraphEmbedded.BigdataReadOnlyGraph |
static interface |
BigdataGraphEmbedded.Options |
BigdataGraph.EdgeIterable, BigdataGraph.FusedIterable<T>, BigdataGraph.VertexIterable, BigdataGraph.WrappedResult<E>
Modifier and Type | Field and Description |
---|---|
protected boolean |
autocommitOnShutdown |
protected static com.tinkerpop.blueprints.Features |
FEATURES |
protected BigdataSailRepository |
repo |
EDGE, factory, LABEL, laxProperties, maxQueryTime, SPARQL_LOG_MAX, TYPE, VERTEX
Constructor and Description |
---|
BigdataGraphEmbedded(BigdataSail sail)
Create a Blueprints wrapper around a
BigdataSail instance. |
BigdataGraphEmbedded(BigdataSail sail,
BlueprintsValueFactory factory)
Create a Blueprints wrapper around a
BigdataSail instance with
a non-standard BlueprintsValueFactory implementation. |
BigdataGraphEmbedded(BigdataSail sail,
BlueprintsValueFactory factory,
Properties props)
Create a Blueprints wrapper around a
BigdataSail instance with
a non-standard BlueprintsValueFactory implementation. |
BigdataGraphEmbedded(BigdataSailRepository repo)
Create a Blueprints wrapper around a
BigdataSailRepository
instance. |
BigdataGraphEmbedded(BigdataSailRepository repo,
BlueprintsValueFactory factory,
Properties props)
Create a Blueprints wrapper around a
BigdataSailRepository
instance with a non-standard BlueprintsValueFactory implementation. |
Modifier and Type | Method and Description |
---|---|
void |
addListener(BigdataGraphListener listener) |
void |
cancel(RunningQuery rQuery)
Kill a running query specified by the RunningQuery object.
|
void |
cancel(String uuid)
Kill a running query specified by the UUID String.
|
void |
cancel(UUID queryId)
Kill a running query specified by the UUID.
|
void |
changeEvent(IChangeRecord record)
Changed events coming from bigdata.
|
void |
close()
Close any open resources.
|
void |
commit() |
BigdataSailRepositoryConnection |
cxn()
Different implementations will return different types of connections
depending on the mode (client/server, embedded, read-only, etc.)
|
StringBuilder |
dumpStore() |
com.tinkerpop.blueprints.Features |
getFeatures() |
RunningQuery |
getQueryByExternalId(String extQueryId)
Return the
RunningQuery for a currently executing SPARQL QUERY or
UPDATE request. |
RunningQuery |
getQueryById(UUID queryUuid)
Return the
RunningQuery for a currently executing SPARQL QUERY or
UPDATE request. |
protected QueryEngine |
getQueryEngine() |
BigdataGraphEmbedded.BigdataReadOnlyGraph |
getReadOnlyView() |
BigdataSailRepository |
getRepository() |
Collection<RunningQuery> |
getRunningQueries()
Return a Collection of running queries
|
protected boolean |
isQueryCancelled(UUID queryId)
Helper method to determine if a query was cancelled.
|
boolean |
isReadOnly()
Is this a read-only view of the graph?
|
protected List<IChangeRecord> |
materialize(List<IChangeRecord> records)
Materialize a batch of change records.
|
protected void |
notify(IChangeRecord record)
Turn a change record into a graph edit and notify the graph listeners.
|
protected void |
notifyRemoves()
Materialize and notify listeners of the remove events.
|
void |
removeListener(BigdataGraphListener listener) |
void |
rollback() |
String |
runningQueriesToString() |
protected UUID |
setQueryId(ASTContainer astContainer,
UUID queryUuid)
Determines the
UUID which will be associated with the
IRunningQuery . |
protected UUID |
setupQuery(BigdataSailRepositoryConnection cxn,
ASTContainer astContainer,
QueryType queryType,
String extId)
Note: This is also responsible for noticing the time at which the
query begins to execute and storing the
RunningQuery in the
m_queries map. |
void |
shutdown() |
void |
stopTransaction(com.tinkerpop.blueprints.TransactionalGraph.Conclusion arg0)
Deprecated.
|
protected void |
tearDownQuery(UUID queryId)
Remove the query from the internal queues.
|
protected BigdataGraphEdit |
toGraphEdit(IChangeRecord record)
Turn a bigdata change record into a graph edit.
|
void |
transactionAborted()
Notification of transaction aborted.
|
void |
transactionBegin()
Notification of transaction beginning.
|
void |
transactionCommited(long commitTime)
Notification of transaction committed.
|
void |
transactionPrepare()
Notification of transaction preparing for commit.
|
addEdge, addEdge, addEdge, addVertex, ask, ask, convert, finalizeQuery, fuse, getEdge, getEdges, getEdges, getElements, getProperty, getProperty, getProperty, getPropertyKeys, getValueFactory, getVertex, getVertices, getVertices, history, history, loadGraphML, project, project, query, removeEdge, removeProperty, removeProperty, removeVertex, select, select, setMaxQueryTime, setProperty, setProperty, toGraphAtom, toGraphAtom, toLiterals, toString, update, update
protected final BigdataSailRepository repo
protected final boolean autocommitOnShutdown
protected static final com.tinkerpop.blueprints.Features FEATURES
public BigdataGraphEmbedded(BigdataSail sail)
BigdataSail
instance.public BigdataGraphEmbedded(BigdataSail sail, BlueprintsValueFactory factory)
BigdataSail
instance with
a non-standard BlueprintsValueFactory
implementation.public BigdataGraphEmbedded(BigdataSail sail, BlueprintsValueFactory factory, Properties props)
BigdataSail
instance with
a non-standard BlueprintsValueFactory
implementation.public BigdataGraphEmbedded(BigdataSailRepository repo)
BigdataSailRepository
instance.public BigdataGraphEmbedded(BigdataSailRepository repo, BlueprintsValueFactory factory, Properties props)
BigdataSailRepository
instance with a non-standard BlueprintsValueFactory
implementation.public BigdataSailRepository getRepository()
public BigdataSailRepositoryConnection cxn() throws Exception
BigdataGraph
cxn
in class BigdataGraph
Exception
public BigdataGraphEmbedded.BigdataReadOnlyGraph getReadOnlyView() throws Exception
Exception
public void commit()
commit
in interface com.tinkerpop.blueprints.TransactionalGraph
public void rollback()
rollback
in interface com.tinkerpop.blueprints.TransactionalGraph
public void shutdown()
shutdown
in interface com.tinkerpop.blueprints.Graph
shutdown
in interface com.tinkerpop.blueprints.TransactionalGraph
@Deprecated public void stopTransaction(com.tinkerpop.blueprints.TransactionalGraph.Conclusion arg0)
stopTransaction
in interface com.tinkerpop.blueprints.TransactionalGraph
public StringBuilder dumpStore() throws Exception
Exception
public com.tinkerpop.blueprints.Features getFeatures()
getFeatures
in interface com.tinkerpop.blueprints.Graph
getFeatures
in class BigdataGraph
public void addListener(BigdataGraphListener listener)
public void removeListener(BigdataGraphListener listener)
public void changeEvent(IChangeRecord record)
changeEvent
in interface IChangeLog
record
- the IChangeRecord
protected void notify(IChangeRecord record)
record
- Bigdata change record.protected BigdataGraphEdit toGraphEdit(IChangeRecord record)
record
- Bigdata change recordprotected List<IChangeRecord> materialize(List<IChangeRecord> records)
records
- Bigdata change recordspublic void transactionBegin()
transactionBegin
in interface IChangeLog
public void transactionPrepare()
transactionPrepare
in interface IChangeLog
public void transactionCommited(long commitTime)
transactionCommited
in interface IChangeLog
commitTime
- The timestamp associated with the commit point.public void transactionAborted()
transactionAborted
in interface IChangeLog
public void close()
IChangeLog
close
in interface IChangeLog
protected void notifyRemoves()
protected QueryEngine getQueryEngine()
protected UUID setupQuery(BigdataSailRepositoryConnection cxn, ASTContainer astContainer, QueryType queryType, String extId)
Note: This is also responsible for noticing the time at which the
query begins to execute and storing the RunningQuery
in the
m_queries
map.
setupQuery
in class BigdataGraph
The
- connection.protected UUID setQueryId(ASTContainer astContainer, UUID queryUuid)
UUID
which will be associated with the
IRunningQuery
. If QueryHints.QUERYID
has already been
used by the application to specify the UUID
then that
UUID
is noted. Otherwise, a random UUID
is generated and
assigned to the query by binding it on the query hints.
Note: The ability to provide metadata from the ASTContainer
in
the StatusServlet
or the "EXPLAIN" page depends on the ability to
cross walk the queryIds as established by this method.
query
- The query.queryUuid
- UUID
which will be associated with the
IRunningQuery
and never null
.public RunningQuery getQueryById(UUID queryUuid)
BigdataGraph
RunningQuery
for a currently executing SPARQL QUERY or
UPDATE request.getQueryById
in class BigdataGraph
queryUuid
- The UUID
for the request.RunningQuery
iff it was found.public RunningQuery getQueryByExternalId(String extQueryId)
BigdataGraph
RunningQuery
for a currently executing SPARQL QUERY or
UPDATE request.getQueryByExternalId
in class BigdataGraph
RunningQuery
iff it was found.protected void tearDownQuery(UUID queryId)
tearDownQuery
in class BigdataGraph
protected boolean isQueryCancelled(UUID queryId)
isQueryCancelled
in class BigdataGraph
queryId
- public String runningQueriesToString()
public Collection<RunningQuery> getRunningQueries()
BigdataGraph
getRunningQueries
in class BigdataGraph
public void cancel(UUID queryId)
BigdataGraph
cancel
in class BigdataGraph
public void cancel(String uuid)
BigdataGraph
cancel
in class BigdataGraph
public void cancel(RunningQuery rQuery)
BigdataGraph
cancel
in class BigdataGraph
public boolean isReadOnly()
BigdataGraph
isReadOnly
in class BigdataGraph
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.