Package org.infinispan.loader.bucket

Examples of org.infinispan.loader.bucket.Bucket.removeExpiredEntries()


    protected Set<InternalCacheEntry> loadAllLockSafe() throws CacheLoaderException {
        Set<InternalCacheEntry> result = new HashSet<InternalCacheEntry>();
        for (File bucketFile : root.listFiles()) {
            Bucket bucket = loadBucket(bucketFile);
            if (bucket != null) {
                if (bucket.removeExpiredEntries()) {
                    saveBucket(bucket);
                }
                result.addAll(bucket.getStoredEntries());
            }
        }
View Full Code Here


         ps = conn.prepareStatement(sql);
         int updateCount = 0;
         Iterator<Bucket> it = expiredBuckets.iterator();
         while (it.hasNext()) {
            Bucket bucket = it.next();
            bucket.removeExpiredEntries();
            if (!bucket.isEmpty()) {
               ByteBuffer byteBuffer = JdbcUtil.marshall(getMarshaller(), bucket);
               ps.setBinaryStream(1, byteBuffer.getStream(), byteBuffer.getLength());
               ps.setLong(2, bucket.timestampOfFirstEntryToExpire());
               ps.addBatch();
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.