Writing a Backend
A backend is a MonadArbiter instance. Applications that use
arbiter-orville must define this instance. Use the same interface
to implement another adapter.
The class specifies a registry, handler type, and these database operations:
RegistryOfspecifies the queue registry for the monad.Handlerspecifies the handler type. It can include a connection argument if the database library supplies one.getSchemareturns the Arbiter schema.executeQueryandexecuteStatementrun aQuery. The value contains its SQL text, parameters, and decoder.withDbTransactionstarts a transaction or savepoint. A nested call must start a savepoint. This lets a finalization callback participate in the caller's transaction. See Worker Configuration.runHandlerWithConnectionchecks out a connection and runs a handler.getListenerreturns the sharedLISTEN/NOTIFYlistener. ReturnNothingfor polling mode. See Wakeups.
executeQueryPrepared is optional and uses executeQuery by default. Override
it if the backend can prepare a statement one time for each connection and
reuse the plan. The claim operation uses this method. See the performance data
in Backend Integration.
See the MonadArbiter haddocks for each method's signature.