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

IceGrid.ReplicaGroupDescriptor 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 `Descriptor.ice'
//
// Warning: do not edit this file.
//
// 
//

package IceGrid;

/**
 * A replica group descriptor.
 *
 **/
public class ReplicaGroupDescriptor implements java.lang.Cloneable,
                                               java.io.Serializable
{
    /**
     * The id of the replica group.
     *
     **/
    public String id;

    /**
     * The load balancing policy.
     *
     **/
    public LoadBalancingPolicy loadBalancing;

    /**
     * Default options for proxies created for the replica group.
     *
     **/
    public String proxyOptions;

    /**
     * The object descriptors associated with this object adapter.
     *
     **/
    public java.util.List objects;

    /**
     * The description of this replica group.
     *
     **/
    public String description;

    /**
     * The filter to use for this replica group.
     *
     **/
    public String filter;

    public ReplicaGroupDescriptor()
    {
        this.id = "";
        this.proxyOptions = "";
        this.description = "";
        this.filter = "";
    }

    public ReplicaGroupDescriptor(String id, LoadBalancingPolicy loadBalancing, String proxyOptions, java.util.List objects, String description, String filter)
    {
        this.id = id;
        this.loadBalancing = loadBalancing;
        this.proxyOptions = proxyOptions;
        this.objects = objects;
        this.description = description;
        this.filter = filter;
    }

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

        if(r != null)
        {
            if(this.id != r.id)
            {
                if(this.id == null || r.id == null || !this.id.equals(r.id))
                {
                    return false;
                }
            }
            if(this.loadBalancing != r.loadBalancing)
            {
                if(this.loadBalancing == null || r.loadBalancing == null || !this.loadBalancing.equals(r.loadBalancing))
                {
                    return false;
                }
            }
            if(this.proxyOptions != r.proxyOptions)
            {
                if(this.proxyOptions == null || r.proxyOptions == null || !this.proxyOptions.equals(r.proxyOptions))
                {
                    return false;
                }
            }
            if(this.objects != r.objects)
            {
                if(this.objects == null || r.objects == null || !this.objects.equals(r.objects))
                {
                    return false;
                }
            }
            if(this.description != r.description)
            {
                if(this.description == null || r.description == null || !this.description.equals(r.description))
                {
                    return false;
                }
            }
            if(this.filter != r.filter)
            {
                if(this.filter == null || r.filter == null || !this.filter.equals(r.filter))
                {
                    return false;
                }
            }

            return true;
        }

        return false;
    }

    public int
    hashCode()
    {
        int h_ = 5381;
        h_ = IceInternal.HashUtil.hashAdd(h_, "::IceGrid::ReplicaGroupDescriptor");
        h_ = IceInternal.HashUtil.hashAdd(h_, id);
        h_ = IceInternal.HashUtil.hashAdd(h_, loadBalancing);
        h_ = IceInternal.HashUtil.hashAdd(h_, proxyOptions);
        h_ = IceInternal.HashUtil.hashAdd(h_, objects);
        h_ = IceInternal.HashUtil.hashAdd(h_, description);
        h_ = IceInternal.HashUtil.hashAdd(h_, filter);
        return h_;
    }

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

    public void
    ice_writeMembers(Ice.OutputStream ostr)
    {
        ostr.writeString(this.id);
        ostr.writeValue(this.loadBalancing);
        ostr.writeString(this.proxyOptions);
        ObjectDescriptorSeqHelper.write(ostr, this.objects);
        ostr.writeString(this.description);
        ostr.writeString(this.filter);
    }

    private class Patcher implements Ice.ReadValueCallback
    {
        public void
        valueReady(Ice.Object v)
        {
            if(v == null || v instanceof LoadBalancingPolicy)
            {
                loadBalancing = (LoadBalancingPolicy)v;
            }
            else
            {
                IceInternal.Ex.throwUOE(type(), v);
            }
        }

        public String
        type()
        {
            return "::IceGrid::LoadBalancingPolicy";
        }
    }

    public void
    ice_readMembers(Ice.InputStream istr)
    {
        this.id = istr.readString();
        istr.readValue(new Patcher());
        this.proxyOptions = istr.readString();
        this.objects = ObjectDescriptorSeqHelper.read(istr);
        this.description = istr.readString();
        this.filter = istr.readString();
    }

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

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

    private static final ReplicaGroupDescriptor _nullMarshalValue = new ReplicaGroupDescriptor();

    public static final long serialVersionUID = -5151107249986636988L;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy