Examples of canExpire()


Examples of com.github.restdriver.clientdriver.ClientDriverResponse.canExpire()

                    continue;
                }
               
                ClientDriverResponse response = expectation.getPair().getResponse();
               
                if (response.canExpire() && response.hasNotExpired()) {
                    period = DEFAULT_WAIT_INTERVAL;
                    break;
                }
               
                failedExpectations.add(expectation);
View Full Code Here

Examples of com.github.restdriver.clientdriver.ClientDriverResponse.canExpire()

        driver.addExpectation(
                onRequestTo("/path"),
                response);
       
        // Then
        assertThat(response.canExpire(), is(false));
    }
   
    @Test
    public void responseTimeoutOverridesClientDriverRuleExpectationTimeout() throws InterruptedException {
       
View Full Code Here

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

      if (bucket == null) {
         return null;
      }
      InternalCacheEntry se = bucket.getEntry(key);

      if (se != null && se.canExpire() && se.isExpired(timeService.wallClockTime())) {
         // We do not actually remove expired items from the store here.  We leave that up to the implementation,
         // since it may be a costly thing (remote connection, row locking on a JDBC store for example) for a
         // supposedly quick load operation.
         return null;
      } else {
View Full Code Here

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

   }

   @Override
   public InternalCacheEntry get(Object k) {
      InternalCacheEntry e = peek(k);
      if (e != null && e.canExpire()) {
         long currentTimeMillis = timeService.wallClockTime();
         if (e.isExpired(currentTimeMillis)) {
            entries.remove(k);
            e = null;
         } else {
View Full Code Here

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

   }

   @Override
   public boolean containsKey(Object k) {
      InternalCacheEntry ice = peek(k);
      if (ice != null && ice.canExpire() && ice.isExpired(timeService.wallClockTime())) {
         entries.remove(k);
         ice = null;
      }
      return ice != null;
   }
View Full Code Here

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

   }

   @Override
   public InternalCacheEntry remove(Object k) {
      InternalCacheEntry e = entries.remove(k);
      return e == null || (e.canExpire() && e.isExpired(timeService.wallClockTime())) ? null : e;
   }

   @Override
   public int size() {
      return entries.size();
View Full Code Here

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

      if (e != null) {
         e.setValue(v);
         if (lifespan > -1) e = e.setLifespan(lifespan);
         if (maxIdle > -1) e = e.setMaxIdle(maxIdle);

         if (e.canExpire()) {
            immortalEntries.remove(k);
            mortalEntries.put(k, e);
         }
      } else {
         e = mortalEntries.get(k);
View Full Code Here

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

   }

   @Override
   public InternalCacheEntry get(Object k) {
      InternalCacheEntry e = peek(k);
      if (e != null && e.canExpire()) {
         long currentTimeMillis = System.currentTimeMillis();
         if (e.isExpired(currentTimeMillis)) {
            entries.remove(k);
            e = null;
         } else {
View Full Code Here

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

   }

   @Override
   public boolean containsKey(Object k) {
      InternalCacheEntry ice = peek(k);
      if (ice != null && ice.canExpire() && ice.isExpired(System.currentTimeMillis())) {
         entries.remove(k);
         ice = null;
      }
      return ice != null;
   }
View Full Code Here

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

   }

   @Override
   public InternalCacheEntry remove(Object k) {
      InternalCacheEntry e = entries.remove(k);
      return e == null || (e.canExpire() && e.isExpired(System.currentTimeMillis())) ? null : e;
   }

   @Override
   public int size() {
      return entries.size();
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.