public ContextConfigurations addContextConfig(Context context, Duration resourceShard, ConsistencyLevel readConsistencyLevel, ConsistencyLevel writeConsistencyLevel) { m_contexts.put(context, new ContextConfiguration(context, resourceShard, readConsistencyLevel, writeConsistencyLevel)); return this; }
public ConsistencyLevel getReadConsistency(Context context) { ContextConfiguration configConfig = m_contexts.get(context); if (configConfig != null) { return configConfig.getReadConsistency(); } else { return DEFAULT_READ_CONSISTENCY; } }
public Duration getResourceShard(Context context) { ContextConfiguration configConfig = m_contexts.get(context); if (configConfig != null) { return configConfig.getResourceShard(); } else { return DEFAULT_RESOURCE_SHARD; } }
public ConsistencyLevel getWriteConsistency(Context context) { ContextConfiguration configConfig = m_contexts.get(context); if (configConfig != null) { return configConfig.getWriteConsistency(); } else { return DEFAULT_WRITE_CONSISTENCY; } } }
public ContextConfigurations addContextConfig(ContextConfiguration contextConfig) { m_contexts.put(contextConfig.getContext(), contextConfig); return this; }
public ConsistencyLevel getWriteConsistency(Context context) { ContextConfiguration configConfig = m_contexts.get(context); if (configConfig != null) { return configConfig.getWriteConsistency(); } else { return DEFAULT_WRITE_CONSISTENCY; } } }
public ContextConfigurations addContextConfig(ContextConfiguration contextConfig) { m_contexts.put(contextConfig.getContext(), contextConfig); return this; }
public ConsistencyLevel getReadConsistency(Context context) { ContextConfiguration configConfig = m_contexts.get(context); if (configConfig != null) { return configConfig.getReadConsistency(); } else { return DEFAULT_READ_CONSISTENCY; } }
public Duration getResourceShard(Context context) { ContextConfiguration configConfig = m_contexts.get(context); if (configConfig != null) { return configConfig.getResourceShard(); } else { return DEFAULT_RESOURCE_SHARD; } }
public ContextConfigurations addContextConfig(Context context, Duration resourceShard, ConsistencyLevel readConsistencyLevel, ConsistencyLevel writeConsistencyLevel) { m_contexts.put(context, new ContextConfiguration(context, resourceShard, readConsistencyLevel, writeConsistencyLevel)); return this; }