INT-3616: Zookeeper LockRegistry

JIRA: https://jira.spring.io/browse/INT-3616

Zookeeper implementation of `LockRegistry`, for example to support
clustered aggregators (when using external message group stores).

INT-3616: Polishing; PR Comments
This commit is contained in:
Gary Russell
2015-06-17 16:13:45 -04:00
committed by Artem Bilan
parent ec5230abc7
commit 06ffc19b0b
11 changed files with 721 additions and 49 deletions

View File

@@ -22,6 +22,7 @@ package org.springframework.integration.metadata;
* invoked when changes occur in the metadata store.
*
* @author Marius Bogoevici
* @since 4.2
*/
public interface ListenableMetadataStore extends ConcurrentMetadataStore {

View File

@@ -20,6 +20,7 @@ package org.springframework.integration.metadata;
* A callback to be invoked whenever a value changes in the data store.
*
* @author Marius Bogoevici
* @since 4.2
*/
public interface MetadataStoreListener {

View File

@@ -0,0 +1,35 @@
/*
* Copyright 2015 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.support.locks;
/**
* A {@link LockRegistry} implementing this interface supports the removal of aged locks
* that are not currently locked.
*
* @author Gary Russell
* @since 4.2
*
*/
public interface ExpirableLockRegistry extends LockRegistry {
/**
* Remove locks last acquired more than 'age' ago that are not currently locked.
* @param age the time since the lock was last obtained.
* @throws IllegalStateException if the registry configuration does not support this feature.
*/
void expireUnusedOlderThan(long age);
}