com.kolibrifx.plovercrest.server.TableInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plovercrest-server Show documentation
Show all versions of plovercrest-server Show documentation
Plovercrest server library.
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;
}
}