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

IceGrid.NodeInfo Maven / Gradle / Ivy

There is a newer version: 3.7.10
Show newest version
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
//
// Ice version 3.7.3
//
// 
//
// Generated from file `Admin.ice'
//
// Warning: do not edit this file.
//
// 
//

package IceGrid;

/**
 * Information about an IceGrid node.
 *
 **/
public class NodeInfo implements java.lang.Cloneable,
                                 java.io.Serializable
{
    /**
     * The name of the node.
     *
     **/
    public String name;

    /**
     * The operating system name.
     *
     **/
    public String os;

    /**
     * The network name of the host running this node (as defined in
     * uname()).
     *
     **/
    public String hostname;

    /**
     * The operation system release level (as defined in uname()).
     *
     **/
    public String release;

    /**
     * The operation system version (as defined in uname()).
     *
     **/
    public String version;

    /**
     * The machine hardware type (as defined in uname()).
     *
     **/
    public String machine;

    /**
     * The number of processor threads on the node.
     * For example, nProcessors is 8 on a computer with a single quad-core
     * processor and two HT threads per core.
     *
     **/
    public int nProcessors;

    /**
     * The path to the node data directory.
     *
     **/
    public String dataDir;

    public NodeInfo()
    {
        this.name = "";
        this.os = "";
        this.hostname = "";
        this.release = "";
        this.version = "";
        this.machine = "";
        this.dataDir = "";
    }

    public NodeInfo(String name, String os, String hostname, String release, String version, String machine, int nProcessors, String dataDir)
    {
        this.name = name;
        this.os = os;
        this.hostname = hostname;
        this.release = release;
        this.version = version;
        this.machine = machine;
        this.nProcessors = nProcessors;
        this.dataDir = dataDir;
    }

    public boolean
    equals(java.lang.Object rhs)
    {
        if(this == rhs)
        {
            return true;
        }
        NodeInfo r = null;
        if(rhs instanceof NodeInfo)
        {
            r = (NodeInfo)rhs;
        }

        if(r != null)
        {
            if(this.name != r.name)
            {
                if(this.name == null || r.name == null || !this.name.equals(r.name))
                {
                    return false;
                }
            }
            if(this.os != r.os)
            {
                if(this.os == null || r.os == null || !this.os.equals(r.os))
                {
                    return false;
                }
            }
            if(this.hostname != r.hostname)
            {
                if(this.hostname == null || r.hostname == null || !this.hostname.equals(r.hostname))
                {
                    return false;
                }
            }
            if(this.release != r.release)
            {
                if(this.release == null || r.release == null || !this.release.equals(r.release))
                {
                    return false;
                }
            }
            if(this.version != r.version)
            {
                if(this.version == null || r.version == null || !this.version.equals(r.version))
                {
                    return false;
                }
            }
            if(this.machine != r.machine)
            {
                if(this.machine == null || r.machine == null || !this.machine.equals(r.machine))
                {
                    return false;
                }
            }
            if(this.nProcessors != r.nProcessors)
            {
                return false;
            }
            if(this.dataDir != r.dataDir)
            {
                if(this.dataDir == null || r.dataDir == null || !this.dataDir.equals(r.dataDir))
                {
                    return false;
                }
            }

            return true;
        }

        return false;
    }

    public int
    hashCode()
    {
        int h_ = 5381;
        h_ = IceInternal.HashUtil.hashAdd(h_, "::IceGrid::NodeInfo");
        h_ = IceInternal.HashUtil.hashAdd(h_, name);
        h_ = IceInternal.HashUtil.hashAdd(h_, os);
        h_ = IceInternal.HashUtil.hashAdd(h_, hostname);
        h_ = IceInternal.HashUtil.hashAdd(h_, release);
        h_ = IceInternal.HashUtil.hashAdd(h_, version);
        h_ = IceInternal.HashUtil.hashAdd(h_, machine);
        h_ = IceInternal.HashUtil.hashAdd(h_, nProcessors);
        h_ = IceInternal.HashUtil.hashAdd(h_, dataDir);
        return h_;
    }

    public NodeInfo
    clone()
    {
        NodeInfo c = null;
        try
        {
            c = (NodeInfo)super.clone();
        }
        catch(CloneNotSupportedException ex)
        {
            assert false; // impossible
        }
        return c;
    }

    public void
    ice_writeMembers(Ice.OutputStream ostr)
    {
        ostr.writeString(this.name);
        ostr.writeString(this.os);
        ostr.writeString(this.hostname);
        ostr.writeString(this.release);
        ostr.writeString(this.version);
        ostr.writeString(this.machine);
        ostr.writeInt(this.nProcessors);
        ostr.writeString(this.dataDir);
    }

    public void
    ice_readMembers(Ice.InputStream istr)
    {
        this.name = istr.readString();
        this.os = istr.readString();
        this.hostname = istr.readString();
        this.release = istr.readString();
        this.version = istr.readString();
        this.machine = istr.readString();
        this.nProcessors = istr.readInt();
        this.dataDir = istr.readString();
    }

    static public void
    ice_write(Ice.OutputStream ostr, NodeInfo v)
    {
        if(v == null)
        {
            _nullMarshalValue.ice_writeMembers(ostr);
        }
        else
        {
            v.ice_writeMembers(ostr);
        }
    }

    static public NodeInfo
    ice_read(Ice.InputStream istr)
    {
        NodeInfo v = new NodeInfo();
        v.ice_readMembers(istr);
        return v;
    }

    private static final NodeInfo _nullMarshalValue = new NodeInfo();

    public static final long serialVersionUID = -3769387931156004420L;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy