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

com.kolibrifx.plovercrest.server.internal.protocol.SubscriberEntry Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2010-2017, KolibriFX AS. Licensed under the Apache License, version 2.0.
 */

package com.kolibrifx.plovercrest.server.internal.protocol;

public class SubscriberEntry extends SubscriberEvent {
    final long entryIndex;
    final long timestamp;
    final byte[] data;

    public SubscriberEntry(final int subscriptionId, final long entryIndex, final long timestamp, final byte[] data) {
        super(subscriptionId);
        this.entryIndex = entryIndex;
        this.timestamp = timestamp;
        this.data = data;
    }

    static boolean areSuccessiveEntries(final SubscriberEntry a, final SubscriberEntry b) {
        return a.entryIndex + 1 == b.entryIndex;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy