Class PrimaryOwnerScheduler<I,K,M>
- java.lang.Object
-
- org.wildfly.clustering.ee.infinispan.scheduler.PrimaryOwnerScheduler<I,K,M>
-
- All Implemented Interfaces:
AutoCloseable,Function<CompletionStage<Collection<I>>,Stream<I>>,org.wildfly.clustering.ee.Scheduler<I,M>
public class PrimaryOwnerScheduler<I,K,M> extends Object implements org.wildfly.clustering.ee.Scheduler<I,M>, Function<CompletionStage<Collection<I>>,Stream<I>>
Scheduler decorator that schedules/cancels a given object on the primary owner.- Author:
- Paul Ferraro
-
-
Constructor Summary
Constructors Constructor Description PrimaryOwnerScheduler(CommandDispatcherFactory dispatcherFactory, String name, CacheEntryScheduler<I,M> scheduler, Function<K,org.wildfly.clustering.group.Node> primaryOwnerLocator, Function<I,K> keyFactory)PrimaryOwnerScheduler(CommandDispatcherFactory dispatcherFactory, String name, CacheEntryScheduler<I,M> scheduler, Function<K,org.wildfly.clustering.group.Node> primaryOwnerLocator, Function<I,K> keyFactory, BiFunction<I,M,ScheduleCommand<I,M>> scheduleCommandFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stream<I>apply(CompletionStage<Collection<I>> stage)voidcancel(I id)voidclose()booleancontains(I id)voidschedule(I id, M metaData)Stream<I>stream()
-
-
-
Constructor Detail
-
PrimaryOwnerScheduler
public PrimaryOwnerScheduler(CommandDispatcherFactory dispatcherFactory, String name, CacheEntryScheduler<I,M> scheduler, Function<K,org.wildfly.clustering.group.Node> primaryOwnerLocator, Function<I,K> keyFactory)
-
PrimaryOwnerScheduler
public PrimaryOwnerScheduler(CommandDispatcherFactory dispatcherFactory, String name, CacheEntryScheduler<I,M> scheduler, Function<K,org.wildfly.clustering.group.Node> primaryOwnerLocator, Function<I,K> keyFactory, BiFunction<I,M,ScheduleCommand<I,M>> scheduleCommandFactory)
-
-
Method Detail
-
cancel
public void cancel(I id)
-
contains
public boolean contains(I id)
-
apply
public Stream<I> apply(CompletionStage<Collection<I>> stage)
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceorg.wildfly.clustering.ee.Scheduler<I,K>
-
-