Q - the native query typeC - the constraint typeS - the solution typepublic class BasicSubscription<C,Q,S> extends Object implements Subscription
| Constructor and Description |
|---|
BasicSubscription(C sparqlQuery,
Q query,
java.util.function.BiConsumer<S,Long> solutionConsumer,
BasicStreamProcessor<?,C,Q,?,S> processor) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Marks this subscription as inactive, so that the query no longer receives results
|
C |
getConstraint() |
String |
getId() |
Q |
getQuery() |
java.util.function.BiConsumer<S,Long> |
getSolutionConsumer() |
boolean |
isActive() |
boolean |
renew(int ttl)
Renews the subscription for another ttl milliseconds (or indefinitely, if ttl=0),
provided the renewal operation is accepted by the query engine.
|
void |
setQuery(Q query) |
void |
setSolutionConsumer(java.util.function.BiConsumer<S,Long> solutionConsumer) |
public BasicSubscription(C sparqlQuery, Q query, java.util.function.BiConsumer<S,Long> solutionConsumer, BasicStreamProcessor<?,C,Q,?,S> processor)
public String getId()
getId in interface Subscriptionpublic boolean isActive()
isActive in interface SubscriptionStreamProcessor
(occupying resources and potentially receiving and handling query results)public void cancel()
throws IOException
Subscriptioncancel in interface SubscriptionIOException - if there is a problem communicating with this query engine
(for example, if there are network operations involved)public boolean renew(int ttl)
throws IOException
Subscriptionrenew in interface Subscriptionttl - the new time-to-live in seconds, or 0 for infinite time-to-liveIOException - if there is a problem communicating with this query engine
(for example, if there are network operations involved)public C getConstraint()
StreamProcessorpublic Q getQuery()
public java.util.function.BiConsumer<S,Long> getSolutionConsumer()
public void setQuery(Q query)
public void setSolutionConsumer(java.util.function.BiConsumer<S,Long> solutionConsumer)
Copyright © 2016. All Rights Reserved.