Examples of touch()


Examples of org.graylog2.restclient.models.ClusterEntity.touch()

            try {
                // TODO implement streaming responses
                Response response = requestBuilder.execute().get(timeoutValue, timeoutUnit);

                target.touch();

                // TODO this is wrong, shouldn't it accept some callback instead of throwing an exception?
                if (!expectedResponseCodes.contains(response.getStatusCode())) {
                    throw new APIException(request, response);
                }
View Full Code Here

Examples of org.graylog2.restclient.models.Node.touch()

        final NodeSummaryResponse r1 = new NodeSummaryResponse();
        r1.transportAddress = "http://localhost:65534";
        r1.id = UUID.randomUUID().toString();

        final Node newNode = nodeFactory.fromSummaryResponse(r1);
        newNode.touch();
        final NodeSummaryResponse r2 = new NodeSummaryResponse();
        r2.transportAddress = firstNode.getTransportAddress();
        r2.id = firstNode.getNodeId();
        final Node sameAsInitialNode = nodeFactory.fromSummaryResponse(r2);
        sameAsInitialNode.touch();
View Full Code Here

Examples of org.graylog2.restclient.models.Node.touch()

        newNode.touch();
        final NodeSummaryResponse r2 = new NodeSummaryResponse();
        r2.transportAddress = firstNode.getTransportAddress();
        r2.id = firstNode.getNodeId();
        final Node sameAsInitialNode = nodeFactory.fromSummaryResponse(r2);
        sameAsInitialNode.touch();
        serverNodes.put(ImmutableList.of(newNode, sameAsInitialNode));

        final Map<Node, EmptyResponse> responses = api.put().nodes(serverNodes.all().toArray(new Node[0])).path("/").executeOnAll();

        assertTrue(responses.isEmpty());
View Full Code Here

Examples of org.graylog2.restclient.models.Node.touch()

        for (AddressNodeId n : nodeDesc) {
            NodeSummaryResponse r = new NodeSummaryResponse();
            r.transportAddress = n.address;
            r.id = n.nodeId;
            final Node node = factory.fromSummaryResponse(r);
            node.touch();
            nodes.add(node);
        }
        serverNodes.put(nodes);
    }
View Full Code Here

Examples of org.graylog2.restclient.models.Node.touch()

            for (F.Tuple<ListenableFuture<Response>, Node> requestAndNode : requests) {
                final ListenableFuture<Response> request = requestAndNode._1;
                final Node node = requestAndNode._2;
                try {
                    final Response response = request.get(timeoutValue, timeoutUnit);
                    node.touch();
                    results.put(node, deserializeJson(response, responseClass));
                } catch (InterruptedException e) {
                    LOG.error("API call Interrupted", e);
                    node.markFailure();
                } catch (ExecutionException e) {
View Full Code Here

Examples of org.infinispan.container.entries.InternalCacheEntry.touch()

         long currentTimeMillis = timeService.wallClockTime();
         if (e.isExpired(currentTimeMillis)) {
            entries.remove(k);
            e = null;
         } else {
            e.touch(currentTimeMillis);
         }
      }
      return e;
   }
View Full Code Here

Examples of org.infinispan.container.entries.InternalCacheEntry.touch()

      if (e != null) {
         if (e.isExpired()) {
            entries.remove(k);
            e = null;
         } else {
            e.touch();
         }
      }
      return e;
   }
View Full Code Here

Examples of org.infinispan.container.entries.InternalCacheEntry.touch()

      if (e != null) {
         if (e.isExpired()) {
            entries.remove(k);
            e = null;
         } else {
            e.touch();
         }
      }
      return e;
   }
View Full Code Here

Examples of org.infinispan.container.entries.InternalCacheEntry.touch()

      if (ice != null) {
         if (ice.isExpired()) {
            remove(k);
            ice = null;
         } else {
            ice.touch();
         }
      }
      return ice;
   }
View Full Code Here

Examples of org.infinispan.container.entries.InternalCacheEntry.touch()

         if (e.isExpired()) {
            mortalEntries.remove(k);
            numEntries.getAndDecrement();
            e = null;
         } else {
            e.touch();
         }
      }
      return e;
   }
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.