Search in sources :

Example 1 with CachePermission

use of com.hazelcast.security.permission.CachePermission in project hazelcast by hazelcast.

the class StreamEventJournalP method streamRemoteCacheSupplier.

@SuppressWarnings("unchecked")
public static <K, V, T> ProcessorMetaSupplier streamRemoteCacheSupplier(@Nonnull String cacheName, @Nonnull String clientXml, @Nonnull PredicateEx<? super EventJournalCacheEvent<K, V>> predicate, @Nonnull FunctionEx<? super EventJournalCacheEvent<K, V>, ? extends T> projection, @Nonnull JournalInitialPosition initialPos, @Nonnull EventTimePolicy<? super T> eventTimePolicy) {
    checkSerializable(predicate, "predicate");
    checkSerializable(projection, "projection");
    return new ClusterMetaSupplier<>(clientXml, SecuredFunctions.cacheEventJournalReaderFn(cacheName), predicate, projection, initialPos, eventTimePolicy, () -> new CachePermission(cacheName, ACTION_CREATE, ACTION_READ));
}
Also used : CachePermission(com.hazelcast.security.permission.CachePermission)

Example 2 with CachePermission

use of com.hazelcast.security.permission.CachePermission in project hazelcast by hazelcast.

the class StreamEventJournalP method streamCacheSupplier.

@SuppressWarnings("unchecked")
public static <K, V, T> ProcessorMetaSupplier streamCacheSupplier(@Nonnull String cacheName, @Nonnull PredicateEx<? super EventJournalCacheEvent<K, V>> predicate, @Nonnull FunctionEx<? super EventJournalCacheEvent<K, V>, ? extends T> projection, @Nonnull JournalInitialPosition initialPos, @Nonnull EventTimePolicy<? super T> eventTimePolicy) {
    checkSerializable(predicate, "predicate");
    checkSerializable(projection, "projection");
    return new ClusterMetaSupplier<>(null, SecuredFunctions.cacheEventJournalReaderFn(cacheName), predicate, projection, initialPos, eventTimePolicy, () -> new CachePermission(cacheName, ACTION_CREATE, ACTION_READ));
}
Also used : CachePermission(com.hazelcast.security.permission.CachePermission)

Aggregations

CachePermission (com.hazelcast.security.permission.CachePermission)2