Package com.fasterxml.storemate.store

Examples of com.fasterxml.storemate.store.Storable


        List<StorableKey> ids = requestEntity.entries;
        ArrayList<E> entries = new ArrayList<E>(ids.size());
        StorableStore store = _stores.getEntryStore();
       
        for (StorableKey key : ids) {
            Storable raw = store.findEntry(key);
            // note: this may give null as well; caller needs to check (converter passes null as-is)
            E entry = (E) _entryConverter.entryFromStorable(raw);
            entries.add(entry);
        }
        return (OUT) response.ok(new SyncPullResponse<E>(_fileManager, _syncPullSmileWriter, entries));
View Full Code Here


   
    static SyncListResponseEntry valueOf(StoredEntry<?> src)
    {
        SyncListResponseEntry e = new SyncListResponseEntry();
        e.key = src.getKey().asStorableKey();
        Storable raw = src.getRaw();
        e.insertionTime = raw.getLastModified();
        e.size = raw.isDeleted() ? -1L : raw.getStorageLength();
        return e;
    }
View Full Code Here

        StorableStore store = _stores.getEntryStore();

        try {
            for (StorableKey key : ids) {
                // null -> let's not pass 'metadata' yet since we don't use timings?
                Storable raw = store.findEntry(StoreOperationSource.SYNC, null, key);
                // note: this may give null as well; caller needs to check (converter passes null as-is)
                E entry = (E) _entryConverter.entryFromStorable(raw);
                entries.add(entry);
            }
        } catch (StoreException e) {
View Full Code Here

        if (timer != null) {
            timer.stop();
        }
        if (opStats != null) {
            if (_metricSizes != null) {
                Storable entity = opStats.getEntry();
                if (entity != null) {
                    _metricSizes.update(entity.getActualUncompressedLength());
                }
            }
            if (_metricEntryCounts != null) {
                _metricEntryCounts.update(opStats.getItemCount());
            }
View Full Code Here

        StorableStore store = _stores.getEntryStore();

        try {
            for (StorableKey key : ids) {
                // null -> let's not pass 'metadata' yet since we don't use timings?
                Storable raw = store.findEntry(StoreOperationSource.SYNC, null, key);
                // note: this may give null as well; caller needs to check (converter passes null as-is)
                E entry = (E) _entryConverter.entryFromStorable(raw);
                entries.add(entry);
            }
        } catch (StoreException e) {
View Full Code Here

        List<StorableKey> ids = requestEntity.entries;
        ArrayList<E> entries = new ArrayList<E>(ids.size());
        StorableStore store = _stores.getEntryStore();
       
        for (StorableKey key : ids) {
            Storable raw = store.findEntry(key);
            // note: this may give null as well; caller needs to check (converter passes null as-is)
            E entry = (E) _entryConverter.entryFromStorable(raw);
            entries.add(entry);
        }
        return (OUT) response.ok(new SyncPullResponse<E>(_fileManager, _syncPullSmileWriter, entries));
View Full Code Here

        StorableStore store = _stores.getEntryStore();

        try {
            for (StorableKey key : ids) {
                // null -> let's not pass 'metadata' yet since we don't use timings?
                Storable raw = store.findEntry(StoreOperationSource.SYNC, null, key);
                // note: this may give null as well; caller needs to check (converter passes null as-is)
                E entry = (E) _entryConverter.entryFromStorable(raw);
                entries.add(entry);
            }
        } catch (StoreException e) {
View Full Code Here

    public SyncPullEntry() { }

    SyncPullEntry(StoredEntry<?> src, int maxTTLSecs)
    {
        final Storable raw = src.getRaw();
        key = src.getKey().asStorableKey();
        creationTime = src.getCreationTime();
        checksum = raw.getContentHash();
        checksumForCompressed = raw.getCompressedHash();
       
        if (src.isDeleted()) {
            storageSize = -1L;
            size = -1L;
        } else {
            storageSize = raw.getStorageLength();
            size = raw.getOriginalLength();
        }
        compression = raw.getCompression();
        LastAccessUpdateMethod m = src.getLastAccessUpdateMethod();
        lastAccessMethod = (m == null) ? 0 : m.asByte();
        minTTLSecs = src.getMinTTLSinceAccessSecs();
        this.maxTTLSecs = maxTTLSecs;
       
View Full Code Here

        StorableStore store = _stores.getEntryStore();

        try {
            for (StorableKey key : ids) {
                // null -> let's not pass 'metadata' yet since we don't use timings?
                Storable raw = store.findEntry(StoreOperationSource.SYNC, null, key);
                // note: this may give null as well; caller needs to check (converter passes null as-is)
                E entry = (E) _entryConverter.entryFromStorable(raw);
                entries.add(entry);
            }
        } catch (StoreException e) {
View Full Code Here

   
    static SyncListResponseEntry valueOf(StoredEntry<?> src)
    {
        SyncListResponseEntry e = new SyncListResponseEntry();
        e.key = src.getKey().asStorableKey();
        Storable raw = src.getRaw();
        e.insertionTime = raw.getLastModified();
        e.size = raw.isDeleted() ? -1L : raw.getStorageLength();
        e.hash = raw.getContentHash();
        return e;
    }
View Full Code Here

TOP

Related Classes of com.fasterxml.storemate.store.Storable

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.