Package org.infinispan.container.entries.versioned

Examples of org.infinispan.container.entries.versioned.VersionedTransientMortalCacheEntry$Externalizer


         return new TransientMortalCacheEntry(key, value, maxIdle, lifespan, lastUsed, created);
      } else {
         if (lifespan < 0 && maxIdle < 0) return new VersionedImmortalCacheEntry(key, value, version);
         if (lifespan > -1 && maxIdle < 0) return new VersionedMortalCacheEntry(key, value, version, lifespan, created);
         if (lifespan < 0 && maxIdle > -1) return new VersionedTransientCacheEntry(key, value, version, maxIdle, lastUsed);
         return new VersionedTransientMortalCacheEntry(key, value, version, maxIdle, lifespan, lastUsed, created);
      }
   }
View Full Code Here


         return new TransientMortalCacheEntry(key, value, maxIdle, lifespan);
      } else {
         if (lifespan < 0 && maxIdle < 0) return new VersionedImmortalCacheEntry(key, value, version);
         if (lifespan > -1 && maxIdle < 0) new VersionedMortalCacheEntry(key, value, version, lifespan);
         if (lifespan < 0 && maxIdle > -1) new VersionedTransientCacheEntry(key, value, version, maxIdle);
         return new VersionedTransientMortalCacheEntry(key, value, version, maxIdle, lifespan);
      }
   }
View Full Code Here

         } else {
            if (maxIdle < 0) {
               return new VersionedMortalCacheEntry(ice.getKey(), ice.getValue(), version, lifespan);
            } else {
               long ctm = System.currentTimeMillis();
               return new VersionedTransientMortalCacheEntry(ice.getKey(), ice.getValue(), version, maxIdle, lifespan, ctm, ctm);
            }
         }
      } else if (ice instanceof MortalCacheEntry) {
         if (lifespan < 0) {
            if (maxIdle < 0) {
               return new VersionedImmortalCacheEntry(ice.getKey(), ice.getValue(), version);
            } else {
               return new VersionedTransientCacheEntry(ice.getKey(), ice.getValue(), version, maxIdle);
            }
         } else {
            if (maxIdle < 0) {
               ice.setLifespan(lifespan);
               return ice;
            } else {
               long ctm = System.currentTimeMillis();
               return new VersionedTransientMortalCacheEntry(ice.getKey(), ice.getValue(), version, maxIdle, lifespan, ctm, ctm);
            }
         }
      } else if (ice instanceof TransientCacheEntry) {
         if (lifespan < 0) {
            if (maxIdle < 0) {
               return new VersionedImmortalCacheEntry(ice.getKey(), ice.getVersion(), version);
            } else {
               ice.setMaxIdle(maxIdle);
               return ice;
            }
         } else {
            if (maxIdle < 0) {
               return new VersionedMortalCacheEntry(ice.getKey(), ice.getValue(), version, lifespan);
            } else {
               long ctm = System.currentTimeMillis();
               return new VersionedTransientMortalCacheEntry(ice.getKey(), ice.getValue(), version, maxIdle, lifespan, ctm, ctm);
            }
         }
      } else if (ice instanceof TransientMortalCacheEntry) {
         if (lifespan < 0) {
            if (maxIdle < 0) {
View Full Code Here

   @Override
   public InternalCacheEntry create(Object key, Object value, EntryVersion version, long created, long lifespan, long lastUsed, long maxIdle) {
      if (lifespan < 0 && maxIdle < 0) return new VersionedImmortalCacheEntry(key, value, version);
      if (lifespan > -1 && maxIdle < 0) return new VersionedMortalCacheEntry(key, value, version, lifespan, created);
      if (lifespan < 0 && maxIdle > -1) return new VersionedTransientCacheEntry(key, value, version, maxIdle, lastUsed);
      return new VersionedTransientMortalCacheEntry(key, value, version, maxIdle, lifespan, lastUsed, created);
   }
View Full Code Here

   public InternalCacheEntry create(Object key, Object value, EntryVersion version, long lifespan, long maxIdle) {
      if (lifespan < 0 && maxIdle < 0) return new VersionedImmortalCacheEntry(key, value, version);
      if (lifespan > -1 && maxIdle < 0) new VersionedMortalCacheEntry(key, value, version, lifespan);
      if (lifespan < 0 && maxIdle > -1) new VersionedTransientCacheEntry(key, value, version, maxIdle);

      return new VersionedTransientMortalCacheEntry(key, value, version, maxIdle, lifespan);
   }
View Full Code Here

         } else {
            if (maxIdle < 0) {
               return new VersionedMortalCacheEntry(ice.getKey(), ice.getValue(), version, lifespan);
            } else {
               long ctm = System.currentTimeMillis();
               return new VersionedTransientMortalCacheEntry(ice.getKey(), ice.getValue(), version, maxIdle, lifespan, ctm, ctm);
            }
         }
      } else if (ice instanceof MortalCacheEntry) {
         if (lifespan < 0) {
            if (maxIdle < 0) {
               return new VersionedImmortalCacheEntry(ice.getKey(), ice.getValue(), version);
            } else {
               return new VersionedTransientCacheEntry(ice.getKey(), ice.getValue(), version, maxIdle);
            }
         } else {
            if (maxIdle < 0) {
               ice.setLifespan(lifespan);
               return ice;
            } else {
               long ctm = System.currentTimeMillis();
               return new VersionedTransientMortalCacheEntry(ice.getKey(), ice.getValue(), version, maxIdle, lifespan, ctm, ctm);
            }
         }
      } else if (ice instanceof TransientCacheEntry) {
         if (lifespan < 0) {
            if (maxIdle < 0) {
               return new VersionedImmortalCacheEntry(ice.getKey(), ice.getVersion(), version);
            } else {
               ice.setMaxIdle(maxIdle);
               return ice;
            }
         } else {
            if (maxIdle < 0) {
               return new VersionedMortalCacheEntry(ice.getKey(), ice.getValue(), version, lifespan);
            } else {
               long ctm = System.currentTimeMillis();
               return new VersionedTransientMortalCacheEntry(ice.getKey(), ice.getValue(), version, maxIdle, lifespan, ctm, ctm);
            }
         }
      } else if (ice instanceof TransientMortalCacheEntry) {
         if (lifespan < 0) {
            if (maxIdle < 0) {
View Full Code Here

TOP

Related Classes of org.infinispan.container.entries.versioned.VersionedTransientMortalCacheEntry$Externalizer

Copyright © 2018 www.massapicom. 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.