GH-2207: Clarify RedisMetadataStore in cluster

Resolves: spring-projects/spring-integration#2207

* Since the `WATCH` command isn't supported on clustered connections,
the `RedisMetadataStore.replace()` operation can't be used there.
Document this limitation
This commit is contained in:
Artem Bilan
2017-11-07 15:59:54 -05:00
committed by Gary Russell
parent 6891d5a2e2
commit a61327766e
2 changed files with 10 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2016 the original author or authors.
* Copyright 2013-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,11 +26,16 @@ import org.springframework.integration.metadata.MetadataStore;
import org.springframework.util.Assert;
/**
* Redis implementation of {@link MetadataStore}. Use this {@link MetadataStore}
* to achieve meta-data persistence across application restarts.
* Redis implementation of {@link MetadataStore}. Use this {@link MetadataStore} to
* achieve meta-data persistence across application restarts.
* <p>
* This implementation is based on the {@link RedisProperties} and its
* {@link #replace(String, String, String)}; it can't currently be used with a Redis
* cluster because the {@code WATCH} command is not supported.
*
* @author Gunnar Hillert
* @author Artem Bilan
*
* @since 3.0
*/
public class RedisMetadataStore implements ConcurrentMetadataStore {

View File

@@ -418,6 +418,8 @@ By default this `key` has the value `MetaData`.
Starting with _version 4.0_, this store now implements `ConcurrentMetadataStore`, allowing it to be reliably shared across multiple application instances where only one instance will be allowed to store or modify a key's value.
IMPORTANT: The `RedisMetadataStore.replace()` (for example in the `AbstractPersistentAcceptOnceFileListFilter`) can't be used with a Redis cluster since the `WATCH` command for atomicity is not currently supported.
[[redis-store-inbound-channel-adapter]]
=== RedisStore Inbound Channel Adapter