He-Pin opened a new pull request, #3274:
URL: https://github.com/apache/pekko/pull/3274

   ### Motivation
   
   Pekko Persistence supports pluggable Durable State storage backends, but 
there was no documentation explaining how to implement one. Plugin authors had 
to read the source to discover the `DurableStateUpdateStore` and 
`DurableStateStoreProvider` SPI.
   
   ### Modification
   
   Add a "Building a storage backend for Durable State" paradox page with Scala 
and Java examples (plugin API, provider, and minimal activation configuration), 
backed by a runnable doc spec. Also fix a stale scaladoc on 
`DurableStateStoreProvider.scaladslDurableStateStore` that referred to 
`ReadJournal` instead of `DurableStateStore`.
   
   New files:
   - `docs/src/main/paradox/durable-state/state-store-plugin.md` (+ index link)
   - `docs/src/main/scala/docs/persistence/state/MyStateStore.scala`
   - `docs/src/main/java/docs/persistence/state/MyJavaStateStore.java`, 
`MyJavaStateStoreProvider.java`
   - 
`docs/src/test/scala/docs/persistence/state/PersistenceStatePluginDocSpec.scala`
   
   **Improvements over the upstream example:**
   - `MyJavaStateStore.upsertObject` uses the generic type parameter `A` 
instead of `Object`, so the snippet is a correct, type-safe template when 
adapted to a concrete state type.
   - The provider uses the diamond operator instead of raw types.
   - Fixed an upstream grammar typo ("described" → "describes").
   
   **Intentional divergence from upstream:** Pekko's `DurableStateUpdateStore` 
already documents `@param revision` (richer than the upstream `@param seqNr` 
fix), and the upstream `//#plugin-api` markers on the real trait are not 
referenced by the docs (the snippet is taken from the example file), so they 
are omitted to avoid leaking rendering markers into production sources.
   
   ### Result
   
   Durable State plugin authors have a step-by-step guide with compiling, 
tested Scala and Java examples.
   
   which is now Apache licensed
   
   ### Tests
   
   - `sbt "docs/testOnly docs.persistence.state.PersistenceStatePluginDocSpec"` 
(2/2 passed)
   - `sbt "docs/paradox"` (success; all snippets resolve)
   
   ### References
   
   Ports 
[akka/akka-core@1ce8748](https://github.com/akka/akka-core/commit/1ce8748239e968f1fba15d23213130e5be98945b)
 (akka#31973), which is now Apache licensed.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to