SGF-589 - Reorganize and repackage Spring Data Geode API classes by functional concern.
This commit is contained in:
@@ -61,7 +61,7 @@ Since 1.1, Spring Data GemFire provides an implementation of the Spring 3.1 http
|
||||
<gfe:cache id="gemfire-cache"/>
|
||||
|
||||
<!-- declare GemFire Cache Manager -->
|
||||
<bean id="cacheManager" class="org.springframework.data.gemfire.support.GemfireCacheManager" p:cache-ref="gemfire-cache">
|
||||
<bean id="cacheManager" class="org.springframework.data.gemfire.cache.GemfireCacheManager" p:cache-ref="gemfire-cache">
|
||||
</beans>
|
||||
----
|
||||
|
||||
|
||||
@@ -703,7 +703,7 @@ class, like so...
|
||||
+
|
||||
[source,xml]
|
||||
----
|
||||
<bean id="ttlExpiration" class="org.springframework.data.gemfire.support.AnnotationBasedExpiration"
|
||||
<bean id="ttlExpiration" class="org.springframework.data.gemfire.expiration.AnnotationBasedExpiration"
|
||||
factory-method="forTimeToLive"/>
|
||||
|
||||
<gfe:partitioned-region id="Example" persistent="false">
|
||||
@@ -733,7 +733,7 @@ Expiration attributes on the `AnnotationBasedExpiration` bean by doing the follo
|
||||
<constructor-arg value="#{T(org.apache.geode.cache.ExpirationAction).DESTROY}"/>
|
||||
</bean>
|
||||
|
||||
<bean id="ttiExpiration" class="org.springframework.data.gemfire.support.AnnotationBasedExpiration"
|
||||
<bean id="ttiExpiration" class="org.springframework.data.gemfire.expiration.AnnotationBasedExpiration"
|
||||
factory-method="forIdleTimeout">
|
||||
<constructor-arg ref="defaultExpirationAttributes"/>
|
||||
</bean>
|
||||
@@ -786,7 +786,7 @@ can be strongly typed. For example (building on the example above)...
|
||||
----
|
||||
<util:properties id="expirationSettings">
|
||||
<prop key="gemfire.region.entry.expiration.ttl.timeout">600</prop>
|
||||
<prop key="gemfire.region.entry.expiration.ttl.action">#{T(org.springframework.data.gemfire.ExpirationActionType).DESTROY}</prop>
|
||||
<prop key="gemfire.region.entry.expiration.ttl.action">#{T(org.springframework.data.gemfire.expiration.ExpirationActionType).DESTROY}</prop>
|
||||
<prop key="gemfire.region.entry.expiration.tti.action">#{T(org.apache.geode.cache.ExpirationAction).INVALIDATE}</prop>
|
||||
...
|
||||
</util:properties>
|
||||
|
||||
@@ -18,7 +18,6 @@ package org.springframework.data.gemfire;
|
||||
import org.apache.geode.cache.DataPolicy;
|
||||
import org.apache.geode.cache.RegionFactory;
|
||||
import org.apache.geode.cache.Scope;
|
||||
import org.springframework.data.gemfire.support.RegionShortcutWrapper;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
|
||||
@@ -43,7 +43,6 @@ import org.springframework.beans.factory.DisposableBean;
|
||||
import org.springframework.context.SmartLifecycle;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.data.gemfire.client.ClientRegionFactoryBean;
|
||||
import org.springframework.data.gemfire.support.RegionShortcutWrapper;
|
||||
import org.springframework.data.gemfire.util.ArrayUtils;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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
|
||||
* 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.support;
|
||||
package org.springframework.data.gemfire;
|
||||
|
||||
import org.apache.geode.cache.DataPolicy;
|
||||
import org.apache.geode.cache.RegionShortcut;
|
||||
@@ -1,175 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.geode.cache.CacheListener;
|
||||
import org.apache.geode.cache.Region;
|
||||
import org.apache.geode.cache.asyncqueue.AsyncEventQueue;
|
||||
import org.apache.geode.cache.wan.GatewaySender;
|
||||
import org.springframework.beans.factory.BeanInitializationException;
|
||||
import org.springframework.beans.factory.FactoryBean;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
/**
|
||||
* FactoryBean for creating a Gemfire sub-Regions.
|
||||
*
|
||||
* @author David Turanski
|
||||
* @author John Blum
|
||||
* @param <K> Region Key Type
|
||||
* @param <V> Region Value Type
|
||||
* @deprecated as Spring Data GemFire 1.4.0. Use Region type specific FactoryBeans
|
||||
* (e.g. ReplicatedRegionFactoryBean) instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings({"deprecation", "unused"})
|
||||
public class SubRegionFactoryBean<K, V> extends org.apache.geode.cache.AttributesFactory<K, V>
|
||||
implements FactoryBean<Region<K, V>>, InitializingBean {
|
||||
|
||||
protected final Log log = LogFactory.getLog(getClass());
|
||||
|
||||
private boolean lookupOnly;
|
||||
|
||||
private CacheListener<K, V>[] cacheListeners;
|
||||
|
||||
private Object[] asyncEventQueues;
|
||||
private Object[] gatewaySenders;
|
||||
|
||||
private Region<?, ?> parentRegion;
|
||||
private Region<K, V> subRegion;
|
||||
|
||||
private String name;
|
||||
private String regionName;
|
||||
|
||||
@Override
|
||||
public Region<K, V> getObject() throws Exception {
|
||||
return this.subRegion;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<?> getObjectType() {
|
||||
// TODO perhaps this should be 'return (subRegion != null ? subRegion.getClass() : Region.class);' for consistency.
|
||||
return Region.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSingleton() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
Assert.notNull(parentRegion, "The parent Region cannot be null.");
|
||||
|
||||
this.subRegion = parentRegion.getSubregion(regionName);
|
||||
|
||||
if (this.subRegion == null) {
|
||||
if (lookupOnly) {
|
||||
throw new BeanInitializationException(String.format("Cannot find Region [%1$s] in Cache %2$s",
|
||||
regionName, parentRegion.getRegionService()));
|
||||
}
|
||||
else {
|
||||
log.debug(String.format("Creating sub-Region of [%1$s] with name [%2$s]...",
|
||||
(parentRegion.getFullPath() != null ? parentRegion.getFullPath() : parentRegion.getName()),
|
||||
regionName));
|
||||
|
||||
if (!ObjectUtils.isEmpty(asyncEventQueues)) {
|
||||
for (Object asyncEventQueue : asyncEventQueues) {
|
||||
addAsyncEventQueueId(((AsyncEventQueue) asyncEventQueue).getId());
|
||||
}
|
||||
}
|
||||
|
||||
if (!ObjectUtils.isEmpty(cacheListeners)) {
|
||||
for (CacheListener<K, V> listener : cacheListeners) {
|
||||
addCacheListener(listener);
|
||||
}
|
||||
}
|
||||
|
||||
if (!ObjectUtils.isEmpty(gatewaySenders)) {
|
||||
for (Object gatewaySender : gatewaySenders) {
|
||||
addGatewaySenderId(((GatewaySender) gatewaySender).getId());
|
||||
}
|
||||
}
|
||||
|
||||
this.subRegion = this.parentRegion.createSubregion(regionName, create());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param asyncEventQueues defined as Object for backward compatibility with Gemfire 6.
|
||||
*/
|
||||
public void setAsyncEventQueues(Object[] asyncEventQueues) {
|
||||
this.asyncEventQueues = asyncEventQueues;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the cache listeners used for the region used by this factory. Used
|
||||
* only when a new region is created. Overrides the settings specified
|
||||
* through setAttributes(org.apache.geode.cache.RegionAttributes).
|
||||
*
|
||||
* @param cacheListeners the cacheListeners to set on a newly created region
|
||||
*/
|
||||
public void setCacheListeners(CacheListener<K, V>[] cacheListeners) {
|
||||
this.cacheListeners = cacheListeners;
|
||||
}
|
||||
|
||||
public void setGatewaySenders(Object[] gatewaySenders) {
|
||||
this.gatewaySenders = gatewaySenders;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set to true if the subregion should already exist, e.g., specified by
|
||||
* <lookup-region>
|
||||
*
|
||||
* @param lookupOnly a boolean value indicating whether this Subregion should be looked up instead of created.
|
||||
*/
|
||||
public void setLookupOnly(boolean lookupOnly) {
|
||||
this.lookupOnly = lookupOnly;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the bean name - the same as the Subregion full path.
|
||||
*
|
||||
* @param name the name of this Subregion bean in the Spring context.
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the simple name of this Subregion.
|
||||
*
|
||||
* @param regionName the simple name of this Subregion.
|
||||
*/
|
||||
public void setRegionName(String regionName) {
|
||||
this.regionName = regionName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the parent Region.
|
||||
*
|
||||
* @param parent a reference to the parent Region.
|
||||
*/
|
||||
public void setParent(Region<?, ?> parent) {
|
||||
this.parentRegion = parent;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2014 the original author or authors.
|
||||
* Copyright 2016 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.
|
||||
@@ -12,9 +12,10 @@
|
||||
* 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.support;
|
||||
package org.springframework.data.gemfire.cache;
|
||||
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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.
|
||||
@@ -12,9 +12,10 @@
|
||||
* 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.support;
|
||||
package org.springframework.data.gemfire.cache;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
@@ -140,7 +141,7 @@ public class GemfireCacheManager extends AbstractCacheManager {
|
||||
*
|
||||
* @param region GemFire {@link Region} to wrap (adapt).
|
||||
* @return an instance of {@link GemfireCache} initialized with the given GemFire {@link Region}.
|
||||
* @see org.springframework.data.gemfire.support.GemfireCache
|
||||
* @see GemfireCache
|
||||
* @see org.apache.geode.cache.Region
|
||||
*/
|
||||
protected GemfireCache newGemfireCache(Region<?, ?> region) {
|
||||
@@ -1,20 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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
|
||||
* 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;
|
||||
package org.springframework.data.gemfire.client;
|
||||
|
||||
import org.apache.geode.cache.client.ClientRegionShortcut;
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
@@ -1,20 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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
|
||||
* 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.support;
|
||||
package org.springframework.data.gemfire.client;
|
||||
|
||||
import org.apache.geode.cache.DataPolicy;
|
||||
import org.apache.geode.cache.client.ClientRegionShortcut;
|
||||
@@ -28,8 +28,8 @@ import org.apache.geode.management.internal.cli.functions.GetRegionsFunction;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
|
||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
import org.springframework.data.gemfire.function.execution.GemfireOnServersFunctionTemplate;
|
||||
import org.springframework.data.gemfire.client.function.ListRegionsOnServerFunction;
|
||||
import org.springframework.data.gemfire.function.execution.GemfireOnServersFunctionTemplate;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@ import org.apache.geode.cache.EvictionAttributes;
|
||||
import org.apache.geode.cache.Region;
|
||||
import org.apache.geode.cache.util.ObjectSizer;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.data.gemfire.EvictionActionType;
|
||||
import org.springframework.data.gemfire.EvictionPolicyType;
|
||||
import org.springframework.data.gemfire.eviction.EvictionActionType;
|
||||
import org.springframework.data.gemfire.eviction.EvictionPolicyType;
|
||||
|
||||
/**
|
||||
* The {@link EnableEviction} annotation marks a Spring {@link org.springframework.context.annotation.Configuration @Configuration}
|
||||
@@ -73,7 +73,7 @@ public @interface EnableEviction {
|
||||
*
|
||||
* Defaults to {@link EvictionActionType#LOCAL_DESTROY}.
|
||||
*
|
||||
* @see org.springframework.data.gemfire.EvictionActionType
|
||||
* @see EvictionActionType
|
||||
*/
|
||||
EvictionActionType action() default EvictionActionType.LOCAL_DESTROY;
|
||||
|
||||
@@ -106,7 +106,7 @@ public @interface EnableEviction {
|
||||
*
|
||||
* Defaults to {@link EvictionPolicyType#ENTRY_COUNT}.
|
||||
*
|
||||
* @see org.springframework.data.gemfire.EvictionPolicyType
|
||||
* @see EvictionPolicyType
|
||||
*/
|
||||
EvictionPolicyType type() default EvictionPolicyType.ENTRY_COUNT;
|
||||
|
||||
|
||||
@@ -28,10 +28,10 @@ import java.lang.annotation.Target;
|
||||
|
||||
import org.apache.geode.cache.Region;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.data.gemfire.ExpirationActionType;
|
||||
import org.springframework.data.gemfire.support.Expiration;
|
||||
import org.springframework.data.gemfire.support.IdleTimeoutExpiration;
|
||||
import org.springframework.data.gemfire.support.TimeToLiveExpiration;
|
||||
import org.springframework.data.gemfire.expiration.Expiration;
|
||||
import org.springframework.data.gemfire.expiration.ExpirationActionType;
|
||||
import org.springframework.data.gemfire.expiration.IdleTimeoutExpiration;
|
||||
import org.springframework.data.gemfire.expiration.TimeToLiveExpiration;
|
||||
|
||||
/**
|
||||
* The {@link EnableExpiration} annotation marks a Spring {@link org.springframework.context.annotation.Configuration @Configuration}
|
||||
@@ -41,9 +41,9 @@ import org.springframework.data.gemfire.support.TimeToLiveExpiration;
|
||||
* @author John Blum
|
||||
* @see org.springframework.context.annotation.Import
|
||||
* @see org.springframework.data.gemfire.config.annotation.ExpirationConfiguration
|
||||
* @see org.springframework.data.gemfire.support.Expiration
|
||||
* @see org.springframework.data.gemfire.support.IdleTimeoutExpiration
|
||||
* @see org.springframework.data.gemfire.support.TimeToLiveExpiration
|
||||
* @see Expiration
|
||||
* @see IdleTimeoutExpiration
|
||||
* @see TimeToLiveExpiration
|
||||
* @see org.apache.geode.cache.Region
|
||||
* @see <a href="http://docs.spring.io/spring-data-gemfire/docs/current/reference/html/#bootstrap:region:expiration:annotation">Annotation-based Data Expiration</a>
|
||||
* @see <a href="http://gemfire.docs.pivotal.io/docs-gemfire/latest/developing/expiration/chapter_overview.html">GemFire Expiration</a>
|
||||
|
||||
@@ -38,12 +38,12 @@ import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.ImportAware;
|
||||
import org.springframework.core.annotation.AnnotationAttributes;
|
||||
import org.springframework.core.type.AnnotationMetadata;
|
||||
import org.springframework.data.gemfire.EvictionActionType;
|
||||
import org.springframework.data.gemfire.EvictionAttributesFactoryBean;
|
||||
import org.springframework.data.gemfire.EvictionPolicyType;
|
||||
import org.springframework.data.gemfire.RegionFactoryBean;
|
||||
import org.springframework.data.gemfire.RegionLookupFactoryBean;
|
||||
import org.springframework.data.gemfire.client.ClientRegionFactoryBean;
|
||||
import org.springframework.data.gemfire.eviction.EvictionActionType;
|
||||
import org.springframework.data.gemfire.eviction.EvictionAttributesFactoryBean;
|
||||
import org.springframework.data.gemfire.eviction.EvictionPolicyType;
|
||||
import org.springframework.data.gemfire.util.ArrayUtils;
|
||||
import org.springframework.data.gemfire.util.CollectionUtils;
|
||||
import org.springframework.util.Assert;
|
||||
@@ -60,9 +60,9 @@ import org.springframework.util.StringUtils;
|
||||
* @see org.springframework.context.annotation.Bean
|
||||
* @see org.springframework.context.annotation.Configuration
|
||||
* @see org.springframework.context.annotation.ImportAware
|
||||
* @see org.springframework.data.gemfire.EvictionActionType
|
||||
* @see org.springframework.data.gemfire.EvictionAttributesFactoryBean
|
||||
* @see org.springframework.data.gemfire.EvictionPolicyType
|
||||
* @see EvictionActionType
|
||||
* @see EvictionAttributesFactoryBean
|
||||
* @see EvictionPolicyType
|
||||
* @see org.springframework.data.gemfire.RegionFactoryBean
|
||||
* @see org.springframework.data.gemfire.client.ClientRegionFactoryBean
|
||||
* @see org.apache.geode.cache.EvictionAttributes
|
||||
@@ -345,7 +345,7 @@ public class EvictionConfiguration implements ApplicationContextAware, ImportAwa
|
||||
* @param maximum integer value specifying the configured Eviction threshold.
|
||||
* @param type {@link EvictionPolicyType} specifying the type of Eviction algorithm.
|
||||
* @return a resolved value for the Eviction maximum/threshold.
|
||||
* @see org.springframework.data.gemfire.EvictionPolicyType
|
||||
* @see EvictionPolicyType
|
||||
*/
|
||||
protected static Integer resolveThreshold(int maximum, EvictionPolicyType type) {
|
||||
return (EvictionPolicyType.HEAP_PERCENTAGE.equals(type) ? null : maximum);
|
||||
|
||||
@@ -37,8 +37,8 @@ import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.ImportAware;
|
||||
import org.springframework.core.annotation.AnnotationAttributes;
|
||||
import org.springframework.core.type.AnnotationMetadata;
|
||||
import org.springframework.data.gemfire.ExpirationActionType;
|
||||
import org.springframework.data.gemfire.support.AnnotationBasedExpiration;
|
||||
import org.springframework.data.gemfire.expiration.AnnotationBasedExpiration;
|
||||
import org.springframework.data.gemfire.expiration.ExpirationActionType;
|
||||
import org.springframework.data.gemfire.util.ArrayUtils;
|
||||
import org.springframework.data.gemfire.util.CollectionUtils;
|
||||
import org.springframework.data.gemfire.util.SpringUtils;
|
||||
@@ -370,7 +370,7 @@ public class ExpirationConfiguration implements ImportAware {
|
||||
* meta-data.
|
||||
* @throws IllegalArgumentException if the {@link ExpirationType} array is empty.
|
||||
* @see org.springframework.data.gemfire.config.annotation.EnableExpiration.ExpirationType
|
||||
* @see org.springframework.data.gemfire.ExpirationActionType
|
||||
* @see ExpirationActionType
|
||||
* @see #ExpirationPolicyMetaData(ExpirationAttributes, Set, Set)
|
||||
* @see #newExpirationAttributes(int, ExpirationActionType)
|
||||
*/
|
||||
@@ -388,7 +388,7 @@ public class ExpirationConfiguration implements ImportAware {
|
||||
*
|
||||
* @param action given {@link ExpirationActionType} to evaluate.
|
||||
* @return the resolved {@link ExpirationActionType} or the default if {@code action} is {@literal null}.
|
||||
* @see org.springframework.data.gemfire.ExpirationActionType
|
||||
* @see ExpirationActionType
|
||||
*/
|
||||
protected static ExpirationActionType resolveAction(ExpirationActionType action) {
|
||||
return SpringUtils.defaultIfNull(action, DEFAULT_ACTION);
|
||||
@@ -415,7 +415,7 @@ public class ExpirationConfiguration implements ImportAware {
|
||||
* @param types type of expiration algorithm/behavior (TTI/TTL) configured for the {@link Region}.
|
||||
* @throws IllegalArgumentException if the {@link ExpirationType} {@link Set} is empty.
|
||||
* @see org.springframework.data.gemfire.config.annotation.EnableExpiration.ExpirationType
|
||||
* @see org.springframework.data.gemfire.ExpirationActionType
|
||||
* @see ExpirationActionType
|
||||
* @see #ExpirationPolicyMetaData(ExpirationAttributes, Set, Set)
|
||||
* @see #newExpirationAttributes(int, ExpirationActionType)
|
||||
* @see #resolveAction(ExpirationActionType)
|
||||
|
||||
@@ -28,10 +28,6 @@ import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
|
||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
import org.springframework.data.gemfire.EvictionActionConverter;
|
||||
import org.springframework.data.gemfire.EvictionPolicyConverter;
|
||||
import org.springframework.data.gemfire.EvictionPolicyType;
|
||||
import org.springframework.data.gemfire.ExpirationActionConverter;
|
||||
import org.springframework.data.gemfire.IndexMaintenancePolicyConverter;
|
||||
import org.springframework.data.gemfire.IndexMaintenancePolicyType;
|
||||
import org.springframework.data.gemfire.IndexType;
|
||||
@@ -39,6 +35,10 @@ import org.springframework.data.gemfire.IndexTypeConverter;
|
||||
import org.springframework.data.gemfire.InterestPolicyConverter;
|
||||
import org.springframework.data.gemfire.ScopeConverter;
|
||||
import org.springframework.data.gemfire.client.InterestResultPolicyConverter;
|
||||
import org.springframework.data.gemfire.eviction.EvictionActionConverter;
|
||||
import org.springframework.data.gemfire.eviction.EvictionPolicyConverter;
|
||||
import org.springframework.data.gemfire.eviction.EvictionPolicyType;
|
||||
import org.springframework.data.gemfire.expiration.ExpirationActionConverter;
|
||||
import org.springframework.data.gemfire.server.SubscriptionEvictionPolicy;
|
||||
import org.springframework.data.gemfire.server.SubscriptionEvictionPolicyConverter;
|
||||
import org.springframework.data.gemfire.support.AbstractPropertyEditorConverterSupport;
|
||||
|
||||
@@ -23,10 +23,8 @@ import org.springframework.beans.factory.support.ManagedList;
|
||||
import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.data.gemfire.RegionAttributesFactoryBean;
|
||||
import org.springframework.data.gemfire.client.ClientRegionFactoryBean;
|
||||
import org.springframework.data.gemfire.client.Interest;
|
||||
import org.springframework.data.gemfire.client.KeyInterest;
|
||||
import org.springframework.data.gemfire.client.RegexInterest;
|
||||
import org.springframework.data.repository.query.QueryLookupStrategy;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.util.xml.DomUtils;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.springframework.beans.factory.support.AbstractBeanDefinition;
|
||||
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
|
||||
import org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser;
|
||||
import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.data.gemfire.FunctionServiceFactoryBean;
|
||||
import org.springframework.data.gemfire.function.FunctionServiceFactoryBean;
|
||||
import org.springframework.data.gemfire.util.SpringUtils;
|
||||
import org.springframework.util.xml.DomUtils;
|
||||
import org.w3c.dom.Element;
|
||||
@@ -32,7 +32,7 @@ import org.w3c.dom.Element;
|
||||
* @author David Turanski
|
||||
* @author John Blum
|
||||
* @see org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser
|
||||
* @see org.springframework.data.gemfire.FunctionServiceFactoryBean
|
||||
* @see FunctionServiceFactoryBean
|
||||
*/
|
||||
class FunctionServiceParser extends AbstractSimpleBeanDefinitionParser {
|
||||
|
||||
|
||||
@@ -28,11 +28,11 @@ import org.springframework.beans.factory.support.BeanDefinitionBuilder;
|
||||
import org.springframework.beans.factory.support.ManagedList;
|
||||
import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.core.Conventions;
|
||||
import org.springframework.data.gemfire.EvictionAttributesFactoryBean;
|
||||
import org.springframework.data.gemfire.ExpirationAttributesFactoryBean;
|
||||
import org.springframework.data.gemfire.GemfireUtils;
|
||||
import org.springframework.data.gemfire.SubscriptionAttributesFactoryBean;
|
||||
import org.springframework.data.gemfire.config.support.GemfireFeature;
|
||||
import org.springframework.data.gemfire.eviction.EvictionAttributesFactoryBean;
|
||||
import org.springframework.data.gemfire.expiration.ExpirationAttributesFactoryBean;
|
||||
import org.springframework.data.gemfire.util.SpringUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.util.xml.DomUtils;
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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
|
||||
* 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;
|
||||
package org.springframework.data.gemfire.eviction;
|
||||
|
||||
import org.apache.geode.cache.EvictionAction;
|
||||
import org.springframework.data.gemfire.support.AbstractPropertyEditorConverterSupport;
|
||||
@@ -24,7 +25,7 @@ import org.springframework.data.gemfire.support.AbstractPropertyEditorConverterS
|
||||
* an Object value into an instance of GemFire EvictionAction.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.springframework.data.gemfire.EvictionActionType
|
||||
* @see EvictionActionType
|
||||
* @see org.springframework.data.gemfire.support.AbstractPropertyEditorConverterSupport
|
||||
* @see org.apache.geode.cache.EvictionAction
|
||||
* @since 1.6.0
|
||||
@@ -1,20 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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
|
||||
* 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;
|
||||
package org.springframework.data.gemfire.eviction;
|
||||
|
||||
import org.apache.geode.cache.EvictionAction;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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.
|
||||
@@ -12,9 +12,10 @@
|
||||
* 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;
|
||||
package org.springframework.data.gemfire.eviction;
|
||||
|
||||
import org.apache.geode.cache.EvictionAction;
|
||||
import org.apache.geode.cache.EvictionAttributes;
|
||||
@@ -1,20 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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
|
||||
* 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;
|
||||
package org.springframework.data.gemfire.eviction;
|
||||
|
||||
import org.springframework.data.gemfire.support.AbstractPropertyEditorConverterSupport;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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.
|
||||
@@ -12,9 +12,10 @@
|
||||
* 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;
|
||||
package org.springframework.data.gemfire.eviction;
|
||||
|
||||
import org.apache.geode.cache.EvictionAlgorithm;
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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
|
||||
* 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.support;
|
||||
package org.springframework.data.gemfire.expiration;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
@@ -33,8 +34,6 @@ import org.springframework.context.expression.EnvironmentAccessor;
|
||||
import org.springframework.context.expression.MapAccessor;
|
||||
import org.springframework.core.annotation.AnnotationUtils;
|
||||
import org.springframework.core.convert.ConversionService;
|
||||
import org.springframework.data.gemfire.ExpirationActionConverter;
|
||||
import org.springframework.data.gemfire.ExpirationActionType;
|
||||
import org.springframework.expression.EvaluationContext;
|
||||
import org.springframework.expression.EvaluationException;
|
||||
import org.springframework.expression.Expression;
|
||||
@@ -56,10 +55,10 @@ import org.springframework.util.ObjectUtils;
|
||||
* @see java.lang.annotation.Annotation
|
||||
* @see org.springframework.beans.factory.BeanFactory
|
||||
* @see org.springframework.beans.factory.BeanFactoryAware
|
||||
* @see org.springframework.data.gemfire.ExpirationActionType
|
||||
* @see org.springframework.data.gemfire.support.Expiration
|
||||
* @see org.springframework.data.gemfire.support.IdleTimeoutExpiration
|
||||
* @see org.springframework.data.gemfire.support.TimeToLiveExpiration
|
||||
* @see ExpirationActionType
|
||||
* @see Expiration
|
||||
* @see IdleTimeoutExpiration
|
||||
* @see TimeToLiveExpiration
|
||||
* @see org.apache.geode.cache.CustomExpiry
|
||||
* @see org.apache.geode.cache.ExpirationAction
|
||||
* @see org.apache.geode.cache.ExpirationAttributes
|
||||
@@ -105,8 +104,8 @@ public class AnnotationBasedExpiration<K, V> implements BeanFactoryAware, Custom
|
||||
* @param <V> {@link Class} type of the {@link Region} entry value.
|
||||
* @return an {@link AnnotationBasedExpiration} instance to process expired annotated {@link Region} entries
|
||||
* using Idle Timeout expiration.
|
||||
* @see org.springframework.data.gemfire.support.AnnotationBasedExpiration
|
||||
* @see org.springframework.data.gemfire.support.IdleTimeoutExpiration
|
||||
* @see AnnotationBasedExpiration
|
||||
* @see IdleTimeoutExpiration
|
||||
* @see #forIdleTimeout(org.apache.geode.cache.ExpirationAttributes)
|
||||
*/
|
||||
public static <K, V> AnnotationBasedExpiration<K, V> forIdleTimeout() {
|
||||
@@ -124,8 +123,8 @@ public class AnnotationBasedExpiration<K, V> implements BeanFactoryAware, Custom
|
||||
* was specified on the {@link Region}.
|
||||
* @return an {@link AnnotationBasedExpiration} instance to process expired annotated {@link Region} entries
|
||||
* using Idle Timeout expiration.
|
||||
* @see org.springframework.data.gemfire.support.AnnotationBasedExpiration
|
||||
* @see org.springframework.data.gemfire.support.IdleTimeoutExpiration
|
||||
* @see AnnotationBasedExpiration
|
||||
* @see IdleTimeoutExpiration
|
||||
* @see #AnnotationBasedExpiration(ExpirationAttributes)
|
||||
*/
|
||||
public static <K, V> AnnotationBasedExpiration<K, V> forIdleTimeout(ExpirationAttributes defaultExpirationAttributes) {
|
||||
@@ -146,8 +145,8 @@ public class AnnotationBasedExpiration<K, V> implements BeanFactoryAware, Custom
|
||||
* @param <V> {@link Class} type of the {@link Region} entry value.
|
||||
* @return an {@link AnnotationBasedExpiration} instance to process expired annotated {@link Region} entries
|
||||
* using Time-To-Live expiration.
|
||||
* @see org.springframework.data.gemfire.support.AnnotationBasedExpiration
|
||||
* @see org.springframework.data.gemfire.support.TimeToLiveExpiration
|
||||
* @see AnnotationBasedExpiration
|
||||
* @see TimeToLiveExpiration
|
||||
* @see #forTimeToLive(org.apache.geode.cache.ExpirationAttributes)
|
||||
*/
|
||||
public static <K, V> AnnotationBasedExpiration<K, V> forTimeToLive() {
|
||||
@@ -165,8 +164,8 @@ public class AnnotationBasedExpiration<K, V> implements BeanFactoryAware, Custom
|
||||
* was specified on the {@link Region}.
|
||||
* @return an {@link AnnotationBasedExpiration} instance to process expired annotated {@link Region} entries
|
||||
* using Time-To-Live expiration.
|
||||
* @see org.springframework.data.gemfire.support.AnnotationBasedExpiration
|
||||
* @see org.springframework.data.gemfire.support.TimeToLiveExpiration
|
||||
* @see AnnotationBasedExpiration
|
||||
* @see TimeToLiveExpiration
|
||||
* @see #AnnotationBasedExpiration(ExpirationAttributes)
|
||||
*/
|
||||
public static <K, V> AnnotationBasedExpiration<K, V> forTimeToLive(ExpirationAttributes defaultExpirationAttributes) {
|
||||
@@ -288,7 +287,7 @@ public class AnnotationBasedExpiration<K, V> implements BeanFactoryAware, Custom
|
||||
* @param entry {@link Region} entry used as the source of the expiration policy meta-data.
|
||||
* @return {@link ExpirationMetaData} extracted from the {@link Region} entry or {@literal null}
|
||||
* if the expiration policy meta-data could not be determined from the {@link Region} entry.
|
||||
* @see org.springframework.data.gemfire.support.AnnotationBasedExpiration.ExpirationMetaData
|
||||
* @see AnnotationBasedExpiration.ExpirationMetaData
|
||||
*/
|
||||
protected ExpirationMetaData getExpirationMetaData(Region.Entry<K, V> entry) {
|
||||
return (isExpirationConfigured(entry) ? ExpirationMetaData.from(getExpiration(entry)) : null);
|
||||
@@ -304,7 +303,7 @@ public class AnnotationBasedExpiration<K, V> implements BeanFactoryAware, Custom
|
||||
* @return custom {@link ExpirationAttributes} configured from the application domain object specific
|
||||
* expiration policy or the default expiration settings if the application domain object has not been
|
||||
* annotated with custom expiration meta-data.
|
||||
* @see org.springframework.data.gemfire.support.AnnotationBasedExpiration.ExpirationMetaData
|
||||
* @see AnnotationBasedExpiration.ExpirationMetaData
|
||||
* @see org.apache.geode.cache.ExpirationAttributes
|
||||
* @see #getDefaultExpirationAttributes()
|
||||
*/
|
||||
@@ -318,7 +317,7 @@ public class AnnotationBasedExpiration<K, V> implements BeanFactoryAware, Custom
|
||||
*
|
||||
* @param entry the Region.Entry to evaluate for the presence of the Expiration Annotation.
|
||||
* @return a boolean value indicating whether the Region Entry has been annotated with @Expiration.
|
||||
* @see org.springframework.data.gemfire.support.Expiration
|
||||
* @see Expiration
|
||||
* @see #isAnnotationPresent(Object, Class)
|
||||
*/
|
||||
protected boolean isExpirationConfigured(Region.Entry<K, V> entry) {
|
||||
@@ -336,7 +335,7 @@ public class AnnotationBasedExpiration<K, V> implements BeanFactoryAware, Custom
|
||||
* @param entry the Region.Entry from which to extract the Expiration Annotation meta-data.
|
||||
* @return the Expiration Annotation meta-data for the given Region Entry or {@code null}
|
||||
* if the Region Entry has not been annotated with @Expiration.
|
||||
* @see org.springframework.data.gemfire.support.Expiration
|
||||
* @see Expiration
|
||||
* @see #getAnnotation(Object, Class)
|
||||
*/
|
||||
protected Expiration getExpiration(Region.Entry<K, V> entry) {
|
||||
@@ -353,7 +352,7 @@ public class AnnotationBasedExpiration<K, V> implements BeanFactoryAware, Custom
|
||||
*
|
||||
* @param entry the Region.Entry to evaluate for the presence of the IdleTimeoutExpiration Annotation.
|
||||
* @return a boolean value indicating whether the Region Entry has been annotated with @IdleTimeoutExpiration.
|
||||
* @see org.springframework.data.gemfire.support.IdleTimeoutExpiration
|
||||
* @see IdleTimeoutExpiration
|
||||
* @see #isAnnotationPresent(Object, Class)
|
||||
*/
|
||||
protected boolean isIdleTimeoutConfigured(Region.Entry<K, V> entry) {
|
||||
@@ -371,7 +370,7 @@ public class AnnotationBasedExpiration<K, V> implements BeanFactoryAware, Custom
|
||||
* @param entry the Region.Entry from which to extract the IdleTimeoutExpiration Annotation meta-data.
|
||||
* @return the IdleTimeoutExpiration Annotation meta-data for the given Region Entry or {@code null}
|
||||
* if the Region Entry has not been annotated with @IdleTimeoutExpiration.
|
||||
* @see org.springframework.data.gemfire.support.IdleTimeoutExpiration
|
||||
* @see IdleTimeoutExpiration
|
||||
* @see #getAnnotation(Object, Class)
|
||||
*/
|
||||
protected IdleTimeoutExpiration getIdleTimeout(Region.Entry<K, V> entry) {
|
||||
@@ -388,7 +387,7 @@ public class AnnotationBasedExpiration<K, V> implements BeanFactoryAware, Custom
|
||||
*
|
||||
* @param entry the Region.Entry to evaluate for the presence of the TimeToLiveExpiration Annotation.
|
||||
* @return a boolean value indicating whether the Region Entry has been annotated with @TimeToLiveExpiration.
|
||||
* @see org.springframework.data.gemfire.support.TimeToLiveExpiration
|
||||
* @see TimeToLiveExpiration
|
||||
* @see #isAnnotationPresent(Object, Class)
|
||||
*/
|
||||
protected boolean isTimeToLiveConfigured(Region.Entry<K, V> entry) {
|
||||
@@ -406,7 +405,7 @@ public class AnnotationBasedExpiration<K, V> implements BeanFactoryAware, Custom
|
||||
* @param entry the Region.Entry from which to extract the TimeToLiveExpiration Annotation meta-data.
|
||||
* @return the TimeToLiveExpiration Annotation meta-data for the given Region Entry or {@code null}
|
||||
* if the Region Entry has not been annotated with @TimeToLiveExpiration.
|
||||
* @see org.springframework.data.gemfire.support.TimeToLiveExpiration
|
||||
* @see TimeToLiveExpiration
|
||||
* @see #getAnnotation(Object, Class)
|
||||
*/
|
||||
protected TimeToLiveExpiration getTimeToLive(Region.Entry<K, V> entry) {
|
||||
@@ -1,20 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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
|
||||
* 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.support;
|
||||
package org.springframework.data.gemfire.expiration;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
@@ -28,7 +29,7 @@ import java.lang.annotation.Target;
|
||||
* to express their general expiration policy.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.springframework.data.gemfire.ExpirationActionType
|
||||
* @see ExpirationActionType
|
||||
* @since 1.7.0
|
||||
*/
|
||||
@Documented
|
||||
@@ -1,20 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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
|
||||
* 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;
|
||||
package org.springframework.data.gemfire.expiration;
|
||||
|
||||
import org.apache.geode.cache.ExpirationAction;
|
||||
import org.springframework.data.gemfire.support.AbstractPropertyEditorConverterSupport;
|
||||
@@ -26,7 +27,7 @@ import org.springframework.data.gemfire.support.AbstractPropertyEditorConverterS
|
||||
* @author John Blum
|
||||
* @see java.beans.PropertyEditorSupport
|
||||
* @see org.springframework.core.convert.converter.Converter
|
||||
* @see org.springframework.data.gemfire.ExpirationActionType
|
||||
* @see ExpirationActionType
|
||||
* @since 1.6.0
|
||||
*/
|
||||
public class ExpirationActionConverter extends AbstractPropertyEditorConverterSupport<ExpirationAction> {
|
||||
@@ -37,7 +38,7 @@ public class ExpirationActionConverter extends AbstractPropertyEditorConverterSu
|
||||
* @param source the String to convert into an GemFire ExpirationAction.
|
||||
* @return an GemFire ExpirationAction value for the given String.
|
||||
* @throws java.lang.IllegalArgumentException if the String is not a valid GemFire ExpirationAction.
|
||||
* @see org.springframework.data.gemfire.ExpirationActionType#valueOfIgnoreCase(String)
|
||||
* @see ExpirationActionType#valueOfIgnoreCase(String)
|
||||
* @see org.apache.geode.cache.ExpirationAction
|
||||
*/
|
||||
@Override
|
||||
@@ -1,20 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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
|
||||
* 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;
|
||||
package org.springframework.data.gemfire.expiration;
|
||||
|
||||
import org.apache.geode.cache.ExpirationAction;
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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
|
||||
* 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;
|
||||
package org.springframework.data.gemfire.expiration;
|
||||
|
||||
import org.apache.geode.cache.ExpirationAction;
|
||||
import org.apache.geode.cache.ExpirationAttributes;
|
||||
@@ -78,7 +79,7 @@ public class ExpirationAttributesFactoryBean implements FactoryBean<ExpirationAt
|
||||
* Gets the action to perform when a Region or an Entry expires.
|
||||
*
|
||||
* @return the type of action to perform on expiration.
|
||||
* @see org.springframework.data.gemfire.ExpirationActionType
|
||||
* @see ExpirationActionType
|
||||
* @see org.apache.geode.cache.ExpirationAttributes#getAction()
|
||||
*/
|
||||
public ExpirationAction getAction() {
|
||||
@@ -110,7 +111,7 @@ public class ExpirationAttributesFactoryBean implements FactoryBean<ExpirationAt
|
||||
* @throws Exception if the construction of the ExpirationAttributes was not successful.
|
||||
* @see #getAction()
|
||||
* @see #getTimeout()
|
||||
* @see org.springframework.data.gemfire.ExpirationActionType#getExpirationAction()
|
||||
* @see ExpirationActionType#getExpirationAction()
|
||||
* @see org.apache.geode.cache.ExpirationAttributes
|
||||
*/
|
||||
@Override
|
||||
@@ -1,20 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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
|
||||
* 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.support;
|
||||
package org.springframework.data.gemfire.expiration;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
@@ -28,8 +29,8 @@ import java.lang.annotation.Target;
|
||||
* to express their idle-timeout (TTI) expiration policy.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.springframework.data.gemfire.ExpirationActionType
|
||||
* @see org.springframework.data.gemfire.support.Expiration
|
||||
* @see ExpirationActionType
|
||||
* @see Expiration
|
||||
* @since 1.7.0
|
||||
*/
|
||||
@Documented
|
||||
@@ -1,20 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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
|
||||
* 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.support;
|
||||
package org.springframework.data.gemfire.expiration;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
@@ -28,8 +29,8 @@ import java.lang.annotation.Target;
|
||||
* to express their time-to-live (TTL) expiration policy.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.springframework.data.gemfire.ExpirationActionType
|
||||
* @see org.springframework.data.gemfire.support.Expiration
|
||||
* @see ExpirationActionType
|
||||
* @see Expiration
|
||||
* @since 1.7.0
|
||||
*/
|
||||
@Documented
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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.
|
||||
@@ -12,8 +12,9 @@
|
||||
* 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;
|
||||
package org.springframework.data.gemfire.function;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -71,5 +72,4 @@ public class FunctionServiceFactoryBean implements FactoryBean<FunctionService>,
|
||||
public boolean isSingleton() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,20 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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
|
||||
* 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.support;
|
||||
package org.springframework.data.gemfire;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
@@ -30,7 +31,7 @@ import org.junit.Test;
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.junit.Test
|
||||
* @see org.springframework.data.gemfire.support.RegionShortcutWrapper
|
||||
* @see RegionShortcutWrapper
|
||||
* @see org.apache.geode.cache.RegionShortcut
|
||||
* @since 1.4.0
|
||||
*/
|
||||
@@ -300,5 +301,4 @@ public class RegionShortcutWrapperTest {
|
||||
assertTrue(RegionShortcutWrapper.REPLICATE_PROXY.isReplicate());
|
||||
assertFalse(RegionShortcutWrapper.UNSPECIFIED.isReplicate());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertSame;
|
||||
|
||||
import org.apache.geode.cache.GemFireCache;
|
||||
import org.apache.geode.cache.Region;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author David Turanski
|
||||
* @author John Blum
|
||||
*/
|
||||
public class SubRegionTest extends RecreatingSpringApplicationContextTest {
|
||||
@Override
|
||||
protected String location() {
|
||||
return "org/springframework/data/gemfire/basic-subregion.xml";
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAll() throws Exception {
|
||||
testBasic();
|
||||
testContext();
|
||||
testChildOnly();
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
private void testBasic() throws Exception {
|
||||
CacheFactoryBean cacheFactoryBean = new CacheFactoryBean();
|
||||
|
||||
cacheFactoryBean.setBeanName("gemfireCache");
|
||||
cacheFactoryBean.setUseBeanFactoryLocator(false);
|
||||
cacheFactoryBean.afterPropertiesSet();
|
||||
|
||||
GemFireCache cache = cacheFactoryBean.getObject();
|
||||
|
||||
assertNotNull(cache);
|
||||
|
||||
RegionFactoryBean regionFactory = new ReplicatedRegionFactoryBean();
|
||||
|
||||
regionFactory.setCache(cache);
|
||||
regionFactory.setName("Outer");
|
||||
regionFactory.afterPropertiesSet();
|
||||
|
||||
Region outer = regionFactory.getObject();
|
||||
|
||||
assertNotNull(outer);
|
||||
assertEquals("Outer", outer.getName());
|
||||
assertEquals("/Outer", outer.getFullPath());
|
||||
assertSame(outer, cache.getRegion("/Outer"));
|
||||
|
||||
RegionFactoryBean subRegionFactory = new RegionFactoryBean() { };
|
||||
|
||||
subRegionFactory.setCache(cache);
|
||||
subRegionFactory.setParent(outer);
|
||||
subRegionFactory.setName("/Outer/Inner");
|
||||
subRegionFactory.setRegionName("Inner");
|
||||
subRegionFactory.afterPropertiesSet();
|
||||
|
||||
Region inner = subRegionFactory.getObject();
|
||||
|
||||
assertNotNull(inner);
|
||||
assertSame(inner, outer.getSubregion("Inner"));
|
||||
assertSame(inner, cache.getRegion("/Outer/Inner"));
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private void testContext() throws Exception {
|
||||
Region parent = applicationContext.getBean("parent", Region.class);
|
||||
Region child = applicationContext.getBean("/parent/child", Region.class);
|
||||
assertNotNull(parent.getSubregion("child"));
|
||||
assertSame(child, parent.getSubregion("child"));
|
||||
assertEquals("/parent/child", child.getFullPath());
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void testChildOnly() throws Exception {
|
||||
Region child = applicationContext.getBean("/parent/child", Region.class);
|
||||
assertEquals("/parent/child", child.getFullPath());
|
||||
}
|
||||
}
|
||||
@@ -1,20 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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
|
||||
* 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.support;
|
||||
package org.springframework.data.gemfire.cache;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
@@ -1,16 +1,20 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2016 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
|
||||
* 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
|
||||
* 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.
|
||||
*
|
||||
* 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.support;
|
||||
package org.springframework.data.gemfire.cache;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
@@ -25,10 +29,10 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
* @author John Blum
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration("/org/springframework/data/gemfire/support/cache-manager-client-cache.xml")
|
||||
@ContextConfiguration("/org/springframework/data/gemfire/cache/cache-manager-client-cache.xml")
|
||||
public class ClientCacheManagerTest {
|
||||
|
||||
@Autowired
|
||||
@Autowired
|
||||
GemfireCacheManager cacheManager;
|
||||
|
||||
@Test
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012 the original author or authors.
|
||||
* Copyright 2016 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.
|
||||
@@ -15,7 +15,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
package org.springframework.data.gemfire.support;
|
||||
package org.springframework.data.gemfire.cache;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@@ -67,8 +67,8 @@ import lombok.RequiredArgsConstructor;
|
||||
* @see org.springframework.cache.annotation.EnableCaching
|
||||
* @see org.springframework.test.context.ContextConfiguration
|
||||
* @see org.springframework.test.context.junit4.SpringJUnit4ClassRunner
|
||||
* @see org.springframework.data.gemfire.support.GemfireCache#evict(Object)
|
||||
* @see org.springframework.data.gemfire.support.GemfireCache#put(Object, Object)
|
||||
* @see GemfireCache#evict(Object)
|
||||
* @see GemfireCache#put(Object, Object)
|
||||
* @see <a href="http://stackoverflow.com/questions/39830488/gemfire-entrynotfoundexception-for-cacheevict">Gemfire EntryNotFoundException on @CacheEvict</a>
|
||||
* @see <a href="https://jira.spring.io/browse/SGF-539">Change GemfireCache.evict(key) to call Region.remove(key)</a>
|
||||
* @since 1.9.0
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-104 the original author or authors.
|
||||
* Copyright 2016 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.
|
||||
@@ -12,9 +12,10 @@
|
||||
* 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.support;
|
||||
package org.springframework.data.gemfire.cache;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012 the original author or authors.
|
||||
* Copyright 2016 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.
|
||||
@@ -15,7 +15,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
package org.springframework.data.gemfire.support;
|
||||
package org.springframework.data.gemfire.cache;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012 the original author or authors.
|
||||
* Copyright 2016 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.
|
||||
@@ -15,7 +15,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
package org.springframework.data.gemfire.support;
|
||||
package org.springframework.data.gemfire.cache;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
@@ -49,7 +49,7 @@ import org.springframework.cache.Cache;
|
||||
* @see org.junit.Test
|
||||
* @see org.mockito.Mock
|
||||
* @see org.mockito.runners.MockitoJUnitRunner
|
||||
* @see org.springframework.data.gemfire.support.GemfireCache
|
||||
* @see GemfireCache
|
||||
* @see org.apache.geode.cache.Region
|
||||
* @since 1.9.0
|
||||
*/
|
||||
@@ -1,20 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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
|
||||
* 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;
|
||||
package org.springframework.data.gemfire.client;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@@ -27,7 +28,7 @@ import org.junit.Test;
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.junit.Test
|
||||
* @see org.springframework.data.gemfire.ClientRegionShortcutConverter
|
||||
* @see ClientRegionShortcutConverter
|
||||
* @see org.apache.geode.cache.client.ClientRegionShortcut
|
||||
* @since 1.3.4
|
||||
*/
|
||||
@@ -1,20 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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
|
||||
* 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.support;
|
||||
package org.springframework.data.gemfire.client;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
@@ -30,7 +31,7 @@ import org.junit.Test;
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.junit.Test
|
||||
* @see org.springframework.data.gemfire.support.ClientRegionShortcutWrapper
|
||||
* @see ClientRegionShortcutWrapper
|
||||
* @see org.apache.geode.cache.client.ClientRegionShortcut
|
||||
* @since 1.4.0
|
||||
*/
|
||||
@@ -52,6 +52,7 @@ import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.FilterType;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.data.gemfire.client.ClientRegionShortcutWrapper;
|
||||
import org.springframework.data.gemfire.config.annotation.test.entities.ClientRegionEntity;
|
||||
import org.springframework.data.gemfire.config.annotation.test.entities.CollocatedPartitionRegionEntity;
|
||||
import org.springframework.data.gemfire.config.annotation.test.entities.GenericRegionEntity;
|
||||
@@ -61,7 +62,6 @@ import org.springframework.data.gemfire.mapping.annotation.ClientRegion;
|
||||
import org.springframework.data.gemfire.mapping.annotation.LocalRegion;
|
||||
import org.springframework.data.gemfire.mapping.annotation.PartitionRegion;
|
||||
import org.springframework.data.gemfire.mapping.annotation.ReplicateRegion;
|
||||
import org.springframework.data.gemfire.support.ClientRegionShortcutWrapper;
|
||||
import org.springframework.data.gemfire.util.CollectionUtils;
|
||||
|
||||
/**
|
||||
|
||||
@@ -40,11 +40,11 @@ import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.gemfire.EvictionActionType;
|
||||
import org.springframework.data.gemfire.EvictionAttributesFactoryBean;
|
||||
import org.springframework.data.gemfire.EvictionPolicyType;
|
||||
import org.springframework.data.gemfire.PartitionedRegionFactoryBean;
|
||||
import org.springframework.data.gemfire.ReplicatedRegionFactoryBean;
|
||||
import org.springframework.data.gemfire.eviction.EvictionActionType;
|
||||
import org.springframework.data.gemfire.eviction.EvictionAttributesFactoryBean;
|
||||
import org.springframework.data.gemfire.eviction.EvictionPolicyType;
|
||||
import org.springframework.data.gemfire.util.ArrayUtils;
|
||||
|
||||
/**
|
||||
@@ -55,7 +55,7 @@ import org.springframework.data.gemfire.util.ArrayUtils;
|
||||
* @see org.mockito.Mockito
|
||||
* @see org.springframework.data.gemfire.config.annotation.EnableEviction
|
||||
* @see org.springframework.data.gemfire.config.annotation.EvictionConfiguration
|
||||
* @see org.springframework.data.gemfire.EvictionAttributesFactoryBean
|
||||
* @see EvictionAttributesFactoryBean
|
||||
* @see org.apache.geode.cache.Region
|
||||
* @see org.apache.geode.cache.EvictionAttributes
|
||||
* @since 1.9.0
|
||||
|
||||
@@ -41,7 +41,7 @@ import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.gemfire.ExpirationActionType;
|
||||
import org.springframework.data.gemfire.expiration.ExpirationActionType;
|
||||
import org.springframework.data.gemfire.util.ArrayUtils;
|
||||
|
||||
/**
|
||||
|
||||
@@ -31,10 +31,6 @@ import org.apache.geode.cache.Scope;
|
||||
import org.apache.geode.cache.wan.GatewaySender;
|
||||
import org.junit.Test;
|
||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
import org.springframework.data.gemfire.EvictionActionConverter;
|
||||
import org.springframework.data.gemfire.EvictionPolicyConverter;
|
||||
import org.springframework.data.gemfire.EvictionPolicyType;
|
||||
import org.springframework.data.gemfire.ExpirationActionConverter;
|
||||
import org.springframework.data.gemfire.IndexMaintenancePolicyConverter;
|
||||
import org.springframework.data.gemfire.IndexMaintenancePolicyType;
|
||||
import org.springframework.data.gemfire.IndexType;
|
||||
@@ -42,6 +38,10 @@ import org.springframework.data.gemfire.IndexTypeConverter;
|
||||
import org.springframework.data.gemfire.InterestPolicyConverter;
|
||||
import org.springframework.data.gemfire.ScopeConverter;
|
||||
import org.springframework.data.gemfire.client.InterestResultPolicyConverter;
|
||||
import org.springframework.data.gemfire.eviction.EvictionActionConverter;
|
||||
import org.springframework.data.gemfire.eviction.EvictionPolicyConverter;
|
||||
import org.springframework.data.gemfire.eviction.EvictionPolicyType;
|
||||
import org.springframework.data.gemfire.expiration.ExpirationActionConverter;
|
||||
import org.springframework.data.gemfire.server.SubscriptionEvictionPolicy;
|
||||
import org.springframework.data.gemfire.server.SubscriptionEvictionPolicyConverter;
|
||||
import org.springframework.data.gemfire.support.ConnectionEndpoint;
|
||||
|
||||
@@ -23,8 +23,8 @@ import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.data.gemfire.transaction.GemfireTransactionManager;
|
||||
import org.springframework.data.gemfire.test.GemfireTestApplicationContextInitializer;
|
||||
import org.springframework.data.gemfire.transaction.GemfireTransactionManager;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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
|
||||
* 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;
|
||||
package org.springframework.data.gemfire.eviction;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
@@ -31,7 +32,7 @@ import org.junit.rules.ExpectedException;
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.junit.Test
|
||||
* @see org.springframework.data.gemfire.EvictionActionConverter
|
||||
* @see EvictionActionConverter
|
||||
* @see org.apache.geode.cache.EvictionAction
|
||||
* @since 1.6.0
|
||||
*/
|
||||
@@ -1,20 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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
|
||||
* 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;
|
||||
package org.springframework.data.gemfire.eviction;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNull;
|
||||
@@ -29,7 +30,7 @@ import org.junit.Test;
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.junit.Test
|
||||
* @see org.springframework.data.gemfire.EvictionActionType
|
||||
* @see EvictionActionType
|
||||
* @see org.apache.geode.cache.EvictionAction
|
||||
* @since 1.6.0
|
||||
*/
|
||||
@@ -1,20 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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
|
||||
* 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;
|
||||
package org.springframework.data.gemfire.eviction;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
@@ -37,7 +38,7 @@ import org.junit.Test;
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.junit.Test
|
||||
* @see org.springframework.data.gemfire.EvictionAttributesFactoryBean
|
||||
* @see EvictionAttributesFactoryBean
|
||||
* @see org.apache.geode.cache.EvictionAttributes
|
||||
* @since 1.3.4
|
||||
*/
|
||||
@@ -1,20 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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
|
||||
* 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;
|
||||
package org.springframework.data.gemfire.eviction;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
@@ -30,8 +31,8 @@ import org.junit.rules.ExpectedException;
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.junit.Test
|
||||
* @see org.springframework.data.gemfire.EvictionPolicyConverter
|
||||
* @see org.springframework.data.gemfire.EvictionPolicyType
|
||||
* @see EvictionPolicyConverter
|
||||
* @see EvictionPolicyType
|
||||
* @since 1.6.0
|
||||
*/
|
||||
public class EvictionPolicyConverterUnitTests {
|
||||
@@ -1,20 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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
|
||||
* 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;
|
||||
package org.springframework.data.gemfire.eviction;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNull;
|
||||
@@ -1,20 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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
|
||||
* 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.support;
|
||||
package org.springframework.data.gemfire.expiration;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.equalTo;
|
||||
import static org.hamcrest.CoreMatchers.instanceOf;
|
||||
@@ -54,7 +55,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
* @see org.junit.Test
|
||||
* @see org.junit.runner.RunWith
|
||||
* @see org.mockito.Mockito
|
||||
* @see org.springframework.data.gemfire.support.AnnotationBasedExpiration
|
||||
* @see AnnotationBasedExpiration
|
||||
* @see org.springframework.data.gemfire.test.GemfireTestApplicationContextInitializer
|
||||
* @see org.springframework.test.context.ContextConfiguration
|
||||
* @see org.springframework.test.context.junit4.SpringJUnit4ClassRunner
|
||||
@@ -1,20 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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
|
||||
* 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.support;
|
||||
package org.springframework.data.gemfire.expiration;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.equalTo;
|
||||
import static org.hamcrest.CoreMatchers.instanceOf;
|
||||
@@ -31,7 +32,7 @@ import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
import static org.springframework.data.gemfire.support.AnnotationBasedExpiration.ExpirationMetaData;
|
||||
import static org.springframework.data.gemfire.expiration.AnnotationBasedExpiration.ExpirationMetaData;
|
||||
|
||||
import org.apache.geode.cache.ExpirationAction;
|
||||
import org.apache.geode.cache.ExpirationAttributes;
|
||||
@@ -43,7 +44,6 @@ import org.mockito.stubbing.Answer;
|
||||
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
||||
import org.springframework.context.expression.BeanFactoryResolver;
|
||||
import org.springframework.core.convert.ConversionService;
|
||||
import org.springframework.data.gemfire.ExpirationActionType;
|
||||
import org.springframework.data.gemfire.TestUtils;
|
||||
import org.springframework.expression.BeanResolver;
|
||||
import org.springframework.expression.PropertyAccessor;
|
||||
@@ -58,7 +58,7 @@ import org.springframework.expression.spel.support.StandardEvaluationContext;
|
||||
* @author John Blum
|
||||
* @see org.junit.Test
|
||||
* @see org.mockito.Mockito
|
||||
* @see org.springframework.data.gemfire.support.AnnotationBasedExpiration
|
||||
* @see AnnotationBasedExpiration
|
||||
* @since 1.7.0
|
||||
*/
|
||||
@SuppressWarnings({ "rawtypes", "unchecked", "unused" })
|
||||
@@ -1,20 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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
|
||||
* 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;
|
||||
package org.springframework.data.gemfire.expiration;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
@@ -31,7 +32,7 @@ import org.junit.rules.ExpectedException;
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.junit.Test
|
||||
* @see org.springframework.data.gemfire.ExpirationActionConverter
|
||||
* @see ExpirationActionConverter
|
||||
* @since 1.6.0
|
||||
*/
|
||||
public class ExpirationActionConverterUnitTests {
|
||||
@@ -1,20 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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
|
||||
* 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;
|
||||
package org.springframework.data.gemfire.expiration;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
@@ -30,7 +31,7 @@ import org.junit.Test;
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.junit.Test
|
||||
* @see org.springframework.data.gemfire.ExpirationActionType
|
||||
* @see ExpirationActionType
|
||||
* @see org.apache.geode.cache.ExpirationAction
|
||||
* @since 1.6.0
|
||||
*/
|
||||
@@ -1,20 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2013 the original author or authors.
|
||||
* Copyright 2016 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
|
||||
* 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;
|
||||
package org.springframework.data.gemfire.expiration;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
@@ -31,7 +32,7 @@ import org.junit.Test;
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.junit.Test
|
||||
* @see org.springframework.data.gemfire.ExpirationAttributesFactoryBean
|
||||
* @see ExpirationAttributesFactoryBean
|
||||
* @since 1.6.0
|
||||
*/
|
||||
public class ExpirationAttributesFactoryBeanTest {
|
||||
@@ -18,7 +18,6 @@
|
||||
package org.springframework.data.gemfire.test.support;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FilenameFilter;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:gfe="http://www.springframework.org/schema/geode"
|
||||
xmlns:util="http://www.springframework.org/schema/util"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/geode http://www.springframework.org/schema/geode/spring-geode.xsd
|
||||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
|
||||
" default-lazy-init="true">
|
||||
|
||||
<util:properties id="gemfireProperties">
|
||||
<prop key="name">BasicSubRegionConfig</prop>
|
||||
<prop key="mcast-port">0</prop>
|
||||
<prop key="log-level">warning</prop>
|
||||
</util:properties>
|
||||
|
||||
<gfe:cache properties-ref="gemfireProperties" use-bean-factory-locator="false"/>
|
||||
|
||||
<gfe:replicated-region id="parent"/>
|
||||
|
||||
<bean name="/parent/child" class="org.springframework.data.gemfire.SubRegionFactoryBean">
|
||||
<property name="parent" ref="parent"/>
|
||||
<property name="regionName" value="child"/>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
<cache:annotation-driven/>
|
||||
|
||||
<bean id="cacheManager" class="org.springframework.data.gemfire.support.GemfireCacheManager" p:cache-ref="gemfireCache"/>
|
||||
<bean id="cacheManager" class="org.springframework.data.gemfire.cache.GemfireCacheManager" p:cache-ref="gemfireCache"/>
|
||||
|
||||
<context:annotation-config/>
|
||||
|
||||
@@ -44,11 +44,11 @@
|
||||
<entry key="nine" value="9"/>
|
||||
</util:map>
|
||||
|
||||
<bean id="namedNumbersRepo" class="org.springframework.data.gemfire.support.CachingWithGemFireIntegrationTest$NamedNumbersInMemoryRepository">
|
||||
<bean id="namedNumbersRepo" class="org.springframework.data.gemfire.cache.CachingWithGemFireIntegrationTest$NamedNumbersInMemoryRepository">
|
||||
<property name="namedNumbers" ref="NamedNumbersMap"/>
|
||||
</bean>
|
||||
|
||||
<bean id="namedNumbersService" class="org.springframework.data.gemfire.support.CachingWithGemFireIntegrationTest$NamedNumbersService">
|
||||
<bean id="namedNumbersService" class="org.springframework.data.gemfire.cache.CachingWithGemFireIntegrationTest$NamedNumbersService">
|
||||
<property name="namedNumbersRepo" ref="namedNumbersRepo"/>
|
||||
</bean>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<gfe:client-region id="Example"/>
|
||||
|
||||
<bean class="org.springframework.data.gemfire.support.GemfireCacheManager">
|
||||
<bean class="org.springframework.data.gemfire.cache.GemfireCacheManager">
|
||||
<property name="cache" ref="gemfireCache"/>
|
||||
</bean>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<prop key="gemfire.region.entry.expiration.timeout">60</prop>
|
||||
<prop key="gemfire.region.entry.expiration.action.string">LOCAL_INVALIDATE</prop>
|
||||
<prop key="gemfire.region.entry.expiration.action.gemfire.type">#{T(org.apache.geode.cache.ExpirationAction).INVALIDATE}</prop>
|
||||
<prop key="gemfire.region.entry.expiration.action.spring.type">#{T(org.springframework.data.gemfire.ExpirationActionType).DESTROY}</prop>
|
||||
<prop key="gemfire.region.entry.expiration.action.spring.type">#{T(org.springframework.data.gemfire.expiration.ExpirationActionType).DESTROY}</prop>
|
||||
</util:properties>
|
||||
|
||||
<context:property-placeholder properties-ref="expirationProperties"/>
|
||||
@@ -33,12 +33,12 @@
|
||||
<constructor-arg value="#{T(org.apache.geode.cache.ExpirationAction).DESTROY}"/>
|
||||
</bean>
|
||||
|
||||
<bean id="genericExpiration" class="org.springframework.data.gemfire.support.AnnotationBasedExpiration"/>
|
||||
<bean id="genericExpiration" class="org.springframework.data.gemfire.expiration.AnnotationBasedExpiration"/>
|
||||
|
||||
<bean id="ttiExpiration" class="org.springframework.data.gemfire.support.AnnotationBasedExpiration"
|
||||
<bean id="ttiExpiration" class="org.springframework.data.gemfire.expiration.AnnotationBasedExpiration"
|
||||
factory-method="forIdleTimeout"/>
|
||||
|
||||
<bean id="ttlExpiration" class="org.springframework.data.gemfire.support.AnnotationBasedExpiration"
|
||||
<bean id="ttlExpiration" class="org.springframework.data.gemfire.expiration.AnnotationBasedExpiration"
|
||||
factory-method="forTimeToLive">
|
||||
<constructor-arg ref="defaultExpirationAttributes"/>
|
||||
</bean>
|
||||
Reference in New Issue
Block a user