Class PersistenceUtil

java.lang.Object
org.infinispan.persistence.PersistenceUtil

public class PersistenceUtil extends Object
Since:
6.0
Author:
Mircea Markus
  • Constructor Details

    • PersistenceUtil

      public PersistenceUtil()
  • Method Details

    • toKeySet

      public static <K,V> Set<K> toKeySet(NonBlockingStore<K,V> nonBlockingStore, IntSet segments, Predicate<? super K> filter)
    • convert

      public static <K,V> InternalCacheEntry<K,V> convert(MarshallableEntry<K,V> loaded, InternalEntryFactory factory)
    • parallelizePublisher

      public static <R> org.reactivestreams.Publisher<R> parallelizePublisher(IntSet segments, Executor executor, IntFunction<org.reactivestreams.Publisher<R>> publisherFunction)
      Will create a publisher that parallelizes each publisher returned from the publisherFunction by executing them on the executor as needed.

      Note that returned publisher will be publishing entries from the invocation of the executor. Thus any subscription will not block the thread it was invoked on, unless explicitly configured to do so.

      Type Parameters:
      R - the returned value
      Parameters:
      segments - segments to parallelize across
      executor - the executor execute parallelized operations on
      publisherFunction - function that creates a different publisher for each segment
      Returns:
      a publisher that
    • sanitizedCacheName

      public static String sanitizedCacheName(String cacheName)
      Replace unwanted characters from cache names so they can be used as filenames
    • getQualifiedLocation

      public static Path getQualifiedLocation(GlobalConfiguration globalConfiguration, String location, String cacheName, String qualifier)
    • getLocation

      public static Path getLocation(GlobalConfiguration globalConfiguration, String location)
    • validateGlobalStateStoreLocation

      public static void validateGlobalStateStoreLocation(GlobalConfiguration globalConfiguration, String storeType, Attribute<?>... attributes)