Class DefaultDistributedDataConfig
java.lang.Object
org.eclipse.ditto.internal.utils.ddata.DefaultDistributedDataConfig
- All Implemented Interfaces:
DistributedDataConfig
@Immutable
public final class DefaultDistributedDataConfig
extends Object
implements DistributedDataConfig
This class is the default implementation of the distributed data config.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.ditto.internal.utils.ddata.DistributedDataConfig
DistributedDataConfig.DistributedDataConfigValue -
Method Summary
Modifier and TypeMethodDescriptionbooleanintThe number of shards Ditto's ddata extension applies for Map keys.Returns the config to use for creating theReplicator.Returns the timeout of GET-messages of the replicator.intThe number of subscribers in each subscriber pool.Returns the delay for subscriptions.org.apache.pekko.cluster.ddata.Replicator.WriteConsistencyReturns the write consistency for topic subscription.Returns the timeout of UPDATE-messages of the replicator.inthashCode()static DefaultDistributedDataConfigof(com.typesafe.config.Config config) Returns an instance ofDefaultDistributedDataConfigbased on the settings of the specified Config.static DefaultDistributedDataConfigof(com.typesafe.config.Config config, CharSequence replicatorName, CharSequence replicatorRole) Returns an instance ofDefaultDistributedDataConfigbased on the settings of the specified Config.toString()
-
Method Details
-
of
Returns an instance ofDefaultDistributedDataConfigbased on the settings of the specified Config.- Parameters:
config- is supposed to provide the settings of the ddata config at "ddata".- Returns:
- the instance.
- Throws:
DittoConfigError- ifconfigis invalid.
-
of
public static DefaultDistributedDataConfig of(com.typesafe.config.Config config, CharSequence replicatorName, CharSequence replicatorRole) Returns an instance ofDefaultDistributedDataConfigbased on the settings of the specified Config.- Parameters:
config- is supposed to provide the settings of the ddata config at "ddata".replicatorName- the name of the replicator.replicatorRole- the cluster role of members with replicas of the distributed collection.- Returns:
- the instance.
- Throws:
DittoConfigError- ifconfigis invalid.
-
getReadTimeout
Description copied from interface:DistributedDataConfigReturns the timeout of GET-messages of the replicator.- Specified by:
getReadTimeoutin interfaceDistributedDataConfig- Returns:
- the timeout of reads.
-
getWriteTimeout
Description copied from interface:DistributedDataConfigReturns the timeout of UPDATE-messages of the replicator.- Specified by:
getWriteTimeoutin interfaceDistributedDataConfig- Returns:
- the timeout of writes.
-
getSubscriptionWriteConsistency
public org.apache.pekko.cluster.ddata.Replicator.WriteConsistency getSubscriptionWriteConsistency()Description copied from interface:DistributedDataConfigReturns the write consistency for topic subscription.- Specified by:
getSubscriptionWriteConsistencyin interfaceDistributedDataConfig- Returns:
- the write consistency.
-
getSubscriptionDelay
Description copied from interface:DistributedDataConfigReturns the delay for subscriptions.- Specified by:
getSubscriptionDelayin interfaceDistributedDataConfig- Returns:
- the subscription delay.
-
getPekkoReplicatorConfig
Description copied from interface:DistributedDataConfigReturns the config to use for creating theReplicator.- Specified by:
getPekkoReplicatorConfigin interfaceDistributedDataConfig- Returns:
- the Pekko replicator config to use.
-
getNumberOfShards
public int getNumberOfShards()Description copied from interface:DistributedDataConfigThe number of shards Ditto's ddata extension applies for Map keys.- Specified by:
getNumberOfShardsin interfaceDistributedDataConfig- Returns:
- the number of shards to apply.
-
getSubscriberPoolSize
public int getSubscriberPoolSize()Description copied from interface:DistributedDataConfigThe number of subscribers in each subscriber pool.- Specified by:
getSubscriberPoolSizein interfaceDistributedDataConfig- Returns:
- the number of subscribers.
-
equals
-
hashCode
public int hashCode() -
toString
-