All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.palantir.atlasdb.timelock.benchmarks.schema.generated.BenchmarksTableFactory Maven / Gradle / Ivy
package com.palantir.atlasdb.timelock.benchmarks.schema.generated;
import com.google.common.base.Function;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Multimap;
import com.palantir.atlasdb.keyvalue.api.Namespace;
import com.palantir.atlasdb.table.generation.Triggers;
import com.palantir.atlasdb.transaction.api.Transaction;
import java.util.List;
import javax.annotation.processing.Generated;
@Generated("com.palantir.atlasdb.table.description.render.TableFactoryRenderer")
public final class BenchmarksTableFactory {
private static final Namespace defaultNamespace = Namespace.create("benchmarks", Namespace.UNCHECKED_NAME);
private static final BenchmarksTableFactory defaultTableFactory = of(defaultNamespace);
private final List> sharedTriggers;
private final Namespace namespace;
private BenchmarksTableFactory(
List> sharedTriggers, Namespace namespace) {
this.sharedTriggers = sharedTriggers;
this.namespace = namespace;
}
public static BenchmarksTableFactory of(
List> sharedTriggers, Namespace namespace) {
return new BenchmarksTableFactory(sharedTriggers, namespace);
}
public static BenchmarksTableFactory of(List> sharedTriggers) {
return new BenchmarksTableFactory(sharedTriggers, defaultNamespace);
}
public static BenchmarksTableFactory of(Namespace namespace) {
return of(ImmutableList.of(), namespace);
}
public static BenchmarksTableFactory of() {
return defaultTableFactory;
}
public BlobsTable getBlobsTable(Transaction t, BlobsTable.BlobsTrigger... triggers) {
return BlobsTable.of(t, namespace, Triggers.getAllTriggers(t, sharedTriggers, triggers));
}
public BlobsSerializableTable getBlobsSerializableTable(
Transaction t, BlobsSerializableTable.BlobsSerializableTrigger... triggers) {
return BlobsSerializableTable.of(t, namespace, Triggers.getAllTriggers(t, sharedTriggers, triggers));
}
public KvDynamicColumnsTable getKvDynamicColumnsTable(
Transaction t, KvDynamicColumnsTable.KvDynamicColumnsTrigger... triggers) {
return KvDynamicColumnsTable.of(t, namespace, Triggers.getAllTriggers(t, sharedTriggers, triggers));
}
public KvRowsTable getKvRowsTable(Transaction t, KvRowsTable.KvRowsTrigger... triggers) {
return KvRowsTable.of(t, namespace, Triggers.getAllTriggers(t, sharedTriggers, triggers));
}
public MetadataTable getMetadataTable(Transaction t, MetadataTable.MetadataTrigger... triggers) {
return MetadataTable.of(t, namespace, Triggers.getAllTriggers(t, sharedTriggers, triggers));
}
public interface SharedTriggers
extends BlobsTable.BlobsTrigger,
BlobsSerializableTable.BlobsSerializableTrigger,
KvDynamicColumnsTable.KvDynamicColumnsTrigger,
KvRowsTable.KvRowsTrigger,
MetadataTable.MetadataTrigger {}
public abstract static class NullSharedTriggers implements SharedTriggers {
@Override
public void putBlobs(Multimap> newRows) {
// do nothing
}
@Override
public void putBlobsSerializable(
Multimap<
BlobsSerializableTable.BlobsSerializableRow,
? extends BlobsSerializableTable.BlobsSerializableNamedColumnValue>>
newRows) {
// do nothing
}
@Override
public void putKvDynamicColumns(
Multimap<
KvDynamicColumnsTable.KvDynamicColumnsRow,
? extends KvDynamicColumnsTable.KvDynamicColumnsColumnValue>
newRows) {
// do nothing
}
@Override
public void putKvRows(
Multimap> newRows) {
// do nothing
}
@Override
public void putMetadata(
Multimap> newRows) {
// do nothing
}
}
}