Package com.fasterxml.storemate.shared

Examples of com.fasterxml.storemate.shared.StorableKey$Provider


     */
    private void _pullEntry(SyncListResponseEntry reqEntry, SyncPullEntry header,
            InputStream in)
        throws IOException
    {
        final StorableKey key = header.key;

        /* first things first: either read things in memory (for inline inclusion),
         * or pipe into a file.
         */
        long expSize = header.storageSize;
View Full Code Here


       
    public ListOperationResult<T> listMore(int maxToList) throws InterruptedException
    {
        ListOperationResult<T> result = _listMore(maxToList);
        if (result != null) {
            StorableKey raw = result.getLastSeen();
            if (raw != null) { // should this error out?
                _lastSeen = _clientConfig.getKeyConverter().rawToEntryKey(raw);
            }
        }
        return result;
View Full Code Here

     */
    private void _pullEntry(SyncListResponseEntry reqEntry, SyncPullEntry header,
            InputStream in)
        throws IOException
    {
        final StorableKey key = header.key;

        /* first things first: either read things in memory (for inline inclusion),
         * or pipe into a file.
         */
        long expSize = header.storageSize;
View Full Code Here

    {
        switch (jp.getCurrentToken()) {
        case VALUE_STRING:
        case VALUE_EMBEDDED_OBJECT:
            byte[] raw = jp.getBinaryValue();
            return new StorableKey(raw);
        default:
            throw ctxt.mappingException(getValueClass(), jp.getCurrentToken());
        }
    }
View Full Code Here

    {
        switch (jp.getCurrentToken()) {
        case VALUE_STRING:
        case VALUE_EMBEDDED_OBJECT:
            byte[] raw = jp.getBinaryValue();
            return new StorableKey(raw);
        default:
            throw ctxt.mappingException(handledType(), jp.getCurrentToken());
        }
    }
View Full Code Here

            return (OUT) badRequest(response, "Invalid prefix: not in key range (%s) of node",
                    _cluster.getLocalState().totalRange());
        }

        // Then extract 'lastSeen', if it's passed:
        StorableKey lastSeen = null;
        String b64str = request.getQueryParameter(ClusterMateConstants.QUERY_PARAM_LAST_SEEN);
        if (b64str != null && b64str.length() > 0) {
            try {
                // Jackson can do base64 decoding, and this is the easiest way
                byte[] lastSeenRaw = _objectMapper.convertValue(b64str, byte[].class);
                lastSeen = new StorableKey(lastSeenRaw);
            } catch (Exception e) {
                return (OUT) badRequest(response, "Invalid '"+ClusterMateConstants.QUERY_PARAM_LAST_SEEN
                        +"' value; not valid base64 encoded byte sequence");
            }
        }
        // Otherwise can start listing
        boolean useSmile = _acceptSmileContentType(request);
        final StorableKey rawPrefix = prefix.asStorableKey();
        ListLimits limits = DEFAULT_LIST_LIMITS;

        String maxStr = request.getQueryParameter(ClusterMateConstants.QUERY_PARAM_MAX_ENTRIES);
        if (maxStr != null) {
            limits = limits.withMaxEntries(_decodeInt(maxStr, limits.getMaxEntries()));
View Full Code Here

     */
    private void _pullEntry(SyncListResponseEntry reqEntry, SyncPullEntry header,
            InputStream in)
        throws IOException
    {
        final StorableKey key = header.key;

        /* first things first: either read things in memory (for inline inclusion),
         * or pipe into a file.
         */
        long expSize = header.storageSize;
View Full Code Here

            return (OUT) badRequest(response, "Invalid prefix: not in key range (%s) of node",
                    _cluster.getLocalState().totalRange());
        }

        // Then extract 'lastSeen', if it's passed:
        StorableKey lastSeen = null;
        String b64str = request.getQueryParameter(ClusterMateConstants.QUERY_PARAM_LAST_SEEN);
        if (b64str != null && b64str.length() > 0) {
            try {
                // Jackson can do base64 decoding, and this is the easiest way
                byte[] lastSeenRaw = _objectMapper.convertValue(b64str, byte[].class);
                lastSeen = new StorableKey(lastSeenRaw);
            } catch (Exception e) {
                return (OUT) badRequest(response, "Invalid '"+ClusterMateConstants.QUERY_PARAM_LAST_SEEN
                        +"' value; not valid base64 encoded byte sequence");
            }
        }
        // Otherwise can start listing
        boolean useSmile = _acceptSmileContentType(request);
        final StorableKey rawPrefix = prefix.asStorableKey();
        ListLimits limits = DEFAULT_LIST_LIMITS;

        String maxStr = request.getQueryParameter(ClusterMateConstants.QUERY_PARAM_MAX_ENTRIES);
        if (maxStr != null) {
            limits = limits.withMaxEntries(_decodeInt(maxStr, limits.getMaxEntries()));
View Full Code Here

            SyncListResponseEntry reqEntry, SyncPullEntry header,
            InputStream in, PullProblems probs)
        throws IOException
    {
        final StorableStore entryStore = _stores.getEntryStore();
        final StorableKey key = header.key;

        /* first things first: either read things in memory (for inline inclusion),
         * or pipe into a file.
         */
        long expSize = header.storageSize;
View Full Code Here

    public ListOperationResult<T> listMore(int maxToList) throws InterruptedException
    {
        ListOperationResult<T> result = _listMore(maxToList);
        if (result != null) {
            StorableKey raw = result.getLastSeen();
            if (raw != null) { // should this error out?
                _lastSeen = _clientConfig.getKeyConverter().rawToEntryKey(raw);
            }
        }
        return result;
View Full Code Here

TOP

Related Classes of com.fasterxml.storemate.shared.StorableKey$Provider

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.