Tabnine Logo
CollectionUtils.asSet
Code IndexAdd Tabnine to your IDE (free)

How to use
asSet
method
in
org.springframework.data.gemfire.util.CollectionUtils

Best Java code snippets using org.springframework.data.gemfire.util.CollectionUtils.asSet (Showing top 18 results out of 315)

origin: org.springframework.data/spring-data-gemfire

@Override
public Set<SchemaObjectType> getSchemaObjectTypes() {
  return asSet(SchemaObjectType.REGION);
}
origin: org.springframework.data/spring-data-geode

@Override
public Set<SchemaObjectType> getSchemaObjectTypes() {
  return asSet(SchemaObjectType.INDEX);
}
origin: org.springframework.data/spring-data-geode

@Override
public Set<SchemaObjectType> getSchemaObjectTypes() {
  return asSet(SchemaObjectType.REGION);
}
origin: org.springframework.data/spring-data-gemfire

@Override
public Set<SchemaObjectType> getSchemaObjectTypes() {
  return asSet(SchemaObjectType.INDEX);
}
origin: org.springframework.data/spring-data-gemfire

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;
}
origin: org.springframework.data/spring-data-geode

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;
}
origin: org.springframework.data/spring-data-gemfire

/**
 * 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)));
}
origin: org.springframework.data/spring-data-geode

/**
 * 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)));
}
origin: org.springframework.data/spring-data-geode

public void setRegionNames(String[] regionNames) {
  setRegionNames(asSet(nullSafeArray(regionNames, String.class)));
}
origin: org.springframework.data/spring-data-gemfire

public GemFireComponentClassTypeScanner withIncludes(TypeFilter... includes) {
  return withIncludes(asSet(nullSafeArray(includes, TypeFilter.class)));
}
origin: org.springframework.data/spring-data-gemfire

public void setRegionNames(String[] regionNames) {
  setRegionNames(asSet(nullSafeArray(regionNames, String.class)));
}
origin: org.springframework.data/spring-data-geode

public GemFireComponentClassTypeScanner withIncludes(TypeFilter... includes) {
  return withIncludes(asSet(nullSafeArray(includes, TypeFilter.class)));
}
origin: org.springframework.data/spring-data-gemfire

public GemFireComponentClassTypeScanner withExcludes(TypeFilter... excludes) {
  return withExcludes(asSet(nullSafeArray(excludes, TypeFilter.class)));
}
origin: org.springframework.data/spring-data-geode

public GemFireComponentClassTypeScanner withExcludes(TypeFilter... excludes) {
  return withExcludes(asSet(nullSafeArray(excludes, TypeFilter.class)));
}
origin: org.springframework.data/spring-data-geode

/**
 * 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)));
}
origin: org.springframework.data/spring-data-gemfire

/**
 * 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)));
}
origin: spring-projects/spring-gemfire-examples

@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;
}
origin: org.springframework.data/spring-data-geode-test

.thenAnswer(invocation -> asSet(asyncEventQueueIds.toArray(new String[asyncEventQueueIds.size()])));
.thenAnswer(invocation -> asSet(gatewaySenderIds.toArray(new String[gatewaySenderIds.size()])));
org.springframework.data.gemfire.utilCollectionUtilsasSet

Javadoc

Returns an unmodifiable Set containing the elements from the given object array.

Popular methods of CollectionUtils

  • nullSafeIterable
    Returns the given Iterable if not null or empty, otherwise returns the defaultIterable.
  • nullSafeMap
    Null-safe operation returning the given Map if not nullor an empty Map if null.
  • nullSafeSet
    Null-safe operation returning the given Set if not nullor an empty Set if null.
  • iterable
    Adapts the given Iterator as an Iterable object for use within a for each loop.
  • nullSafeList
    Null-safe operation returning the given List if not nullor an empty List if null.
  • addAll
    Adds all elements from the given Iterable to the Collection.
  • containsAny
    Null-safe method to determines whether the given Collection contains any elements from the given arr
  • emptyIterable
    Returns an empty Iterable object.
  • isEmpty
  • newSortedMap
  • nullSafeCollection
    Null-safe operation returning the given Collection if not nullor an empty Collection (implemented wi
  • nullSafeEnumeration
    Null-safe operation returning the given Enumeration if not nullor an Collections#emptyEnumeration()
  • nullSafeCollection,
  • nullSafeEnumeration,
  • nullSafeIsEmpty,
  • nullSafeIterator,
  • nullSafeSize,
  • toIterator,
  • toString

Popular in Java

  • Making http post requests using okhttp
  • compareTo (BigDecimal)
  • getApplicationContext (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now