Commit 92c574f
authored
DBOS Instance support (#291)
ensures DBOS.Instance is usable and that all DBOS statics use the global
DBOS instance.
* DBOS.Instance is publicly constructable.
* DBOS.Instance.setConfig removed - config is passed to the ctor
* added a DBOS.Instance parameter to DBOSLifecycleListener.launch
* updated DBOS internals to use DBOS.Instance instead of DBOS statics
* changed WorkflowHandleFuture and WorkflowHandleDBPoll to use an
executor instance
* Added ClientWorkflowHandle that uses a sys db instance
* DBOS.globalInstance is now an AtomicReference, eliminating the need
for `syncronized` methods to set it
* DBOS.configure sets the global instance if it is not null
* DBOS.reinitialize unconditionally sets the global instance. This
method is now package private as it is primarily intended for our test
usage
* DBOS static methods all forward to the global instance.
* The global instance is *NOT* created on demand. If it is not set via
DBOS.configure (or reinitialize) the static methods fail
* Migrations are run on launch instead of when calling DBOS.configure
* hard coded internal queue support in queue registry to eliminate need
to register internal queue
* minor cleanups (registerQueue no longer returns the queue,
registerWorkflowMethod no longer returns the method's name)
* added JavaDocs to all the DBOS.Instance public methods
Note: currently, there's no DBOS.Instance mechanism for something like
using DBOS.startWorkflow to start a child workflow. Opened #296 to track
fixing this.1 parent 7b8ee81 commit 92c574f
50 files changed
Lines changed: 1785 additions & 463 deletions
File tree
- transact/src
- main
- java/dev/dbos/transact
- context
- database
- execution
- internal
- workflow/internal
- kotlin/dev/dbos/transact
- test/java/dev/dbos/transact
- client
- config
- database
- execution
- invocation
- issues
- json
- notifications
- queue
- scheduled
- step
- utils
- workflow
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Large diffs are not rendered by default.
Lines changed: 56 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
32 | 59 | | |
33 | 60 | | |
34 | 61 | | |
| |||
470 | 497 | | |
471 | 498 | | |
472 | 499 | | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
484 | 504 | | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
498 | 530 | | |
499 | 531 | | |
500 | 532 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
166 | 171 | | |
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
812 | 812 | | |
813 | 813 | | |
814 | 814 | | |
815 | | - | |
| 815 | + | |
816 | 816 | | |
817 | 817 | | |
818 | 818 | | |
| |||
897 | 897 | | |
898 | 898 | | |
899 | 899 | | |
900 | | - | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
901 | 905 | | |
902 | 906 | | |
903 | 907 | | |
| |||
Lines changed: 25 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
| 199 | + | |
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| |||
650 | 650 | | |
651 | 651 | | |
652 | 652 | | |
653 | | - | |
| 653 | + | |
654 | 654 | | |
655 | 655 | | |
656 | 656 | | |
| |||
1089 | 1089 | | |
1090 | 1090 | | |
1091 | 1091 | | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
1092 | 1096 | | |
1093 | 1097 | | |
1094 | 1098 | | |
| |||
1278 | 1282 | | |
1279 | 1283 | | |
1280 | 1284 | | |
1281 | | - | |
1282 | | - | |
1283 | | - | |
1284 | | - | |
1285 | | - | |
1286 | | - | |
1287 | | - | |
1288 | | - | |
1289 | | - | |
1290 | | - | |
1291 | | - | |
1292 | | - | |
1293 | | - | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
1294 | 1300 | | |
1295 | 1301 | | |
1296 | 1302 | | |
| |||
1413 | 1419 | | |
1414 | 1420 | | |
1415 | 1421 | | |
1416 | | - | |
| 1422 | + | |
1417 | 1423 | | |
1418 | 1424 | | |
1419 | | - | |
| 1425 | + | |
1420 | 1426 | | |
1421 | 1427 | | |
1422 | 1428 | | |
| |||
1468 | 1474 | | |
1469 | 1475 | | |
1470 | 1476 | | |
1471 | | - | |
| 1477 | + | |
1472 | 1478 | | |
1473 | 1479 | | |
1474 | | - | |
| 1480 | + | |
1475 | 1481 | | |
1476 | 1482 | | |
1477 | 1483 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
9 | | - | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
0 commit comments