APISonar


org.onosproject.net.HostLocation.time

> org > onosproject > net > HostLocation > time
org APIs onosproject APIs net APIs HostLocation APIs time APIs

Example 1
public static HostLocationProto translate(HostLocation hostLocation) {

        if (hostLocation != null) {
            return HostLocationProto.newBuilder()
                    .setConnectPoint(ConnectPointProto.newBuilder()
                                             .setDeviceId(hostLocation.deviceId().toString())
                                             .setPortNumber(hostLocation.port().toString()))
                    .setTime(hostLocation.time())
                    .build();
        }

        return HostLocationProto.getDefaultInstance();
    }
Example 2
public void write(Kryo kryo, Output output, HostLocation object) {
        kryo.writeClassAndObject(output, object.deviceId());
        kryo.writeClassAndObject(output, object.port());
        output.writeLong(object.time());
    }