Examples of toInternalCacheValue()


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

         public boolean fromStreamProcess(Object objFromStream, PreparedStatement ps, ObjectInput objectInput) throws SQLException, CacheLoaderException {
            if (objFromStream instanceof InternalCacheEntry) {
               InternalCacheEntry se = (InternalCacheEntry) objFromStream;
               String key = key2StringMapper.getStringMapping(se.getKey());
               ByteBuffer buffer = JdbcUtil.marshall(getMarshaller(), se.toInternalCacheValue());
               ps.setBinaryStream(1, buffer.getStream(), buffer.getLength());
               ps.setLong(2, se.getExpiryTime());
               ps.setString(3, key);
               return true;
            } else {
View Full Code Here

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

     

   private InternalCacheValue loadValue(CacheStore cs, Object k) {
      try {
         InternalCacheEntry ice = cs.load(k);
         return ice == null ? null : ice.toInternalCacheValue();
      } catch (CacheLoaderException cle) {
         log.warn("Unable to load " + k + " from cache loader", cle);
      }
      return null;
   }
View Full Code Here

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

         if (trace) log.trace("Handling an internal cache entry...");
         MVCCEntry mvccEntry = (MVCCEntry) cacheEntry;
         return entryFactory.createValue(mvccEntry);
      } else {
         InternalCacheEntry internalCacheEntry = (InternalCacheEntry) cacheEntry;
         return internalCacheEntry.toInternalCacheValue();
      }
   }

   private void acquireLocksIfNeeded() throws Throwable {
      if (acquireRemoteLock) {
View Full Code Here

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

      assert !cs.containsKey("k");

      long lifespan = 200000;
      long idle = 120000;
      InternalCacheEntry se = TestInternalCacheEntryFactory.create("k", "v", lifespan, idle);
      InternalCacheValue icv = se.toInternalCacheValue();
      assertEquals(se.getCreated(), icv.getCreated());
      assertEquals(se.getLastUsed(), icv.getLastUsed());
      cs.store(se);

      assert cs.containsKey("k");
View Full Code Here

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

         public boolean fromStreamProcess(Object objFromStream, PreparedStatement ps, ObjectInput objectInput) throws SQLException, CacheLoaderException {
            if (objFromStream instanceof InternalCacheEntry) {
               InternalCacheEntry se = (InternalCacheEntry) objFromStream;
               String key = key2StringMapper.getStringMapping(se.getKey());
               ByteBuffer buffer = JdbcUtil.marshall(getMarshaller(), se.toInternalCacheValue());
               ps.setBinaryStream(1, buffer.getStream(), buffer.getLength());
               ps.setLong(2, se.getExpiryTime());
               ps.setString(3, key);
               return true;
            } else {
View Full Code Here

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

         @Override
         public boolean fromStreamProcess(Object objFromStream, PreparedStatement ps, ObjectInput objectInput) throws SQLException, CacheLoaderException, InterruptedException {
            if (objFromStream instanceof InternalCacheEntry) {
               InternalCacheEntry se = (InternalCacheEntry) objFromStream;
               ByteBuffer buffer = JdbcUtil.marshall(getMarshaller(), se.toInternalCacheValue());
               ps.setBinaryStream(1, buffer.getStream(), buffer.getLength());
               ps.setLong(2, se.getExpiryTime());
               ps.setString(3, (String) se.getKey());
               return true;
            } else {
View Full Code Here

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

            // lookup
            if (cacheLoaderManager != null && cacheLoaderManager.getCacheLoader() != null) {
               cacheEntry = cacheLoaderManager.getCacheLoader().load(key);
            }
         }
         return cacheEntry != null ? cacheEntry.toInternalCacheValue() : null;
      } else {
         throw new CacheException("Invalid command. Missing key!");
      }
   }
View Full Code Here

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

     

   private InternalCacheValue loadValue(CacheStore cs, Object k) {
      try {
         InternalCacheEntry ice = cs.load(k);
         return ice == null ? null : ice.toInternalCacheValue();
      } catch (CacheLoaderException cle) {
         log.warn("Unable to load " + k + " from cache loader", cle);
      }
      return null;
   }
View Full Code Here

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

     

   private InternalCacheValue loadValue(CacheStore cs, Object k) {
      try {
         InternalCacheEntry ice = cs.load(k);
         return ice == null ? null : ice.toInternalCacheValue();
      } catch (CacheLoaderException cle) {
         log.warn("Unable to load " + k + " from cache loader", cle);
      }
      return null;
   }
View Full Code Here

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

         }

         public boolean fromStreamProcess(Object objFromStream, PreparedStatement ps, ObjectInput objectInput) throws SQLException, CacheLoaderException, InterruptedException {
            if (objFromStream instanceof InternalCacheEntry) {
               InternalCacheEntry se = (InternalCacheEntry) objFromStream;
               ByteBuffer buffer = JdbcUtil.marshall(getMarshaller(), se.toInternalCacheValue());
               ps.setBinaryStream(1, buffer.getStream(), buffer.getLength());
               ps.setLong(2, se.getExpiryTime());
               ps.setString(3, (String) se.getKey());
               return true;
            } else {
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.