Channel
View as MarkdownThis page lists the Java SDK names for Channels. The doc comment of each API gives its parameters, defaults, and errors. Read them in the Java SDK API reference.
API names
| Task | Java API | Dex behavior |
|---|---|---|
| Define a Channel | Channel.define | Channels |
| Define a ChannelMap | ChannelMap.define | ChannelMap |
| Declare it in the Flow | PersistenceSchema.of, returned from getPersistenceSchema | Flow definition |
| Publish a message from a Step or RPC | publish | Commits |
| Wait for messages | forOne, forN, atLeast, atMost, and range | Wait conditions |
| Read the messages a wait consumed | getConditionResults | Channel results |
| Load pending messages for a method | addWaitForLoadChannel, addExecuteLoadChannel, and their ChannelMap variants of StepOptions.Builder, or loadChannels, loadChannelMaps, and loadChannelMapInstances of @RPC | Selective state loading |
| Read loaded pending messages | pendingMessages and findPendingMessage | Pending messages |
| Delete a pending message | delete | Pending messages |
| Read the number of pending messages | size | Selective state loading |
| Count ChannelMap instances and list their keys | ChannelMap.getMapSize and ChannelMap.getAllInstanceKeys | ChannelMap |
| Complete the Flow only when Channels are empty | StepDecision.forceCompleteIfChannelsEmpty | ForceCompleteIfChannelsEmpty |
Example
Example: examples/java/src/main/java/io/superdurable/dex/primitives/channel/ChannelFlow.java