Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.fasterxml.clustermate.service.msg;
 
Simple value class used to return information on a successful PUT request
public class PutResponse<K extends EntryKeyextends CRUDResponseBase<K>
    public Compression compression;
    public long size;
    public long storageSize;
    public boolean inlined;
    
    public PutResponse() { }
    public PutResponse(K key) {
        this(keynull);
    }
    public PutResponse(K keyString msg) {
        super(keymsg);
    }
    protected PutResponse(K keyStorable entryString msg) {
        super(keymsg);
        if (entry != null) {
             = entry.getCompression();
             = entry.getOriginalLength();
            if ( == 0L) { // mark it as "not available"
                 = -1L;
            }
             = entry.getStorageLength();
             = !entry.hasExternalData();
        }
    }
    public static <K extends EntryKeyPutResponse<K> error(K keyStorable newEntryString msg) {
        return new PutResponse<K>(keynewEntrymsg);
    }
    public static <K extends EntryKeyPutResponse<K> error(K keyString msg) {
        return new PutResponse<K>(keymsg);
    }
    
    public static <K extends EntryKeyPutResponse<K> badCompression(K keyString msg) {
        return new PutResponse<K>(keymsg);
    }
    
    public static <K extends EntryKeyPutResponse<K> badArg(K keyString msg) {
        return new PutResponse<K>(keymsg);
    }
    
    
Factory method for constructing a response message that indicates successful addition of given payload.
    public static <K extends EntryKeyPutResponse<K> ok(K keyStorable entry) {
        return new PutResponse<K>(keyentrynull);
    }
New to GrepCode? Check out our FAQ X