@Override public Set<SchemaObjectType> getSchemaObjectTypes() { return asSet(SchemaObjectType.REGION); }
@Override public Set<SchemaObjectType> getSchemaObjectTypes() { return asSet(SchemaObjectType.INDEX); }
@Override public Set<SchemaObjectType> getSchemaObjectTypes() { return asSet(SchemaObjectType.REGION); }
@Override public Set<SchemaObjectType> getSchemaObjectTypes() { return asSet(SchemaObjectType.INDEX); }
private Set<EnableSsl.Component> resolveComponents(AnnotationAttributes annotationAttributes) { Set<EnableSsl.Component> components = Arrays.stream(Optional.of(resolveProperty(sslProperty("components"), "")) .filter(StringUtils::hasText) .map(StringUtils::commaDelimitedListToStringArray) .orElseGet(() -> new String[0])) .map(EnableSsl.Component::valueOfName) .collect(Collectors.toSet()); components = components.isEmpty() ? CollectionUtils.asSet((EnableSsl.Component[]) annotationAttributes.get("components")) : components; components = components.isEmpty() ? Collections.singleton(EnableSsl.Component.ALL) : components; return components; }
private Set<EnableSsl.Component> resolveComponents(AnnotationAttributes annotationAttributes) { Set<EnableSsl.Component> components = Arrays.stream(Optional.of(resolveProperty(sslProperty("components"), "")) .filter(StringUtils::hasText) .map(StringUtils::commaDelimitedListToStringArray) .orElseGet(() -> new String[0])) .map(EnableSsl.Component::valueOfName) .collect(Collectors.toSet()); components = components.isEmpty() ? CollectionUtils.asSet((EnableSsl.Component[]) annotationAttributes.get("components")) : components; components = components.isEmpty() ? Collections.singleton(EnableSsl.Component.ALL) : components; return components; }
/** * Factory method to construct an instance of the {@link GemFireComponentClassTypeScanner} initialized with * the given array of base packages to scan. * * @param basePackages array of base packages to scan for Pivotal GemFire components. * @throws IllegalArgumentException if the array of base packages is {@literal null} or empty. * @return an initialized instance of {@link GemFireComponentClassTypeScanner}. * @see #GemFireComponentClassTypeScanner(Set) */ public static GemFireComponentClassTypeScanner from(String... basePackages) { return new GemFireComponentClassTypeScanner(asSet(nullSafeArray(basePackages, String.class))); }
/** * Factory method to construct an instance of the {@link GemFireComponentClassTypeScanner} initialized with * the given array of base packages to scan. * * @param basePackages array of base packages to scan for GemFire components. * @throws IllegalArgumentException if the array of base packages is {@literal null} or empty. * @return an initialized instance of {@link GemFireComponentClassTypeScanner}. * @see #GemFireComponentClassTypeScanner(Set) */ public static GemFireComponentClassTypeScanner from(String... basePackages) { return new GemFireComponentClassTypeScanner(asSet(nullSafeArray(basePackages, String.class))); }
public void setRegionNames(String[] regionNames) { setRegionNames(asSet(nullSafeArray(regionNames, String.class))); }
public GemFireComponentClassTypeScanner withIncludes(TypeFilter... includes) { return withIncludes(asSet(nullSafeArray(includes, TypeFilter.class))); }
public void setRegionNames(String[] regionNames) { setRegionNames(asSet(nullSafeArray(regionNames, String.class))); }
public GemFireComponentClassTypeScanner withIncludes(TypeFilter... includes) { return withIncludes(asSet(nullSafeArray(includes, TypeFilter.class))); }
public GemFireComponentClassTypeScanner withExcludes(TypeFilter... excludes) { return withExcludes(asSet(nullSafeArray(excludes, TypeFilter.class))); }
public GemFireComponentClassTypeScanner withExcludes(TypeFilter... excludes) { return withExcludes(asSet(nullSafeArray(excludes, TypeFilter.class))); }
/** * Factory method used to construct an instance of {@link ExpirationPolicyMetaData} initialized with * the given expiration policy meta-data. * * @param timeout int value indicating the expiration timeout in seconds. * @param action expiration action taken when the {@link Region} entry expires. * @param regionNames names of {@link Region Regions} configured with the expiration policy meta-data. * @param types type of expiration algorithm/behavior (TTI/TTL) configured for the {@link Region}. * @return an instance of {@link ExpirationPolicyMetaData} initialized with the given expiration policy * meta-data. * @throws IllegalArgumentException if the {@link ExpirationType} array is empty. * @see org.springframework.data.gemfire.config.annotation.EnableExpiration.ExpirationType * @see ExpirationActionType * @see #ExpirationPolicyMetaData(ExpirationAttributes, Set, Set) * @see #newExpirationAttributes(int, ExpirationActionType) */ protected static ExpirationPolicyMetaData newExpirationPolicyMetaData(int timeout, ExpirationActionType action, String[] regionNames, ExpirationType[] types) { return new ExpirationPolicyMetaData(newExpirationAttributes(timeout, action), CollectionUtils.asSet(nullSafeArray(regionNames, String.class)), CollectionUtils.asSet(nullSafeArray(types, ExpirationType.class))); }
/** * Factory method used to construct an instance of {@link ExpirationPolicyMetaData} initialized with * the given expiration policy meta-data. * * @param timeout int value indicating the expiration timeout in seconds. * @param action expiration action taken when the {@link Region} entry expires. * @param regionNames names of {@link Region Regions} configured with the expiration policy meta-data. * @param types type of expiration algorithm/behavior (TTI/TTL) configured for the {@link Region}. * @return an instance of {@link ExpirationPolicyMetaData} initialized with the given expiration policy * 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 #ExpirationPolicyMetaData(ExpirationAttributes, Set, Set) * @see #newExpirationAttributes(int, ExpirationActionType) */ protected static ExpirationPolicyMetaData newExpirationPolicyMetaData(int timeout, ExpirationActionType action, String[] regionNames, ExpirationType[] types) { return new ExpirationPolicyMetaData(newExpirationAttributes(timeout, action), CollectionUtils.asSet(nullSafeArray(regionNames, String.class)), CollectionUtils.asSet(nullSafeArray(types, ExpirationType.class))); }
@Bean ContinuousQueryListenerContainer continuousQueryListenerContainer(GemFireCache gemfireCache) { Region<Long, Customer> customers = gemfireCache.getRegion("/Customers"); Region<Long, Product> products = gemfireCache.getRegion("/Products"); ContinuousQueryListenerContainer container = new ContinuousQueryListenerContainer(); container.setCache(gemfireCache); container.setQueryListeners(asSet(cheapOrdersQuery(customers, products, 1000), expensiveOrdersQuery(customers, products, 2000))); return container; }