Package com.fasterxml.clustermate.api.msg

Examples of com.fasterxml.clustermate.api.msg.ListItem


    /**
     * Helper method that can be used as the baseline implementation for
     * {@link #listItemFromStorable(Storable)} by tests.
     */
    protected ListItem defaultMinimalListItemFromStorable(Storable raw) {
        return new ListItem(raw.getKey(), raw.getContentHash(), raw.getActualUncompressedLength());
    }
View Full Code Here


    /**
     * Helper method that can be used as the baseline implementation for
     * {@link #listItemFromStorable(Storable)} by tests.
     */
    protected ListItem defaultListItemFromStorable(Storable raw) {
        return new ListItem(raw.getKey(), raw.getContentHash(), raw.getActualUncompressedLength());
    }
View Full Code Here

       
        switch (listType) {
        case entries:
            {
                List<ListItem> items = _listItems(rawPrefix, lastSeen, limits);
                ListItem lastItem = _last(items);
                listResponse = new ListResponse.ItemListResponse(items,
                        (lastItem == null) ? null : lastItem.getKey());
            }
            break;
        case ids:
            {
                List<StorableKey> ids = _listIds(rawPrefix, lastSeen, limits);
View Full Code Here

                }
                return IterationAction.PROCESS_ENTRY;
            }
            @Override
            public IterationAction processEntry(Storable entry) throws StoreException {
                result.add(new ListItem(entry.getKey(),
                        entry.getContentHash(), entry.getActualUncompressedLength()));
                if (result.size() >= maxEntries) {
                    return IterationAction.TERMINATE_ITERATION;
                }
                return IterationAction.PROCESS_ENTRY;
View Full Code Here

            break;
        case minimalEntries:
        case fullEntries:
            {
                List<ListItem> items = _listItems(listType, rawPrefix, lastSeen, limits);
                ListItem lastItem = _last(items);
                if (listType == ListItemType.minimalEntries) {
                    listResponse = new ListResponse.MinimalItemListResponse(items,
                            (lastItem == null) ? null : lastItem.getKey());
                } else {
                    listResponse = new ListResponse<ListItem>(items,
                            (lastItem == null) ? null : lastItem.getKey());
                }
            }
            break;
        default:
            throw new IllegalStateException();
View Full Code Here

            break;
        case minimalEntries:
        case fullEntries:
            {
                List<ListItem> items = _listItems(stats, listType, rawPrefix, lastSeen, limits);
                ListItem lastItem = _last(items);
                if (listType == ListItemType.minimalEntries) {
                    listResponse = new ListResponse.MinimalItemListResponse(items,
                            (lastItem == null) ? null : lastItem.getKey());
                } else {
                    listResponse = new ListResponse<ListItem>(items,
                            (lastItem == null) ? null : lastItem.getKey());
                }
            }
            break;
        default:
            throw new IllegalStateException();
View Full Code Here

            break;
        case minimalEntries:
        case fullEntries:
            {
                List<ListItem> items = _listItems(stats, listType, rawPrefix, lastSeen, limits);
                ListItem lastItem = _last(items);
                if (listType == ListItemType.minimalEntries) {
                    listResponse = new ListResponse.MinimalItemListResponse(items,
                            (lastItem == null) ? null : lastItem.getKey());
                } else {
                    listResponse = new ListResponse<ListItem>(items,
                            (lastItem == null) ? null : lastItem.getKey());
                }
            }
            break;
        default:
            throw new IllegalStateException();
View Full Code Here

            break;
        case minimalEntries:
        case fullEntries:
            {
                List<ListItem> items = _listItems(listType, rawPrefix, lastSeen, limits);
                ListItem lastItem = _last(items);
                if (listType == ListItemType.minimalEntries) {
                    listResponse = new ListResponse.MinimalItemListResponse(items,
                            (lastItem == null) ? null : lastItem.getKey());
                } else {
                    listResponse = new ListResponse<ListItem>(items,
                            (lastItem == null) ? null : lastItem.getKey());
                }
            }
            break;
        default:
            throw new IllegalStateException();
View Full Code Here

            break;
        case minimalEntries:
        case fullEntries:
            {
                List<ListItem> items = _listItems(stats, listType, rawPrefix, lastSeen, limits);
                ListItem lastItem = _last(items);
                if (listType == ListItemType.minimalEntries) {
                    listResponse = new ListResponse.MinimalItemListResponse(items,
                            (lastItem == null) ? null : lastItem.getKey());
                } else {
                    listResponse = new ListResponse<ListItem>(items,
                            (lastItem == null) ? null : lastItem.getKey());
                }
            }
            break;
        default:
            throw new IllegalStateException();
View Full Code Here

    /**
     * Helper method that can be used as the baseline implementation for
     * {@link #listItemFromStorable(Storable)} by tests.
     */
    protected ListItem defaultMinimalListItemFromStorable(Storable raw) {
        return new ListItem(raw.getKey(), raw.getContentHash(), raw.getActualUncompressedLength());
    }
View Full Code Here

TOP

Related Classes of com.fasterxml.clustermate.api.msg.ListItem

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.