Skip to content

Commit

Permalink
Merge pull request #611 from ApptiveGrid/Trivial-02-13
Browse files Browse the repository at this point in the history
  • Loading branch information
noha authored Feb 13, 2024
2 parents 54c57ba + e65b149 commit 521383f
Show file tree
Hide file tree
Showing 18 changed files with 47 additions and 32 deletions.
7 changes: 7 additions & 0 deletions src/Soil-Core/SoilBTreeIterator.class.st
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
"
The SoilBTreeIterator implements the SoilIndexIterator for the B+Tree index.
To get an iterator, call #newIterator on the index when used stand-alone, if the index is used for a SoilIndexedDictionary,
use the #newIterator there to setup the iterator correctly.
"
Class {
#name : #SoilBTreeIterator,
#superclass : #SoilIndexIterator,
Expand Down
2 changes: 1 addition & 1 deletion src/Soil-Core/SoilBackupVisitor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Class {
'seen',
'toBeProcessed'
],
#category : #'Soil-Core-Model'
#category : #'Soil-Core-Visitor'
}

{ #category : #api }
Expand Down
2 changes: 1 addition & 1 deletion src/Soil-Core/SoilCompareVersionsVisitor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Class {
#instVars : [
'version'
],
#category : #'Soil-Core-Model'
#category : #'Soil-Core-Visitor'
}

{ #category : #initialization }
Expand Down
2 changes: 1 addition & 1 deletion src/Soil-Core/SoilFindRecordVisitor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Class {
'condition',
'object'
],
#category : #'Soil-Core-Model'
#category : #'Soil-Core-Visitor'
}

{ #category : #api }
Expand Down
2 changes: 1 addition & 1 deletion src/Soil-Core/SoilFindRecordsVisitor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Class {
'records',
'numberOfRecords'
],
#category : #'Soil-Core-Model'
#category : #'Soil-Core-Visitor'
}

{ #category : #api }
Expand Down
2 changes: 1 addition & 1 deletion src/Soil-Core/SoilIndexNotFound.class.st
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Class {
#name : #SoilIndexNotFound,
#superclass : #Error,
#category : #'Soil-Core-Model'
#category : #'Soil-Core-Error'
}
2 changes: 1 addition & 1 deletion src/Soil-Core/SoilInstanceVisitor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Class {
'soil',
'seen'
],
#category : #'Soil-Core-Model'
#category : #'Soil-Core-Visitor'
}

{ #category : #initialization }
Expand Down
2 changes: 1 addition & 1 deletion src/Soil-Core/SoilInvalidDatabaseVersion.class.st
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Class {
#name : #SoilInvalidDatabaseVersion,
#superclass : #SoilError,
#category : #'Soil-Core-Files'
#category : #'Soil-Core-Error'
}
2 changes: 1 addition & 1 deletion src/Soil-Core/SoilJournalConsistencyVisitor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Class {
'databaseVersion',
'segments'
],
#category : #'Soil-Core-Model'
#category : #'Soil-Core-Visitor'
}

{ #category : #initialization }
Expand Down
2 changes: 1 addition & 1 deletion src/Soil-Core/SoilObjectVisitor.class.st
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Class {
#name : #SoilObjectVisitor,
#superclass : #SoilTransactionalVisitor,
#category : #'Soil-Core-Model'
#category : #'Soil-Core-Visitor'
}

{ #category : #visiting }
Expand Down
2 changes: 1 addition & 1 deletion src/Soil-Core/SoilReferenceFinder.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Class {
'objectId',
'references'
],
#category : #'Soil-Core-Model'
#category : #'Soil-Core-Visitor'
}

{ #category : #private }
Expand Down
2 changes: 1 addition & 1 deletion src/Soil-Core/SoilReindexer.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Class {
'newIndex',
'newIndexIterator'
],
#category : #'Soil-Core'
#category : #'Soil-Core-Index-Common'
}

{ #category : #running }
Expand Down
2 changes: 1 addition & 1 deletion src/Soil-Core/SoilSignal.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Class {
#classVars : [
'IdCounter'
],
#category : #'Soil-Core-Base'
#category : #'Soil-Core-Model'
}

{ #category : #initialization }
Expand Down
8 changes: 8 additions & 0 deletions src/Soil-Core/SoilSkipListIterator.class.st
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
"
The SoilBTreeIterator implements the SoilIndexIterator for the SkipList index.
Try to avoid calling any method that is not implemented in SoilIndexIterator to be able to change easily to another index implementation.
To get an iterator, call #newIterator on the index when used stand-alone, if the index is used for a SoilIndexedDictionary,
use the #newIterator there to setup the iterator correctly.
"
Class {
#name : #SoilSkipListIterator,
#superclass : #SoilIndexIterator,
Expand Down
34 changes: 17 additions & 17 deletions src/Soil-Core/SoilTransaction.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ SoilTransaction >> acquireLocksAndDetectWriteSkew [
idMap rehash.
]

{ #category : #adding }
{ #category : #api }
SoilTransaction >> addClusterObject: anObject [
| objectId |
objectMap at: anObject ifPresent: [ :record | ^ record objectId ].
Expand Down Expand Up @@ -124,7 +124,7 @@ SoilTransaction >> behaviorDescriptionFor: aClass [
^ behaviorDescription
]

{ #category : #'as yet unclassified' }
{ #category : #api }
SoilTransaction >> behaviorDescriptionWithObjectId: objectId andVersion: version [
idMap
at: objectId
Expand All @@ -140,7 +140,7 @@ SoilTransaction >> behaviorRegistry [
^ soil behaviorRegistry
]

{ #category : #'as yet unclassified' }
{ #category : #api }
SoilTransaction >> behaviorVersionsUpTo: aSOBehaviorDescription [
^ self behaviorRegistry
behaviorVersionsUpTo: aSOBehaviorDescription
Expand Down Expand Up @@ -237,7 +237,7 @@ SoilTransaction >> checkpoint [

]

{ #category : #'as yet unclassified' }
{ #category : #actions }
SoilTransaction >> checkpointAndContinue [
self
checkpoint;
Expand Down Expand Up @@ -282,14 +282,14 @@ SoilTransaction >> dirtyObjects [
^ idMap select: [ :each | each hasChanged ] thenCollect: #object
]

{ #category : #'as yet unclassified' }
{ #category : #api }
SoilTransaction >> findObject: aBlock [
"scan all records in the database where the materialized object matches
the condition in aBlock. Return the object of the record instead"
^ (self findRecord: [:record | aBlock value: record materializeObject ]) object
]

{ #category : #'as yet unclassified' }
{ #category : #api }
SoilTransaction >> findRecord: aBlock [
"scan all connected records in the database until one matches
the condition in aBlock"
Expand All @@ -302,7 +302,7 @@ SoilTransaction >> findRecord: aBlock [
ifEmpty: [ nil ]
]

{ #category : #'as yet unclassified' }
{ #category : #api }
SoilTransaction >> findRecords: aBlock [
"scan all connected records in the database until one matches
the condition in aBlock"
Expand Down Expand Up @@ -341,7 +341,7 @@ SoilTransaction >> initialize [
indexUpdatesToCommit := OrderedCollection new
]

{ #category : #'as yet unclassified' }
{ #category : #api }
SoilTransaction >> initializeObjectId: anObjectId [
| segment assoc |
anObjectId isInitialized ifTrue: [ SoilObjectIdAlreadyInitialized signal: 'object id is already initialized: ', anObjectId asString ].
Expand Down Expand Up @@ -382,7 +382,7 @@ SoilTransaction >> journal [
^ journal
]

{ #category : #'as yet unclassified' }
{ #category : #api }
SoilTransaction >> lockObjectId: aSOObjectId [
^ self objectRepository lockObjectId: aSOObjectId for: self
]
Expand All @@ -395,7 +395,7 @@ SoilTransaction >> makeNewVersion: classDescription [
add: record asNewClusterVersion
]

{ #category : #'as yet unclassified' }
{ #category : #api }
SoilTransaction >> makeRoot: anObject [
| objectId |
objectId := self addClusterObject: anObject theNonSoilProxy.
Expand All @@ -415,7 +415,7 @@ SoilTransaction >> markDirty: anObject [

]

{ #category : #'as yet unclassified' }
{ #category : #api }
SoilTransaction >> materializeRecord: record [
^ record
transaction: self;
Expand Down Expand Up @@ -472,7 +472,7 @@ SoilTransaction >> objectAt: anObjectId ifAbsent: aBlock [
ifAbsent: aBlock
]

{ #category : #'as yet unclassified' }
{ #category : #api }
SoilTransaction >> objectIdOf: anObject [
^ (objectMap at: anObject) objectId.

Expand All @@ -483,12 +483,12 @@ SoilTransaction >> objectIndex [
^ objectMap
]

{ #category : #'as yet unclassified' }
{ #category : #api }
SoilTransaction >> objectRepository [
^ soil objectRepository
]

{ #category : #'as yet unclassified' }
{ #category : #api }
SoilTransaction >> objectWithId: objectId [
idMap ifNil: [
SoilTransactionAlreadyAborted signal: 'this transaction has already been aborted' ].
Expand Down Expand Up @@ -529,7 +529,7 @@ SoilTransaction >> printOn: aStream [
aStream << 'transaction read: ' << readVersion asString << ', write: ' << writeVersion asString
]

{ #category : #'as yet unclassified' }
{ #category : #api }
SoilTransaction >> proxyForObjectId: aSOObjectId [
^ aSOObjectId asSoilObjectProxy
transaction: self
Expand All @@ -545,7 +545,7 @@ SoilTransaction >> readVersion: anInteger [
readVersion := anInteger
]

{ #category : #'as yet unclassified' }
{ #category : #api }
SoilTransaction >> recordWithId: objectId [
(objectId isInitialized) ifFalse: [ SoilIndexOutOfRange signal: 'object id ', objectId printString, ' needs index greater than zero' ].
^ self objectRepository
Expand All @@ -571,7 +571,7 @@ SoilTransaction >> registerRecord: record [
objectMap at: record object put: record
]

{ #category : #'as yet unclassified' }
{ #category : #api }
SoilTransaction >> releaseLocks [
locks do: [ :lock | lock release ].
locks := OrderedCollection new
Expand Down
2 changes: 1 addition & 1 deletion src/Soil-Core/SoilTransactionAlreadyAborted.class.st
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Class {
#name : #SoilTransactionAlreadyAborted,
#superclass : #SoilError,
#category : #'Soil-Core-Model'
#category : #'Soil-Core-Error'
}
2 changes: 1 addition & 1 deletion src/Soil-Core/SoilTransactionalVisitor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Class {
#instVars : [
'transaction'
],
#category : #'Soil-Core-Model'
#category : #'Soil-Core-Visitor'
}

{ #category : #visiting }
Expand Down
2 changes: 1 addition & 1 deletion src/Soil-Core/SoilVisitor.class.st
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Class {
#name : #SoilVisitor,
#superclass : #Object,
#category : #'Soil-Core-Model'
#category : #'Soil-Core-Visitor'
}

{ #category : #testing }
Expand Down

0 comments on commit 521383f

Please sign in to comment.