/** * Returns a {@link List} of application domain object fields to be indexed. * * @return a {@link List} of application domain object fields to be indexed. * @see #getFieldAnalyzers() * @see java.util.List */ protected List<String> getFields() { return nullSafeList(this.fields); }
/** * Returns a {@link List} of application domain object fields to be indexed. * * @return a {@link List} of application domain object fields to be indexed. * @see #getFieldAnalyzers() * @see java.util.List */ protected List<String> getFields() { return nullSafeList(this.fields); }
/** * Sets names of regions to be included for JSON conversion. By default, all regions will be included * * @param regionNames a List of region names to include */ public void setIncludedRegionNames(List<String> regionNames) { this.includedRegions = nullSafeList(regionNames); }
/** * Sets names of regions to be included for JSON conversion. By default, all regions will be included * * @param regionNames a List of region names to include */ public void setIncludedRegionNames(List<String> regionNames) { this.includedRegions = nullSafeList(regionNames); }
protected List<CacheFactoryBean.JndiDataSource> getJndiDataSources() { return nullSafeList(this.jndiDataSources); }
protected List<TransactionListener> getTransactionListeners() { return nullSafeList(this.transactionListeners); }
protected List<TransactionListener> getTransactionListeners() { return nullSafeList(this.transactionListeners); }
protected List<CacheFactoryBean.JndiDataSource> getJndiDataSources() { return nullSafeList(this.jndiDataSources); }
public void setFixedPartitionAttributes(List<FixedPartitionAttributes> fixedPartitionAttributes) { nullSafeList(fixedPartitionAttributes).forEach(this.partitionAttributesFactory::addFixedPartitionAttributes); }
public void setFixedPartitionAttributes(List<FixedPartitionAttributes> fixedPartitionAttributes) { nullSafeList(fixedPartitionAttributes).forEach(this.partitionAttributesFactory::addFixedPartitionAttributes); }
private String toCommaDelimitedHostAndPortsString(List<InetSocketAddress> socketAddresses) { return StringUtils.collectionToCommaDelimitedString(nullSafeList(socketAddresses).stream() .filter(Objects::nonNull) .map(socketAddress -> String.format("%1$s:%2$d", socketAddress.getHostName(), socketAddress.getPort())) .collect(Collectors.toList())); } }
/** * @inheritDoc */ @Override public void afterPropertiesSet() throws Exception { nullSafeList(partitionListeners).forEach(partitionAttributesFactory::addPartitionListener); this.partitionAttributes = partitionAttributesFactory.create(); }
/** * Sets regions to be included for JSON conversion. By default, all regions will be included * * @param regions a List of region names to include */ public void setIncludedRegions(List<Region<?, ?>> regions) { nullSafeList(regions).forEach(region -> this.includedRegions.add(toRegionName(region))); }
/** * @inheritDoc */ @Override public void afterPropertiesSet() throws Exception { nullSafeList(partitionListeners).forEach(partitionAttributesFactory::addPartitionListener); this.partitionAttributes = partitionAttributesFactory.create(); }
/** * Sets regions to be included for JSON conversion. By default, all regions will be included * * @param regions a List of region names to include */ public void setIncludedRegions(List<Region<?, ?>> regions) { nullSafeList(regions).forEach(region -> this.includedRegions.add(toRegionName(region))); }
private ManagedList<BeanDefinition> parseSnapshots(Element element, ParserContext parserContext, String childTagName) { ManagedList<BeanDefinition> snapshotBeans = new ManagedList<>(); nullSafeList(DomUtils.getChildElementsByTagName(element, childTagName)).forEach(childElement -> snapshotBeans.add(parseSnapshotMetadata(childElement, parserContext))); return snapshotBeans; }
private ManagedList<BeanDefinition> parseSnapshots(Element element, ParserContext parserContext, String childTagName) { ManagedList<BeanDefinition> snapshotBeans = new ManagedList<>(); nullSafeList(DomUtils.getChildElementsByTagName(element, childTagName)).forEach(childElement -> snapshotBeans.add(parseSnapshotMetadata(childElement, parserContext))); return snapshotBeans; }
@Override protected void doInit() { Assert.state(this.asyncEventListener != null, "AsyncEventListener must not be null"); AsyncEventQueueFactory asyncEventQueueFactory = this.factory != null ? (AsyncEventQueueFactory) this.factory : this.cache.createAsyncEventQueueFactory(); Optional.ofNullable(this.batchConflationEnabled).ifPresent(asyncEventQueueFactory::setBatchConflationEnabled); Optional.ofNullable(this.batchSize).ifPresent(asyncEventQueueFactory::setBatchSize); Optional.ofNullable(this.batchTimeInterval).ifPresent(asyncEventQueueFactory::setBatchTimeInterval); Optional.ofNullable(this.diskStoreReference).ifPresent(asyncEventQueueFactory::setDiskStoreName); Optional.ofNullable(this.diskSynchronous).ifPresent(asyncEventQueueFactory::setDiskSynchronous); Optional.ofNullable(this.dispatcherThreads).ifPresent(asyncEventQueueFactory::setDispatcherThreads); Optional.ofNullable(this.forwardExpirationDestroy).ifPresent(asyncEventQueueFactory::setForwardExpirationDestroy); Optional.ofNullable(this.gatewayEventSubstitutionFilter).ifPresent(asyncEventQueueFactory::setGatewayEventSubstitutionListener); Optional.ofNullable(this.maximumQueueMemory).ifPresent(asyncEventQueueFactory::setMaximumQueueMemory); Optional.ofNullable(this.persistent).ifPresent(asyncEventQueueFactory::setPersistent); asyncEventQueueFactory.setParallel(isParallelEventQueue()); nullSafeList(this.gatewayEventFilters).forEach(asyncEventQueueFactory::addGatewayEventFilter); if (this.orderPolicy != null) { Assert.state(isSerialEventQueue(), "OrderPolicy cannot be used with a Parallel AsyncEventQueue"); asyncEventQueueFactory.setOrderPolicy(this.orderPolicy); } setAsyncEventQueue(asyncEventQueueFactory.create(getName(), this.asyncEventListener)); }
@Override protected void doInit() { Assert.state(this.asyncEventListener != null, "AsyncEventListener must not be null"); AsyncEventQueueFactory asyncEventQueueFactory = this.factory != null ? (AsyncEventQueueFactory) this.factory : this.cache.createAsyncEventQueueFactory(); Optional.ofNullable(this.batchConflationEnabled).ifPresent(asyncEventQueueFactory::setBatchConflationEnabled); Optional.ofNullable(this.batchSize).ifPresent(asyncEventQueueFactory::setBatchSize); Optional.ofNullable(this.batchTimeInterval).ifPresent(asyncEventQueueFactory::setBatchTimeInterval); Optional.ofNullable(this.diskStoreReference).ifPresent(asyncEventQueueFactory::setDiskStoreName); Optional.ofNullable(this.diskSynchronous).ifPresent(asyncEventQueueFactory::setDiskSynchronous); Optional.ofNullable(this.dispatcherThreads).ifPresent(asyncEventQueueFactory::setDispatcherThreads); Optional.ofNullable(this.forwardExpirationDestroy).ifPresent(asyncEventQueueFactory::setForwardExpirationDestroy); Optional.ofNullable(this.gatewayEventSubstitutionFilter).ifPresent(asyncEventQueueFactory::setGatewayEventSubstitutionListener); Optional.ofNullable(this.maximumQueueMemory).ifPresent(asyncEventQueueFactory::setMaximumQueueMemory); Optional.ofNullable(this.persistent).ifPresent(asyncEventQueueFactory::setPersistent); asyncEventQueueFactory.setParallel(isParallelEventQueue()); nullSafeList(this.gatewayEventFilters).forEach(asyncEventQueueFactory::addGatewayEventFilter); if (this.orderPolicy != null) { Assert.state(isSerialEventQueue(), "OrderPolicy cannot be used with a Parallel AsyncEventQueue"); asyncEventQueueFactory.setOrderPolicy(this.orderPolicy); } setAsyncEventQueue(asyncEventQueueFactory.create(getName(), this.asyncEventListener)); }
/** * @inheritDoc */ @Override protected void doInit() throws Exception { GatewayReceiverFactory gatewayReceiverFactory = cache.createGatewayReceiverFactory(); if (StringUtils.hasText(bindAddress)) { gatewayReceiverFactory.setBindAddress(bindAddress); } if (StringUtils.hasText(hostnameForSenders)) { gatewayReceiverFactory.setHostnameForSenders(hostnameForSenders); } int localStartPort = defaultPort(startPort, GatewayReceiver.DEFAULT_START_PORT); int localEndPort = defaultPort(endPort, GatewayReceiver.DEFAULT_END_PORT); Assert.isTrue(localStartPort <= localEndPort, String.format("'startPort' must be less than or equal to %d.", localEndPort)); gatewayReceiverFactory.setStartPort(localStartPort); gatewayReceiverFactory.setEndPort(localEndPort); gatewayReceiverFactory.setManualStart(manualStart); if (maximumTimeBetweenPings != null) { gatewayReceiverFactory.setMaximumTimeBetweenPings(maximumTimeBetweenPings); } if (socketBufferSize != null) { gatewayReceiverFactory.setSocketBufferSize(socketBufferSize); } for (GatewayTransportFilter transportFilter : CollectionUtils.nullSafeList(transportFilters)) { gatewayReceiverFactory.addGatewayTransportFilter(transportFilter); } gatewayReceiver = gatewayReceiverFactory.create(); }