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

com.kolibrifx.plovercrest.server.internal.TableSubscriptionObserver 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;

import com.kolibrifx.plovercrest.server.ReadObserver;
import com.kolibrifx.plovercrest.server.Table;

public abstract class TableSubscriptionObserver extends ReadObserver {
    protected long entryIndex;

    public void setEntryIndex(final long readerOffset) {
        this.entryIndex = readerOffset;
    }

    public void observeTableCreated() {
        // do nothing, subclasses can override
    }

    /**
     * This function is called from the event dispatcher thread (same as observe) and should be used
     * to initialize at most one new subscription. Must return the entry index of the new
     * subscription, or null if no new subscriptions have been registered.
     * 

* Timestamp-based subscriptions must be converted to index-based subscriptions, this can be * done by using a temporary TableReader. */ public Long initNewSubscription(final Table table) { return null; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy