Examples of StatementClient


Examples of com.facebook.presto.jdbc.internal.client.StatementClient

                ImmutableSet.of(new UserAgentRequestFilter(userAgent)));
    }

    public StatementClient startQuery(ClientSession session, String query)
    {
        return new StatementClient(httpClient, queryInfoCodec, session, query);
    }
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.client.StatementClient

                ImmutableSet.of(new UserAgentRequestFilter(userAgent)));
    }

    public StatementClient startQuery(ClientSession session, String query)
    {
        return new StatementClient(httpClient, queryInfoCodec, session, query);
    }
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.client.StatementClient

                ImmutableSet.of(new UserAgentRequestFilter(userAgent)));
    }

    public StatementClient startQuery(ClientSession session, String query)
    {
        return new StatementClient(httpClient, queryInfoCodec, session, query);
    }
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.client.StatementClient

                ImmutableSet.of(new UserAgentRequestFilter(userAgent)));
    }

    public StatementClient startQuery(ClientSession session, String query)
    {
        return new StatementClient(httpClient, queryInfoCodec, session, query);
    }
View Full Code Here

Examples of org.openrdf.http.client.StatementClient

      Resource... contexts)
    throws StoreException
  {
    StatementPattern pattern = new StatementPattern(subj, pred, obj, includeInferred, contexts);
    CachedSize cached = cachedSizes.get(pattern);
    StatementClient client = this.client.statements();
    client.setLimit(1);
    if (cached != null && (cached.isAbsent() || !cached.isSizeAvailable())) {
      // Only calculate if cached value is old
      client.ifNoneMatch(cached.getETag());
    }
    GraphResult result = client.get(subj, pred, obj, includeInferred, contexts);
    int maxAge = client.getMaxAge();
    if (result == null) {
      assert cached != null : "Server did not return a size value";
      cached.refreshed(now, maxAge);
    }
    else {
      cached = new CachedSize(result.hasNext(), client.getETag());
      cached.refreshed(now, maxAge);
      cachedSizes.put(pattern, cached);
    }
    containsFreshValues |= maxAge > 0;
    return cached.isAbsent();
View Full Code Here

Examples of org.openrdf.http.client.StatementClient

    if (noMatch(subj, pred, obj, inf, ctx)) {
      return new ModelNamespaceResult(this, new EmptyCursor<Statement>());
    }

    flush();
    StatementClient statements = client.statements();
    GraphResult result = statements.get(subj, pred, obj, inf, ctx);
    return new ModelResultImpl(new GraphQueryResultCursor(result));
  }
View Full Code Here

Examples of org.openrdf.http.client.StatementClient

    if (cachable(subj, pred, obj, contexts)) {
      return repository.hasStatement(subj, pred, obj, includeInferred, contexts);
    }
    flush();
    StatementClient statements = client.statements();
    statements.setLimit(1);
    GraphResult result = statements.get(subj, pred, obj, includeInferred, contexts);
    try {
      return result.hasNext();
    }
    finally {
      result.close();
View Full Code Here

Examples of org.openrdf.http.client.StatementClient

    if (repository.isReadOnly()) {
      throw new RepositoryReadOnlyException();
    }
    // Send bytes directly to the server
    flush();
    StatementClient httpClient = client.statements();
    if (inputStreamOrReader instanceof InputStream) {
      httpClient.upload(((InputStream)inputStreamOrReader), baseURI, dataFormat, false, contexts);
    }
    else if (inputStreamOrReader instanceof Reader) {
      httpClient.upload(((Reader)inputStreamOrReader), baseURI, dataFormat, false, contexts);
    }
    else {
      throw new IllegalArgumentException("inputStreamOrReader must be an InputStream or a Reader, is a: "
          + inputStreamOrReader.getClass());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.