Search in sources :

Example 1 with RingbufferStoreConfigHolder

use of com.hazelcast.client.impl.protocol.task.dynamicconfig.RingbufferStoreConfigHolder in project hazelcast by hazelcast.

the class ClientDynamicClusterConfig method addRingBufferConfig.

@Override
public Config addRingBufferConfig(RingbufferConfig ringbufferConfig) {
    RingbufferStoreConfigHolder ringbufferStoreConfig = null;
    if (ringbufferConfig.getRingbufferStoreConfig() != null && ringbufferConfig.getRingbufferStoreConfig().isEnabled()) {
        RingbufferStoreConfig storeConfig = ringbufferConfig.getRingbufferStoreConfig();
        ringbufferStoreConfig = RingbufferStoreConfigHolder.of(storeConfig, instance.getSerializationService());
    }
    ClientMessage request = DynamicConfigAddRingbufferConfigCodec.encodeRequest(ringbufferConfig.getName(), ringbufferConfig.getCapacity(), ringbufferConfig.getBackupCount(), ringbufferConfig.getAsyncBackupCount(), ringbufferConfig.getTimeToLiveSeconds(), ringbufferConfig.getInMemoryFormat().name(), ringbufferStoreConfig, ringbufferConfig.getSplitBrainProtectionName(), ringbufferConfig.getMergePolicyConfig().getPolicy(), ringbufferConfig.getMergePolicyConfig().getBatchSize());
    invoke(request);
    return this;
}
Also used : RingbufferStoreConfigHolder(com.hazelcast.client.impl.protocol.task.dynamicconfig.RingbufferStoreConfigHolder) RingbufferStoreConfig(com.hazelcast.config.RingbufferStoreConfig) ClientMessage(com.hazelcast.client.impl.protocol.ClientMessage)

Aggregations

ClientMessage (com.hazelcast.client.impl.protocol.ClientMessage)1 RingbufferStoreConfigHolder (com.hazelcast.client.impl.protocol.task.dynamicconfig.RingbufferStoreConfigHolder)1 RingbufferStoreConfig (com.hazelcast.config.RingbufferStoreConfig)1