Class BaseNodeFactory
java.lang.Object
io.datarouter.storage.node.factory.BaseNodeFactory
- Direct Known Subclasses:
NodeFactory,SettinglessNodeFactory
public abstract class BaseNodeFactory extends Object
-
Constructor Summary
Constructors Constructor Description BaseNodeFactory(Datarouter datarouter, DatarouterClients clients, io.datarouter.inject.DatarouterInjector injector, Supplier<Boolean> enableDiagnosticsSupplier) -
Method Summary
Modifier and Type Method Description static <PK extends io.datarouter.model.key.primary.PrimaryKey<PK>, D extends io.datarouter.model.databean.Databean<PK, D>, F extends io.datarouter.model.serialize.fielder.DatabeanFielder<PK, D>, N extends Node<PK, D, F>>
Ncast(Node<PK,D,F> node)Datarouter modules can come as runtime dependencies.<PK extends io.datarouter.model.key.primary.RegularPrimaryKey<PK>, D extends io.datarouter.model.databean.Databean<PK, D>, F extends io.datarouter.model.serialize.fielder.DatabeanFielder<PK, D>>
NodeBuilder<PK,PK,D,F>create(ClientId clientId, Supplier<D> databeanSupplier, Supplier<F> fielderSupplier)<EK extends io.datarouter.model.key.entity.EntityKey<EK>, PK extends io.datarouter.model.key.primary.EntityPrimaryKey<EK, PK>, D extends io.datarouter.model.databean.Databean<PK, D>, F extends io.datarouter.model.serialize.fielder.DatabeanFielder<PK, D>>
NodeBuilder<EK,PK,D,F>create(ClientId clientId, Supplier<EK> entityKeySupplier, Supplier<D> databeanSupplier, Supplier<F> fielderSupplier)<EK extends io.datarouter.model.key.entity.EntityKey<EK>, E extends io.datarouter.model.entity.Entity<EK>, PK extends io.datarouter.model.key.primary.EntityPrimaryKey<EK, PK>, D extends io.datarouter.model.databean.Databean<PK, D>, F extends io.datarouter.model.serialize.fielder.DatabeanFielder<PK, D>, N extends PhysicalNode<PK, D, F>>
Ncreate(EntityNodeParams<EK,E> entityNodeParams, NodeParams<PK,D,F> params)<EK extends io.datarouter.model.key.entity.EntityKey<EK>, PK extends io.datarouter.model.key.primary.EntityPrimaryKey<EK, PK>, D extends io.datarouter.model.databean.Databean<PK, D>, F extends io.datarouter.model.serialize.fielder.DatabeanFielder<PK, D>, N extends PhysicalNode<PK, D, F>>
Nregister(N node)
-
Constructor Details
-
BaseNodeFactory
public BaseNodeFactory(Datarouter datarouter, DatarouterClients clients, io.datarouter.inject.DatarouterInjector injector, Supplier<Boolean> enableDiagnosticsSupplier)
-
-
Method Details
-
create
public <EK extends io.datarouter.model.key.entity.EntityKey<EK>, E extends io.datarouter.model.entity.Entity<EK>, PK extends io.datarouter.model.key.primary.EntityPrimaryKey<EK, PK>, D extends io.datarouter.model.databean.Databean<PK, D>, F extends io.datarouter.model.serialize.fielder.DatabeanFielder<PK, D>, N extends PhysicalNode<PK, D, F>> N create(EntityNodeParams<EK,E> entityNodeParams, NodeParams<PK,D,F> params) -
create
public <EK extends io.datarouter.model.key.entity.EntityKey<EK>, PK extends io.datarouter.model.key.primary.EntityPrimaryKey<EK, PK>, D extends io.datarouter.model.databean.Databean<PK, D>, F extends io.datarouter.model.serialize.fielder.DatabeanFielder<PK, D>> NodeBuilder<EK,PK,D,F> create(ClientId clientId, Supplier<EK> entityKeySupplier, Supplier<D> databeanSupplier, Supplier<F> fielderSupplier) -
create
public <PK extends io.datarouter.model.key.primary.RegularPrimaryKey<PK>, D extends io.datarouter.model.databean.Databean<PK, D>, F extends io.datarouter.model.serialize.fielder.DatabeanFielder<PK, D>> NodeBuilder<PK,PK,D,F> create(ClientId clientId, Supplier<D> databeanSupplier, Supplier<F> fielderSupplier) -
register
public <EK extends io.datarouter.model.key.entity.EntityKey<EK>, PK extends io.datarouter.model.key.primary.EntityPrimaryKey<EK, PK>, D extends io.datarouter.model.databean.Databean<PK, D>, F extends io.datarouter.model.serialize.fielder.DatabeanFielder<PK, D>, N extends PhysicalNode<PK, D, F>> N register(N node) -
cast
public static <PK extends io.datarouter.model.key.primary.PrimaryKey<PK>, D extends io.datarouter.model.databean.Databean<PK, D>, F extends io.datarouter.model.serialize.fielder.DatabeanFielder<PK, D>, N extends Node<PK, D, F>> N cast(Node<PK,D,F> node)Datarouter modules can come as runtime dependencies. There is no way to know at compile time if a client type is going to provide the desired interface, hence this unchecked cast.
-