Package org.infinispan.persistence.jpa.impl

Examples of org.infinispan.persistence.jpa.impl.MetadataEntityKey


            try {
               keyBytes = marshaller.objectToByteBuffer(key);
            } catch (Exception e) {
               throw new JpaStoreException("Failed to marshall key", e);
            }
            metadata = findMetadata(em, new MetadataEntityKey(keyBytes));
         }

         EntityTransaction txn = em.getTransaction();
         if (trace) log.trace("Removing " + entity + "(" + toString(metadata) + ")");
         long txnBegin = timeService.time();
View Full Code Here


                  try {
                     keyBytes = marshaller.objectToByteBuffer(key);
                  } catch (Exception e) {
                     throw new JpaStoreException("Cannot marshall key", e);
                  }
                  MetadataEntity metadata = findMetadata(em, new MetadataEntityKey(keyBytes));
                  if (trace) log.trace("Metadata " + key + " -> " + toString(metadata));
                  return metadata == null || metadata.getExpiration() > timeService.wallClockTime();
               } else {
                  return true;
               }
View Full Code Here

                  try {
                     keyBytes = marshaller.objectToByteBuffer(key);
                  } catch (Exception e) {
                     throw new JpaStoreException("Failed to marshall key", e);
                  }
                  MetadataEntity metadata = findMetadata(em, new MetadataEntityKey(keyBytes));
                  if (metadata != null && metadata.getMetadata() != null) {
                     try {
                        m = (InternalMetadata) marshaller.objectFromByteBuffer(metadata.getMetadata());
                     } catch (Exception e) {
                        throw new JpaStoreException("Failed to unmarshall metadata", e);
View Full Code Here

      try {
         keyBytes = marshaller.objectToByteBuffer(key);
      } catch (Exception e) {
         throw new JpaStoreException("Failed to marshall key", e);
      }
      MetadataEntity m = findMetadata(em, new MetadataEntityKey(keyBytes));
      if (m == null) return null;

      try {
         return (InternalMetadata) marshaller.objectFromByteBuffer(m.getMetadata());
      } catch (Exception e) {
View Full Code Here

            }

            metadataKeys = criteria.scroll(ScrollMode.FORWARD_ONLY);
            ArrayList<MetadataEntityKey> batch = new ArrayList<MetadataEntityKey>((int) configuration.batchSize());
            while (metadataKeys.next()) {
               MetadataEntityKey mKey = (MetadataEntityKey) metadataKeys.get(0);
               batch.add(mKey);
               if (batch.size() == configuration.batchSize()) {
                  purgeBatch(batch, listener, eacs, currentTime);
                  batch.clear();
               }
View Full Code Here

            try {
               keyBytes = marshaller.objectToByteBuffer(key);
            } catch (Exception e) {
               throw new JpaStoreException("Failed to marshall key", e);
            }
            metadata = findMetadata(em, new MetadataEntityKey(keyBytes));
         }

         EntityTransaction txn = em.getTransaction();
         if (trace) log.trace("Removing " + entity + "(" + toString(metadata) + ")");
         long txnBegin = timeService.time();
View Full Code Here

                  try {
                     keyBytes = marshaller.objectToByteBuffer(key);
                  } catch (Exception e) {
                     throw new JpaStoreException("Cannot marshall key", e);
                  }
                  MetadataEntity metadata = findMetadata(em, new MetadataEntityKey(keyBytes));
                  if (trace) log.trace("Metadata " + key + " -> " + toString(metadata));
                  return metadata == null || metadata.getExpiration() > timeService.wallClockTime();
               } else {
                  return true;
               }
View Full Code Here

                  try {
                     keyBytes = marshaller.objectToByteBuffer(key);
                  } catch (Exception e) {
                     throw new JpaStoreException("Failed to marshall key", e);
                  }
                  MetadataEntity metadata = findMetadata(em, new MetadataEntityKey(keyBytes));
                  if (metadata != null && metadata.getMetadata() != null) {
                     try {
                        m = (InternalMetadata) marshaller.objectFromByteBuffer(metadata.getMetadata());
                     } catch (Exception e) {
                        throw new JpaStoreException("Failed to unmarshall metadata", e);
View Full Code Here

      try {
         keyBytes = marshaller.objectToByteBuffer(key);
      } catch (Exception e) {
         throw new JpaStoreException("Failed to marshall key", e);
      }
      MetadataEntity m = findMetadata(em, new MetadataEntityKey(keyBytes));
      if (m == null) return null;

      try {
         return (InternalMetadata) marshaller.objectFromByteBuffer(m.getMetadata());
      } catch (Exception e) {
View Full Code Here

            }

            metadataKeys = criteria.scroll(ScrollMode.FORWARD_ONLY);
            ArrayList<MetadataEntityKey> batch = new ArrayList<MetadataEntityKey>((int) configuration.batchSize());
            while (metadataKeys.next()) {
               MetadataEntityKey mKey = (MetadataEntityKey) metadataKeys.get(0);
               batch.add(mKey);
               if (batch.size() == configuration.batchSize()) {
                  purgeBatch(batch, listener, eacs, currentTime);
                  batch.clear();
               }
View Full Code Here

TOP

Related Classes of org.infinispan.persistence.jpa.impl.MetadataEntityKey

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.