Package org.infinispan.persistence
Class PersistenceUtil
- java.lang.Object
-
- org.infinispan.persistence.PersistenceUtil
-
public class PersistenceUtil extends Object
- Since:
- 6.0
- Author:
- Mircea Markus
-
-
Constructor Summary
Constructors Constructor Description PersistenceUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <K,V>
InternalCacheEntry<K,V>convert(MarshalledEntry<K,V> loaded, org.infinispan.container.impl.InternalEntryFactory factory)
static <K,V>
intcount(AdvancedCacheLoader<K,V> acl, Predicate<? super K> filter)
static <K,V>
intcount(AdvancedCacheLoader<K,V> acl, KeyFilter<? super K> filter)
Deprecated.Please usecount(AdvancedCacheLoader, Predicate)
insteadstatic int
count(SegmentedAdvancedLoadWriteStore<?,?> salws, IntSet segments)
Counts how many entries are present in the segmented store.static long
getExpiryTime(InternalMetadata internalMetadata)
static InternalMetadata
internalMetadata(InternalCacheEntry ice)
static InternalMetadata
internalMetadata(InternalCacheValue icv)
static <K,V>
MarshalledEntry<K,V>loadAndCheckExpiration(PersistenceManager persistenceManager, Object key, InvocationContext context, TimeService timeService)
Deprecated.since 9.4 This method references PersistenceManager, which isn't a public classstatic <K,V>
InternalCacheEntry<K,V>loadAndComputeInDataContainer(DataContainer<K,V> dataContainer, int segment, PersistenceManager persistenceManager, K key, InvocationContext ctx, TimeService timeService, DataContainer.ComputeAction<K,V> action)
Deprecated.since 9.4 This method references PersistenceManager, which isn't a public classstatic <K,V>
InternalCacheEntry<K,V>loadAndStoreInDataContainer(DataContainer<K,V> dataContainer, int segment, PersistenceManager persistenceManager, K key, InvocationContext ctx, TimeService timeService, AtomicReference<Boolean> isLoaded)
Deprecated.since 9.4 This method references PersistenceManager, which isn't a public classstatic <K,V>
InternalCacheEntry<K,V>loadAndStoreInDataContainer(DataContainer<K,V> dataContainer, PersistenceManager persistenceManager, K key, InvocationContext ctx, TimeService timeService, AtomicReference<Boolean> isLoaded)
Deprecated.since 9.4 This method references PersistenceManager, which isn't a public classstatic KeyFilter
notNull(KeyFilter filter)
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.static <K,V>
Set<InternalCacheEntry<K,V>>toEntrySet(AdvancedCacheLoader<K,V> acl, Predicate<? super K> filter, org.infinispan.container.impl.InternalEntryFactory ief)
static <K,V>
Set<InternalCacheEntry>toEntrySet(AdvancedCacheLoader<K,V> acl, KeyFilter<? super K> filter, org.infinispan.container.impl.InternalEntryFactory ief)
Deprecated.Please usetoEntrySet(AdvancedCacheLoader, Predicate, InternalEntryFactory)
insteadstatic <K,V>
Set<K>toKeySet(AdvancedCacheLoader<K,V> acl, Predicate<? super K> filter)
static <K,V>
Set<K>toKeySet(AdvancedCacheLoader<K,V> acl, KeyFilter<? super K> filter)
Deprecated.Please usetoKeySet(AdvancedCacheLoader, Predicate)
instead
-
-
-
Method Detail
-
count
@Deprecated public static <K,V> int count(AdvancedCacheLoader<K,V> acl, KeyFilter<? super K> filter)
Deprecated.Please usecount(AdvancedCacheLoader, Predicate)
instead- Type Parameters:
K
-V
-- Parameters:
acl
-filter
-- Returns:
-
count
public static <K,V> int count(AdvancedCacheLoader<K,V> acl, Predicate<? super K> filter)
-
count
public static int count(SegmentedAdvancedLoadWriteStore<?,?> salws, IntSet segments)
Counts how many entries are present in the segmented store. Only the segments provided will have entries counted.- Parameters:
salws
- segmented store containing entriessegments
- segments to count entries from- Returns:
- count of entries that are in the provided segments
-
toKeySet
@Deprecated public static <K,V> Set<K> toKeySet(AdvancedCacheLoader<K,V> acl, KeyFilter<? super K> filter)
Deprecated.Please usetoKeySet(AdvancedCacheLoader, Predicate)
instead- Type Parameters:
K
-V
-- Parameters:
acl
-filter
-- Returns:
-
toKeySet
public static <K,V> Set<K> toKeySet(AdvancedCacheLoader<K,V> acl, Predicate<? super K> filter)
-
toEntrySet
@Deprecated public static <K,V> Set<InternalCacheEntry> toEntrySet(AdvancedCacheLoader<K,V> acl, KeyFilter<? super K> filter, org.infinispan.container.impl.InternalEntryFactory ief)
Deprecated.Please usetoEntrySet(AdvancedCacheLoader, Predicate, InternalEntryFactory)
instead- Type Parameters:
K
-V
-- Parameters:
acl
-filter
-ief
-- Returns:
-
toEntrySet
public static <K,V> Set<InternalCacheEntry<K,V>> toEntrySet(AdvancedCacheLoader<K,V> acl, Predicate<? super K> filter, org.infinispan.container.impl.InternalEntryFactory ief)
-
getExpiryTime
public static long getExpiryTime(InternalMetadata internalMetadata)
-
internalMetadata
public static InternalMetadata internalMetadata(InternalCacheEntry ice)
-
internalMetadata
public static InternalMetadata internalMetadata(InternalCacheValue icv)
-
loadAndStoreInDataContainer
@Deprecated public static <K,V> InternalCacheEntry<K,V> loadAndStoreInDataContainer(DataContainer<K,V> dataContainer, PersistenceManager persistenceManager, K key, InvocationContext ctx, TimeService timeService, AtomicReference<Boolean> isLoaded)
Deprecated.since 9.4 This method references PersistenceManager, which isn't a public class
-
loadAndStoreInDataContainer
@Deprecated public static <K,V> InternalCacheEntry<K,V> loadAndStoreInDataContainer(DataContainer<K,V> dataContainer, int segment, PersistenceManager persistenceManager, K key, InvocationContext ctx, TimeService timeService, AtomicReference<Boolean> isLoaded)
Deprecated.since 9.4 This method references PersistenceManager, which isn't a public class
-
loadAndComputeInDataContainer
@Deprecated public static <K,V> InternalCacheEntry<K,V> loadAndComputeInDataContainer(DataContainer<K,V> dataContainer, int segment, PersistenceManager persistenceManager, K key, InvocationContext ctx, TimeService timeService, DataContainer.ComputeAction<K,V> action)
Deprecated.since 9.4 This method references PersistenceManager, which isn't a public class
-
loadAndCheckExpiration
@Deprecated public static <K,V> MarshalledEntry<K,V> loadAndCheckExpiration(PersistenceManager persistenceManager, Object key, InvocationContext context, TimeService timeService)
Deprecated.since 9.4 This method references PersistenceManager, which isn't a public class
-
convert
public static <K,V> InternalCacheEntry<K,V> convert(MarshalledEntry<K,V> loaded, org.infinispan.container.impl.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 acrossexecutor
- the executor execute parallelized operations onpublisherFunction
- function that creates a different publisher for each segment- Returns:
- a publisher that
-
-