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

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

import static com.kolibrifx.plovercrest.client.internal.shared.PlovercrestConstants.DEFAULT_FANOUT_DISTANCE;
import com.kolibrifx.plovercrest.client.TableMetadata;

public class TableInfo {
    private final String name;
    private final int fanOutDistance;
    private final TableMetadata metadata;

    public TableInfo(final String name, final int fanOutDistance, final TableMetadata metadata) {
        this.name = name;
        this.fanOutDistance = fanOutDistance;
        this.metadata = metadata;
    }

    public TableInfo(final String name, final TableMetadata metaData) {
        this(name, DEFAULT_FANOUT_DISTANCE, metaData);
    }

    public String getName() {
        return name;
    }

    /**
     * The number of table entries between two entries in the fan-out table.
     */
    public int getFanOutDistance() {
        return fanOutDistance;
    }

    /**
     * An generic metadata object, which must be serializable.
     */
    public TableMetadata getMetadata() {
        return metadata;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy