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

com.infomaximum.cluster.graphql.struct.GSubscribeEvent Maven / Gradle / Ivy

The newest version!
package com.infomaximum.cluster.graphql.struct;

import com.infomaximum.cluster.core.remote.struct.RemoteObject;

import java.io.Serializable;
import java.util.Optional;

public abstract class GSubscribeEvent {

    public class SubscribeValue implements RemoteObject {

        public final byte[] subscribeKey;
        public final Optional value;

        public SubscribeValue(byte[] subscribeKey, T value) {
            this.subscribeKey = subscribeKey;
            this.value = Optional.ofNullable(value);
        }
    }

    private final SubscribeValue value;

    public GSubscribeEvent(byte[] subscribeKey, T value) {
        this.value = new SubscribeValue(subscribeKey, value);
    }

    public SubscribeValue getSubscribeValue() {
        return value;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy