DATAGEODE-198 - Define lazy-resolving, composable Configurer implementations for all SDG Configurers.
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2018 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.data.gemfire.config.annotation;
|
||||
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
import org.springframework.data.gemfire.config.annotation.support.AbstractLazyResolvingComposableConfigurer;
|
||||
import org.springframework.data.gemfire.server.CacheServerFactoryBean;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* Composition for {@link CacheServerConfigurer}.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.springframework.data.gemfire.config.annotation.CacheServerConfigurer
|
||||
* @see org.springframework.data.gemfire.config.annotation.support.AbstractLazyResolvingComposableConfigurer
|
||||
* @see org.springframework.data.gemfire.server.CacheServerFactoryBean
|
||||
* @since 2.2.0
|
||||
*/
|
||||
public class LazyResolvingComposableCacheServerConfigurer
|
||||
extends AbstractLazyResolvingComposableConfigurer<CacheServerFactoryBean, CacheServerConfigurer>
|
||||
implements CacheServerConfigurer {
|
||||
|
||||
public static LazyResolvingComposableCacheServerConfigurer create() {
|
||||
return create(null);
|
||||
}
|
||||
|
||||
public static LazyResolvingComposableCacheServerConfigurer create(@Nullable BeanFactory beanFactory) {
|
||||
return new LazyResolvingComposableCacheServerConfigurer().with(beanFactory);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Class<CacheServerConfigurer> getConfigurerType() {
|
||||
return CacheServerConfigurer.class;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2018 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.data.gemfire.config.annotation;
|
||||
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
import org.springframework.data.gemfire.client.ClientCacheFactoryBean;
|
||||
import org.springframework.data.gemfire.config.annotation.support.AbstractLazyResolvingComposableConfigurer;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* Composition for {@link ClientCacheConfigurer}.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.springframework.data.gemfire.client.ClientCacheFactoryBean
|
||||
* @see org.springframework.data.gemfire.config.annotation.ClientCacheConfigurer
|
||||
* @see org.springframework.data.gemfire.config.annotation.support.AbstractLazyResolvingComposableConfigurer
|
||||
* @since 2.2.0
|
||||
*/
|
||||
public class LazyResolvingComposableClientCacheConfigurer
|
||||
extends AbstractLazyResolvingComposableConfigurer<ClientCacheFactoryBean, ClientCacheConfigurer>
|
||||
implements ClientCacheConfigurer {
|
||||
|
||||
public static LazyResolvingComposableClientCacheConfigurer create() {
|
||||
return create(null);
|
||||
}
|
||||
|
||||
public static LazyResolvingComposableClientCacheConfigurer create(@Nullable BeanFactory beanFactory) {
|
||||
return new LazyResolvingComposableClientCacheConfigurer().with(beanFactory);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Class<ClientCacheConfigurer> getConfigurerType() {
|
||||
return ClientCacheConfigurer.class;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2018 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.data.gemfire.config.annotation;
|
||||
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
import org.springframework.data.gemfire.DiskStoreFactoryBean;
|
||||
import org.springframework.data.gemfire.config.annotation.support.AbstractLazyResolvingComposableConfigurer;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* Composition of {@link DiskStoreConfigurer}.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.springframework.data.gemfire.DiskStoreFactoryBean
|
||||
* @see org.springframework.data.gemfire.config.annotation.DiskStoreConfigurer
|
||||
* @see org.springframework.data.gemfire.config.annotation.support.AbstractLazyResolvingComposableConfigurer
|
||||
* @since 2.2.0
|
||||
*/
|
||||
public class LazyResolvingComposableDiskStoreConfigurer
|
||||
extends AbstractLazyResolvingComposableConfigurer<DiskStoreFactoryBean, DiskStoreConfigurer>
|
||||
implements DiskStoreConfigurer {
|
||||
|
||||
public static LazyResolvingComposableDiskStoreConfigurer create() {
|
||||
return create(null);
|
||||
}
|
||||
|
||||
public static LazyResolvingComposableDiskStoreConfigurer create(@Nullable BeanFactory beanFactory) {
|
||||
return new LazyResolvingComposableDiskStoreConfigurer().with(beanFactory);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Class<DiskStoreConfigurer> getConfigurerType() {
|
||||
return DiskStoreConfigurer.class;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright 2018 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.data.gemfire.config.annotation;
|
||||
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
import org.springframework.data.gemfire.IndexFactoryBean;
|
||||
import org.springframework.data.gemfire.config.annotation.support.AbstractLazyResolvingComposableConfigurer;
|
||||
import org.springframework.data.gemfire.search.lucene.LuceneIndexFactoryBean;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* Composition for {@link IndexConfigurer}.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.springframework.data.gemfire.IndexFactoryBean
|
||||
* @see org.springframework.data.gemfire.config.annotation.IndexConfigurer
|
||||
* @see org.springframework.data.gemfire.config.annotation.support.AbstractLazyResolvingComposableConfigurer
|
||||
* @see org.springframework.data.gemfire.search.lucene.LuceneIndexFactoryBean
|
||||
* @since 2.2.0
|
||||
*/
|
||||
public class LazyResolvingComposableIndexConfigurer
|
||||
extends AbstractLazyResolvingComposableConfigurer<IndexFactoryBean, IndexConfigurer>
|
||||
implements IndexConfigurer {
|
||||
|
||||
public static LazyResolvingComposableIndexConfigurer create() {
|
||||
return create(null);
|
||||
}
|
||||
|
||||
public static LazyResolvingComposableIndexConfigurer create(@Nullable BeanFactory beanFactory) {
|
||||
return new LazyResolvingComposableIndexConfigurer().with(beanFactory);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Class<IndexConfigurer> getConfigurerType() {
|
||||
return IndexConfigurer.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void configure(String beanName, LuceneIndexFactoryBean luceneIndexFactoryBean) {
|
||||
|
||||
resolveConfigurers().forEach(configurer ->
|
||||
configurer.configure(beanName, luceneIndexFactoryBean));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2018 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.data.gemfire.config.annotation;
|
||||
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
import org.springframework.data.gemfire.CacheFactoryBean;
|
||||
import org.springframework.data.gemfire.config.annotation.support.AbstractLazyResolvingComposableConfigurer;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* Composition of {@link PeerCacheConfigurer}.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.springframework.data.gemfire.CacheFactoryBean
|
||||
* @see org.springframework.data.gemfire.config.annotation.PeerCacheConfigurer
|
||||
* @see org.springframework.data.gemfire.config.annotation.support.AbstractLazyResolvingComposableConfigurer
|
||||
* @since 2.2.0
|
||||
*/
|
||||
public class LazyResolvingComposablePeerCacheConfigurer
|
||||
extends AbstractLazyResolvingComposableConfigurer<CacheFactoryBean, PeerCacheConfigurer>
|
||||
implements PeerCacheConfigurer {
|
||||
|
||||
public static LazyResolvingComposablePeerCacheConfigurer create() {
|
||||
return create(null);
|
||||
}
|
||||
|
||||
public static LazyResolvingComposablePeerCacheConfigurer create(@Nullable BeanFactory beanFactory) {
|
||||
return new LazyResolvingComposablePeerCacheConfigurer().with(beanFactory);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Class<PeerCacheConfigurer> getConfigurerType() {
|
||||
return PeerCacheConfigurer.class;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2018 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.data.gemfire.config.annotation;
|
||||
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
import org.springframework.data.gemfire.client.PoolFactoryBean;
|
||||
import org.springframework.data.gemfire.config.annotation.support.AbstractLazyResolvingComposableConfigurer;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* Composition of {@link PoolConfigurer}.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.springframework.data.gemfire.client.PoolFactoryBean
|
||||
* @see org.springframework.data.gemfire.config.annotation.PoolConfigurer
|
||||
* @see org.springframework.data.gemfire.config.annotation.support.AbstractLazyResolvingComposableConfigurer
|
||||
* @since 2.2.0
|
||||
*/
|
||||
public class LazyResolvingComposablePoolConfigurer
|
||||
extends AbstractLazyResolvingComposableConfigurer<PoolFactoryBean, PoolConfigurer>
|
||||
implements PoolConfigurer {
|
||||
|
||||
public static LazyResolvingComposablePoolConfigurer create() {
|
||||
return create(null);
|
||||
}
|
||||
|
||||
public static LazyResolvingComposablePoolConfigurer create(@Nullable BeanFactory beanFactory) {
|
||||
return new LazyResolvingComposablePoolConfigurer().with(beanFactory);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Class<PoolConfigurer> getConfigurerType() {
|
||||
return PoolConfigurer.class;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright 2018 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.data.gemfire.config.annotation;
|
||||
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
import org.springframework.data.gemfire.PeerRegionFactoryBean;
|
||||
import org.springframework.data.gemfire.client.ClientRegionFactoryBean;
|
||||
import org.springframework.data.gemfire.config.annotation.support.AbstractLazyResolvingComposableConfigurer;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* Composition for {@link RegionConfigurer}.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.springframework.data.gemfire.PeerRegionFactoryBean
|
||||
* @see org.springframework.data.gemfire.client.ClientRegionFactoryBean
|
||||
* @see org.springframework.data.gemfire.config.annotation.RegionConfigurer
|
||||
* @see org.springframework.data.gemfire.config.annotation.support.AbstractLazyResolvingComposableConfigurer
|
||||
* @since 2.2.0
|
||||
*/
|
||||
public class LazyResolvingComposableRegionConfigurer
|
||||
extends AbstractLazyResolvingComposableConfigurer<ClientRegionFactoryBean<?, ?>, RegionConfigurer>
|
||||
implements RegionConfigurer {
|
||||
|
||||
public static LazyResolvingComposableRegionConfigurer create() {
|
||||
return create(null);
|
||||
}
|
||||
|
||||
public static LazyResolvingComposableRegionConfigurer create(@Nullable BeanFactory beanFactory) {
|
||||
return new LazyResolvingComposableRegionConfigurer().with(beanFactory);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Class<RegionConfigurer> getConfigurerType() {
|
||||
return RegionConfigurer.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void configure(String beanName, PeerRegionFactoryBean<?, ?> peerRegionFactoryBean) {
|
||||
|
||||
resolveConfigurers().forEach(configurer ->
|
||||
configurer.configure(beanName, peerRegionFactoryBean));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user