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

com.fasterxml.clustermate.api.msg.ClusterStatusMessage Maven / Gradle / Ivy

Go to download

Full deployment of default TransiStore service, using basic storage types, packaged as "fat jar" with its dependencies.

There is a newer version: 0.9.8
Show newest version
package com.fasterxml.clustermate.api.msg;

import java.util.Collection;
import java.util.Collections;

import com.fasterxml.clustermate.api.NodeState;

/**
 * POJO used to exchange information on status of the cluster;
 * that is, settings for nodes that are known by a given server node.
 * These are exchanged by servers piggy-backed on sync list/pull
 * requests; and may be POSTed on startup and/or shutdown.
 */
public class ClusterStatusMessage
{
    /**
     * Status of the local node.
     */
    public NodeState local;

    public Collection remote;

    /**
     * Timestamp of time when this message was composed.
     */
    public long creationTime;

    /**
     * Timestamp of last update to aggregated cluster information by the
     * serving server node.
     * May be used for diagnostic purposes, or possibly optimizing access.
     */
    public long clusterLastUpdated;
    
    // only for deserialization:
    protected ClusterStatusMessage() { }

    public ClusterStatusMessage(long creationTime, long lastUpdated,
            NodeState local, Collection remote)
    {
        this.creationTime = creationTime;
        this.clusterLastUpdated = lastUpdated;
        this.local = local;
        if (remote == null) {
            this.remote = Collections.emptyList();
        } else {
            this.remote = remote;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy