default void createDiskStores(Iterable<SchemaObjectDefinition> diskStoreDefinitions) { nullSafeIterable(diskStoreDefinitions).forEach(this::createDiskStore); } }
public GemFireComponentClassTypeScanner withIncludes(Iterable<TypeFilter> includes) { stream(nullSafeIterable(includes).spliterator(), false).forEach(this.includes::add); return this; } }
public GemFireComponentClassTypeScanner withExcludes(Iterable<TypeFilter> excludes) { stream(nullSafeIterable(excludes).spliterator(), false).forEach(this.excludes::add); return this; }
public GemFireComponentClassTypeScanner withIncludes(Iterable<TypeFilter> includes) { stream(nullSafeIterable(includes).spliterator(), false).forEach(this.includes::add); return this; } }
public static FileFilter and(Iterable<FileFilter> fileFilters) { FileFilter current = null; for (FileFilter fileFilter : nullSafeIterable(fileFilters)) { current = compose(current, LogicalOperator.AND, fileFilter); } return current; }
/** * Null-safe operation to apply the given {@link Iterable} of {@link DiskStoreConfigurer DiskStoreConfigurers} * to this {@link DiskStoreFactoryBean}. * * @param diskStoreName {@link String} containing the name of the {@link DiskStore}. * @param diskStoreConfigurers {@link Iterable} of {@link DiskStoreConfigurer DiskStoreConfigurers} applied * to this {@link DiskStoreFactoryBean}. * @see org.springframework.data.gemfire.config.annotation.DiskStoreConfigurer */ protected void applyDiskStoreConfigurers(String diskStoreName, Iterable<DiskStoreConfigurer> diskStoreConfigurers) { stream(nullSafeIterable(diskStoreConfigurers).spliterator(), false) .forEach(diskStoreConfigurer -> diskStoreConfigurer.configure(diskStoreName, this)); }
@Nullable public static SchemaObjectDefiner compose(Iterable<SchemaObjectDefiner> schemaObjectDefiners) { Set<SchemaObjectDefiner> schemaObjectDefinerSet = stream(nullSafeIterable(schemaObjectDefiners).spliterator(), false) .filter(Objects::nonNull).collect(Collectors.toSet()); return (schemaObjectDefinerSet.isEmpty() ? null : (schemaObjectDefinerSet.size() == 1 ? schemaObjectDefinerSet.iterator().next() : new ComposableSchemaObjectDefiner(schemaObjectDefinerSet))); }
@Nullable public static SchemaObjectCollector<?> compose(Iterable<SchemaObjectCollector<?>> schemaObjectCollectors) { List<SchemaObjectCollector<?>> schemaObjectCollectorList = stream(nullSafeIterable(schemaObjectCollectors).spliterator(), false) .filter(Objects::nonNull).collect(Collectors.toList()); return (schemaObjectCollectorList.isEmpty() ? null : (schemaObjectCollectorList.size() == 1 ? schemaObjectCollectorList.iterator().next() : new ComposableSchemaObjectCollector(schemaObjectCollectorList))); }
@Nullable public static SchemaObjectCollector<?> compose(Iterable<SchemaObjectCollector<?>> schemaObjectCollectors) { List<SchemaObjectCollector<?>> schemaObjectCollectorList = stream(nullSafeIterable(schemaObjectCollectors).spliterator(), false) .filter(Objects::nonNull).collect(Collectors.toList()); return (schemaObjectCollectorList.isEmpty() ? null : (schemaObjectCollectorList.size() == 1 ? schemaObjectCollectorList.iterator().next() : new ComposableSchemaObjectCollector(schemaObjectCollectorList))); }
public static FileFilter or(Iterable<FileFilter> fileFilters) { FileFilter current = null; for (FileFilter fileFilter : nullSafeIterable(fileFilters)) { current = compose(current, LogicalOperator.OR, fileFilter); } return current; }
public static PdxSerializer compose(Iterable<PdxSerializer> pdxSerializers) { List<PdxSerializer> pdxSerializerList = stream(nullSafeIterable(pdxSerializers).spliterator(), false) .filter(Objects::nonNull).collect(Collectors.toList()); return (pdxSerializerList.isEmpty() ? null : (pdxSerializerList.size() == 1 ? pdxSerializerList.get(0) : new ComposablePdxSerializer(pdxSerializerList))); }
/** * Applies the given {@link Iterable} of {@link IndexConfigurer IndexConfigurers} * to this {@link LuceneIndexFactoryBean}. * * @param indexName {@link String} containing the name of the {@link LuceneIndex}. * @param indexConfigurers {@link Iterable} of {@link IndexConfigurer IndexConfigurers} applied * to this {@link LuceneIndexFactoryBean}. * @see org.springframework.data.gemfire.config.annotation.IndexConfigurer */ protected void applyIndexConfigurers(String indexName, Iterable<IndexConfigurer> indexConfigurers) { stream(nullSafeIterable(indexConfigurers).spliterator(), false) .forEach(indexConfigurer -> indexConfigurer.configure(indexName, this)); }
@Nullable public static SchemaObjectDefiner compose(Iterable<SchemaObjectDefiner> schemaObjectDefiners) { Set<SchemaObjectDefiner> schemaObjectDefinerSet = stream(nullSafeIterable(schemaObjectDefiners).spliterator(), false) .filter(Objects::nonNull).collect(Collectors.toSet()); return (schemaObjectDefinerSet.isEmpty() ? null : (schemaObjectDefinerSet.size() == 1 ? schemaObjectDefinerSet.iterator().next() : new ComposableSchemaObjectDefiner(schemaObjectDefinerSet))); }
/** * Null-safe operation to apply the given {@link Iterable} of {@link IndexConfigurer IndexConfigurers} * to this {@link IndexFactoryBean}. * * @param indexName {@link String} containing the name of the {@link Index}. * @param indexConfigurers {@link Iterable} of {@link IndexConfigurer IndexConfigurers} applied * to this {@link IndexFactoryBean}. * @see org.springframework.data.gemfire.config.annotation.RegionConfigurer */ protected void applyIndexConfigurers(String indexName, Iterable<IndexConfigurer> indexConfigurers) { stream(nullSafeIterable(indexConfigurers).spliterator(), false) .forEach(indexConfigurer -> indexConfigurer.configure(indexName, this)); }
/** * Applies the {@link Iterable} of {@link ContinuousQueryListenerContainerConfigurer} objects to customize * the configuration of this {@link ContinuousQueryListenerContainer}. * * @param configurers {@link Iterable} of {@link ContinuousQueryListenerContainerConfigurer} used to customize * the configuration of this {@link ContinuousQueryListenerContainer}. * @see org.springframework.data.gemfire.config.annotation.ContinuousQueryListenerContainerConfigurer */ protected void applyContinuousQueryListenerContainerConfigurers( Iterable<ContinuousQueryListenerContainerConfigurer> configurers) { stream(nullSafeIterable(configurers).spliterator(), false) .forEach(configurer -> configurer.configure(getBeanName(), this)); }
/** * Null-safe operation to apply the given {@link Iterable} of {@link PoolConfigurer PoolConfigurers} * to this {@link PoolFactoryBean}. * * @param poolConfigurers {@link Iterable} of {@link PoolConfigurer PoolConfigurers} * applied to this {@link PoolFactoryBean}. * @see org.springframework.data.gemfire.config.annotation.PoolConfigurer */ protected void applyPoolConfigurers(Iterable<PoolConfigurer> poolConfigurers) { stream(nullSafeIterable(poolConfigurers).spliterator(), false) .forEach(poolConfigurer -> poolConfigurer.configure(getName(), this)); }
/** * Null-safe operation to apply the given {@link Iterable} of {@link CacheServerConfigurer CacheServerConfigurers} * to this {@link CacheServerFactoryBean}. * * @param cacheServerConfigurers {@link Iterable} of {@link CacheServerConfigurer CacheServerConfigurers} applied to * this {@link CacheServerFactoryBean}. * @see org.springframework.data.gemfire.config.annotation.CacheServerConfigurer */ protected void applyCacheServerConfigurers(Iterable<CacheServerConfigurer> cacheServerConfigurers) { stream(nullSafeIterable(cacheServerConfigurers).spliterator(), false) .forEach(cacheServerConfigurer -> cacheServerConfigurer.configure(getBeanName(), this)); }
/** * Null-safe operation to apply the given {@link Iterable} of {@link PoolConfigurer PoolConfigurers} * to this {@link PoolFactoryBean}. * * @param poolConfigurers {@link Iterable} of {@link PoolConfigurer PoolConfigurers} * applied to this {@link PoolFactoryBean}. * @see org.springframework.data.gemfire.config.annotation.PoolConfigurer */ protected void applyPoolConfigurers(Iterable<PoolConfigurer> poolConfigurers) { stream(nullSafeIterable(poolConfigurers).spliterator(), false) .forEach(poolConfigurer -> poolConfigurer.configure(getName(), this)); }
/** * Null-safe operation to apply the given {@link Iterable} of {@link ClientCacheConfigurer ClientCacheConfigurers} * to this {@link ClientCacheFactoryBean}. * * @param clientCacheConfigurers {@link Iterable} of {@link ClientCacheConfigurer ClientCacheConfigurers} * applied to this {@link ClientCacheFactoryBean}. * @see org.springframework.data.gemfire.config.annotation.ClientCacheConfigurer * @see java.lang.Iterable */ protected void applyClientCacheConfigurers(Iterable<ClientCacheConfigurer> clientCacheConfigurers) { stream(nullSafeIterable(clientCacheConfigurers).spliterator(), false) .forEach(clientCacheConfigurer -> clientCacheConfigurer.configure(getBeanName(), this)); }
/** * Null-safe operation to apply the given {@link Iterable} of {@link CacheServerConfigurer CacheServerConfigurers} * to this {@link CacheServerFactoryBean}. * * @param cacheServerConfigurers {@link Iterable} of {@link CacheServerConfigurer CacheServerConfigurers} applied to * this {@link CacheServerFactoryBean}. * @see org.springframework.data.gemfire.config.annotation.CacheServerConfigurer */ protected void applyCacheServerConfigurers(Iterable<CacheServerConfigurer> cacheServerConfigurers) { stream(nullSafeIterable(cacheServerConfigurers).spliterator(), false) .forEach(cacheServerConfigurer -> cacheServerConfigurer.configure(getBeanName(), this)); }