Class Contexts
java.lang.Object
com.tick42.glue.internal.contexts.Contexts
- All Implemented Interfaces:
SharedContexts
public class Contexts extends Object implements SharedContexts
-
Constructor Summary
Constructors Constructor Description Contexts(ContextPeer peer, reactor.core.scheduler.Scheduler scheduler) -
Method Summary
Modifier and Type Method Description Collection<String>names()The names of all shared context.<T> CompletableFuture<Context<T>>subscribe(String name, ReifiedType<T> type, T defaultValue)CompletionStage<Void>update(String name, Map<String,Object> delta)Updates a shared context with specified name by applying a delta.CompletionStage<Void>updatePaths(String name, Map<String,Object> deltaPaths)Update context data with specified delta.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.tick42.glue.core.contexts.SharedContexts
subscribe, subscribe
-
Constructor Details
-
Contexts
-
-
Method Details
-
names
Description copied from interface:SharedContextsThe names of all shared context.- Specified by:
namesin interfaceSharedContexts- Returns:
- names of all shared context
-
subscribe
public <T> CompletableFuture<Context<T>> subscribe(String name, ReifiedType<T> type, T defaultValue)- Specified by:
subscribein interfaceSharedContexts
-
update
Description copied from interface:SharedContextsUpdates a shared context with specified name by applying a delta.- Specified by:
updatein interfaceSharedContexts- Parameters:
name- name of the shared contextdelta- changes to apply to the shared context- Returns:
- stage that is completed when context is updated, never
null
-
updatePaths
Description copied from interface:SharedContextsUpdate context data with specified delta. Allows you to use "paths" in the structure to update/remove nested properties.- Specified by:
updatePathsin interfaceSharedContexts- Parameters:
name- name of the shared contextdeltaPaths- changes to apply to the shared context- Returns:
- stage that is completed when context is updated, never
null
-