Examples of canExpire()


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

      InternalCacheEntry e = immortalEntries.get(k);
      if (e != null) {
         e.setValue(v);
         e = entryFactory.update(e, lifespan, maxIdle);

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

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

         private void fetchNext() {
            long currentTimeMillis = -1; //lazily look at the wall clock: we want to look no more than once, but not at all if all entries are immortal.
            while (it.hasNext()) {
               InternalCacheEntry e = it.next();
               if (e.canExpire()) {
                  if (currentTimeMillis == -1) currentTimeMillis = System.currentTimeMillis();
                  if (! e.isExpired(currentTimeMillis)) {
                     next = e;
                     return;
                  }
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()

      return entries.get(key);
   }

   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()

      entries.put(k, e);
   }

   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()

      return ice != null;
   }

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

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