All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.fasterxml.clustermate.client.call.ListCallResult Maven / Gradle / Ivy

There is a newer version: 0.10.5
Show newest version
package com.fasterxml.clustermate.client.call;

import java.util.List;

import com.fasterxml.clustermate.api.msg.ListResponse;
import com.fasterxml.clustermate.client.ClusterServerNode;
import com.fasterxml.storemate.shared.StorableKey;

public abstract class ListCallResult
    extends ReadCallResult>
{
    protected final StorableKey _lastSeen;

    /*
    /**********************************************************************
    /* Construction, initialization
    /**********************************************************************
     */

    public ListCallResult(ClusterServerNode server, ListResponse resp) {
        super(server, resp);
        _lastSeen = resp.lastSeen;
    }

    public ListCallResult(CallFailure fail) {
        super(fail);
        _lastSeen = null;
    }

    public ListCallResult(ClusterServerNode server, int statusCode) {
        super(server, statusCode);
        _lastSeen = null;
    }
    
    /*
    /**********************************************************************
    /* Extended API
    /**********************************************************************
     */
    
    public List getItems() {
        return (_result == null) ? null : _result.items;
    }

    public StorableKey getLastSeen() { return _lastSeen; }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy