Skip to content

Commit

Permalink
Update docs and rename pooling options
Browse files Browse the repository at this point in the history
  • Loading branch information
gcotelli committed Dec 16, 2021
1 parent 0354383 commit bdb0c61
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
8 changes: 7 additions & 1 deletion docs/Getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@ There is 3 different ways of instantiating a provider:

- `InMemoryRepositoryProvider new`
- `RDBMSRepositoryProvider usingSingleSessionWith: aLogin`
- `RDBMSRepositoryProvider using: aLogin`
- `RDBMSRepositoryProvider usingSessionPoolWith: aLogin configuredBy: configurationAction`.

Valid options for the session pooling configuration are:

- `maxIdleSessionsCount` defaulting to 10
- `minIdleSessionsCount` defaulting to 5
- `maxActiveSessionsCount` defaulting to 12

Concretely, the complete algorithm to start a project with persistence using
Sagan is:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ PooledRDBMSRepositoryProviderTest >> setUpRepositoryWith: aConflictCheckingStrat
SingleSessionRDMBSRepositoryTest login
configuredBy: [ :options |
options
at: #maxIdleObjectsCount put: 8;
at: #minIdleObjectsCount put: 4;
at: #maxActiveObjectsCount put: 10 ].
at: #maxIdleSessionsCount put: 8;
at: #minIdleSessionsCount put: 4;
at: #maxActiveSessionsCount put: 10 ].
extraterrestrials := provider
createRepositoryStoringObjectsOfType: Extraterrestrial
checkingConflictsAccordingTo: aConflictCheckingStrategy.
Expand Down
6 changes: 3 additions & 3 deletions source/Sagan-RDBMS/PooledRDBMSSessionProvider.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ PooledRDBMSSessionProvider >> initializeWorkingSessionsPoolConfiguredBy: options
validator: #isLoggedIn;
passivator: #reset;
activator: [ :session | self configureDescriptorSystemTo: session ];
maxIdleObjects: (options at: #maxIdleObjectsCount ifAbsent: [ 10 ]);
minIdleObjects: (options at: #minIdleObjectsCount ifAbsent: [ 5 ]);
maxActiveObjects: (options at: #maxActiveObjectsCount ifAbsent: [ 12 ])
maxIdleObjects: (options at: #maxIdleSessionsCount ifAbsent: [ 10 ]);
minIdleObjects: (options at: #minIdleSessionsCount ifAbsent: [ 5 ]);
maxActiveObjects: (options at: #maxActiveSessionsCount ifAbsent: [ 12 ])
]

{ #category : #accessing }
Expand Down

0 comments on commit bdb0c61

Please sign in to comment.