Package com.fasterxml.storemate.store.lastaccess

Examples of com.fasterxml.storemate.store.lastaccess.EntryLastAccessed


    extends LastAccessConverter<K,E,LastAccessUpdateMethod>
{
    @Override
    public EntryLastAccessed createLastAccessed(E entry, long accessTime)
    {
        return new EntryLastAccessed(accessTime, entry.calculateMaxExpirationTime(),
                entry.getLastAccessUpdateMethod().asByte());
    }
View Full Code Here


            throw new IllegalArgumentException("LastAccessed entry length must be 17 bytes, was: "+length);
        }
        long accessTime = ByteUtil.getLongBE(raw, offset);
        long expirationTime = ByteUtil.getLongBE(raw, offset+8);
        byte type = raw[16];
        return new EntryLastAccessed(accessTime, expirationTime, type);
    }
View Full Code Here

    extends LastAccessConverter<K,E,LastAccessUpdateMethod>
{
    @Override
    public EntryLastAccessed createLastAccessed(E entry, long accessTime)
    {
        return new EntryLastAccessed(accessTime, entry.calculateMaxExpirationTime(),
                entry.getLastAccessUpdateMethod().asByte());
    }
View Full Code Here

            throw new IllegalArgumentException("LastAccessed entry length must be 17 bytes, was: "+length);
        }
        long accessTime = ByteUtil.getLongBE(raw, offset);
        long expirationTime = ByteUtil.getLongBE(raw, offset+8);
        byte type = raw[16];
        return new EntryLastAccessed(accessTime, expirationTime, type);
    }
View Full Code Here

             *   increasing timestamps? Since this is not used for peer-to-peer syncing,
             *   minor deviations from exact value are ok (deletion occurs after hours,
             *   or at most minutes since last access), so let's avoid extra lookup.
             *   Same goes for other settings
             */
            EntryLastAccessed acc = _lastAccessedConverter.createLastAccessed(entry, timestamp);
                    //_entryConverter.createLastAccessed(entry, timestamp);
            _store.put(null, lastAccessKey, new DatabaseEntry(acc.asBytes()));
        }
    }
View Full Code Here

            final DatabaseEntry data = new DatabaseEntry();
           
            try {
                while (crsr.getNext(keyEntry, data, null) == OperationStatus.SUCCESS) {
                    StorableKey key = _storableKey(keyEntry);
                    EntryLastAccessed entry = _lastAccessedConverter.createLastAccessed(data.getData(),
                            data.getOffset(), data.getSize());
                    if (cb.processEntry(key, entry) == IterationAction.TERMINATE_ITERATION) {
                        return IterationResult.TERMINATED_FOR_ENTRY;
                    }
                }
View Full Code Here

             *   increasing timestamps? Since this is not used for peer-to-peer syncing,
             *   minor deviations from exact value are ok (deletion occurs after hours,
             *   or at most minutes since last access), so let's avoid extra lookup.
             *   Same goes for other settings
             */
            EntryLastAccessed acc = _entryConverter.createLastAccessed(entry, timestamp);
            _store.put(null, lastAccessKey, new DatabaseEntry(acc.asBytes()));
        }
    }
View Full Code Here

            final DatabaseEntry data = new DatabaseEntry();
           
            try {
                while (crsr.getNext(keyEntry, data, null) == OperationStatus.SUCCESS) {
                    StorableKey key = _storableKey(keyEntry);
                    EntryLastAccessed entry = _entryConverter.createLastAccessed(data.getData(),
                            data.getOffset(), data.getSize());

                    if (cb.processEntry(key, entry) == IterationAction.TERMINATE_ITERATION) {
                        return IterationResult.TERMINATED_FOR_ENTRY;
                    }
View Full Code Here

TOP

Related Classes of com.fasterxml.storemate.store.lastaccess.EntryLastAccessed

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.