com.zeroc.IceMX.MetricsMapHelper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ice Show documentation
Show all versions of ice Show documentation
Ice is a comprehensive RPC framework that helps you build distributed applications with minimal effort using familiar object-oriented idioms
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
//
// Ice version 3.7.8
//
//
//
// Generated from file `Metrics.ice'
//
// Warning: do not edit this file.
//
//
//
package com.zeroc.IceMX;
/**
* Helper class for marshaling/unmarshaling MetricsMap.
**/
public final class MetricsMapHelper
{
public static void write(com.zeroc.Ice.OutputStream ostr, Metrics[] v)
{
if(v == null)
{
ostr.writeSize(0);
}
else
{
ostr.writeSize(v.length);
for(int i0 = 0; i0 < v.length; i0++)
{
ostr.writeValue(v[i0]);
}
}
}
public static Metrics[] read(com.zeroc.Ice.InputStream istr)
{
final Metrics[] v;
final int len0 = istr.readAndCheckSeqSize(1);
v = new Metrics[len0];
for(int i0 = 0; i0 < len0; i0++)
{
final int fi0 = i0;
istr.readValue(value -> v[fi0] = value, Metrics.class);
}
return v;
}
public static void write(com.zeroc.Ice.OutputStream ostr, int tag, java.util.Optional v)
{
if(v != null && v.isPresent())
{
write(ostr, tag, v.get());
}
}
public static void write(com.zeroc.Ice.OutputStream ostr, int tag, Metrics[] v)
{
if(ostr.writeOptional(tag, com.zeroc.Ice.OptionalFormat.FSize))
{
int pos = ostr.startSize();
MetricsMapHelper.write(ostr, v);
ostr.endSize(pos);
}
}
public static java.util.Optional read(com.zeroc.Ice.InputStream istr, int tag)
{
if(istr.readOptional(tag, com.zeroc.Ice.OptionalFormat.FSize))
{
istr.skip(4);
Metrics[] v;
v = MetricsMapHelper.read(istr);
return java.util.Optional.of(v);
}
else
{
return java.util.Optional.empty();
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy