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

IceMX.ConnectionMetrics Maven / Gradle / Ivy

Go to download

Ice is a comprehensive RPC framework that helps you build distributed applications with minimal effort using familiar object-oriented idioms

The newest version!
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
//
// Ice version 3.7.10
//
// 
//
// Generated from file `Metrics.ice'
//
// Warning: do not edit this file.
//
// 
//

package IceMX;

/**
 * Provides information on the data sent and received over Ice
 * connections.
 *
 **/
public class ConnectionMetrics extends Metrics
{
    public ConnectionMetrics()
    {
        super();
        this.receivedBytes = 0L;
        this.sentBytes = 0L;
    }

    public ConnectionMetrics(String id, long total, int current, long totalLifetime, int failures, long receivedBytes, long sentBytes)
    {
        super(id, total, current, totalLifetime, failures);
        this.receivedBytes = receivedBytes;
        this.sentBytes = sentBytes;
    }

    private static class _F implements Ice.ValueFactory
    {
        public Ice.Object create(String type)
        {
            assert(type.equals(ice_staticId()));
            return new ConnectionMetrics();
        }
    }
    private static Ice.ValueFactory _factory = new _F();

    public static Ice.ValueFactory
    ice_factory()
    {
        return _factory;
    }

    private static final String[] _ids =
    {
        "::Ice::Object",
        "::IceMX::ConnectionMetrics",
        "::IceMX::Metrics"
    };

    public boolean ice_isA(String s)
    {
        return java.util.Arrays.binarySearch(_ids, s) >= 0;
    }

    public boolean ice_isA(String s, Ice.Current current)
    {
        return java.util.Arrays.binarySearch(_ids, s) >= 0;
    }

    public String[] ice_ids()
    {
        return _ids;
    }

    public String[] ice_ids(Ice.Current current)
    {
        return _ids;
    }

    public String ice_id()
    {
        return _ids[1];
    }

    public String ice_id(Ice.Current current)
    {
        return _ids[1];
    }

    public static String ice_staticId()
    {
        return _ids[1];
    }

    protected void _iceWriteImpl(Ice.OutputStream ostr_)
    {
        ostr_.startSlice(ice_staticId(), -1, false);
        ostr_.writeLong(receivedBytes);
        ostr_.writeLong(sentBytes);
        ostr_.endSlice();
        super._iceWriteImpl(ostr_);
    }

    protected void _iceReadImpl(Ice.InputStream istr_)
    {
        istr_.startSlice();
        receivedBytes = istr_.readLong();
        sentBytes = istr_.readLong();
        istr_.endSlice();
        super._iceReadImpl(istr_);
    }

    /**
     * The number of bytes received by the connection.
     *
     **/
    public long receivedBytes;

    /**
     * The number of bytes sent by the connection.
     *
     **/
    public long sentBytes;

    public ConnectionMetrics
    clone()
    {
        return (ConnectionMetrics)super.clone();
    }

    public static final long serialVersionUID = 3311197422585142436L;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy