Package org.infinispan.persistence

Examples of org.infinispan.persistence.MarshalledEntryImpl$Externalizer


      protected Object visitSingleStore(InvocationContext ctx, FlagAffectedCommand command, Object key) throws Throwable {
         if (isProperWriter(ctx, command, key)) {
            if (generateStatistics) putCount++;
            InternalCacheValue sv = getStoredValue(key, ctx);
            MarshalledEntryImpl me = new MarshalledEntryImpl(key, sv.getValue(), internalMetadata(sv), marshaller);
            persistenceManager.writeToAllStores(me, command.hasFlag(Flag.SKIP_SHARED_CACHE_STORE));
         }
         return null;
      }
View Full Code Here


         ps.setString(1, lockingKey);
         rs = ps.executeQuery();
         if (rs.next()) {
            InputStream inputStream = rs.getBinaryStream(2);
            KeyValuePair<ByteBuffer, ByteBuffer> icv = JdbcUtil.unmarshall(ctx.getMarshaller(), inputStream);
            storedValue = new MarshalledEntryImpl(key, icv.getKey(), icv.getValue(), ctx.getMarshaller());
         }
      } catch (SQLException e) {
         log.sqlFailureReadingKey(key, lockingKey, e);
         throw new CacheLoaderException(String.format(
               "SQL error while fetching stored entry with key: %s, lockingKey: %s",
View Full Code Here

                     continue;
                  InputStream inputStream = rs.getBinaryStream(1);
                  MarshalledEntry entry;
                  if (fetchValue || fetchMetadata) {
                     KeyValuePair<ByteBuffer, ByteBuffer> kvp = JdbcUtil.unmarshall(ctx.getMarshaller(), inputStream);
                     entry = new MarshalledEntryImpl(key, kvp.getKey(), kvp.getValue(), ctx.getMarshaller());
                  } else {
                     entry = new MarshalledEntryImpl(key, (Object)null, null, ctx.getMarshaller());
                  }
                  task.processEntry(entry, taskContext);
               }
               return null;
            } catch (SQLException e) {
View Full Code Here

TOP

Related Classes of org.infinispan.persistence.MarshalledEntryImpl$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.