[Pkg] DeltaStreams: DeltaStreams-Model-gk.11.mcz

squeak-dev-noreply at lists.squeakfoundation.org squeak-dev-noreply at lists.squeakfoundation.org
Wed Mar 11 15:58:08 UTC 2009

A new version of DeltaStreams-Model was added to project DeltaStreams:

==================== Summary ====================

Name: DeltaStreams-Model-gk.11
Author: gk
Time: 11 March 2009, 4:58:02 pm
UUID: 4ca49f84-6072-41ac-ad3a-56d29c936f32
Ancestors: DeltaStreams-Model-gk.10

- Removed ivar attachments, not used yet.
- Tiny refactoring in DSDelta>>asAntiChange.
- Added DSCompositeChange>>entryWriters but that is of course not enough.
- More comments

=============== Diff against DeltaStreams-Model-gk.10 ===============

Item was changed:
  ----- Method: DSDelta>>asAntiChange (in category 'applying') -----
  	"Return a new Delta that, when applied, reverts each change of this Delta
  	in reverse order. Each change should have enough information to create
  	an anti change from itself."
  	| anti |
  	self isRevertable ifFalse: [DSDeltaNotRevertableException signal].
  	anti := DSDelta name: 'undo ' translated, self name.
+ 	self propertiesDo: [:key :val | anti propertyAt: key put: val]. 
- 	properties ifNotNil: [properties associationsDo: [:assoc | anti propertyAt: assoc key put: assoc value]]. 
  	self changes reverseDo: [:each | anti addChange: each asAntiChange]. 

Item was changed:
  ----- Method: DSDelta>>incrementChangeCounter (in category 'private') -----
+ 	"Monotonically increasing change counter to enable strict chronological sorting.
+ 	And no, we can't rely on the collection size - because changes may have been removed
+ 	causing holes in the sequence etc."
- 	"Monotonically increasing change counter to enable strict chronological sorting."
  	^changeCounter := changeCounter + 1!

Item was added:
+ ----- Method: DSCompositeChange>>entryWriters (in category 'objects from disk') -----
+ entryWriters
+ 	| all |
+ 	self error: 'This is not so easy, we need an entryWriter for myself too!!'.
+ 	all := OrderedCollection new.
+ 	self do: [:ch | all addAll: ch entryWriters].
+ 	^all!

Item was changed:
  ----- Method: DSChange>>propertyAt:put: (in category 'accessing properties') -----
  propertyAt: aSymbol put: value
  	properties ifNil: [properties := Dictionary new].
  	^ properties at: aSymbol put: value!

Item was changed:
  DSChange subclass: #DSDelta
+ 	instanceVariableNames: 'compositeChange uuid test notRevertable changeCounter'
- 	instanceVariableNames: 'compositeChange uuid test notRevertable attachments changeCounter'
  	classVariableNames: ''
  	poolDictionaries: ''
  	category: 'DeltaStreams-Model-Base'!
  !DSDelta commentStamp: '<historical>' prior: 0!
  A Delta is much like a ChangeSet but improved and simplified. It captures changes much like a ChangeSet does (see #event:), but unlike ChangeSet multiple Deltas can be logging changes at the same time. A DeltaSet also maintains a chronologically ordered collection of change objects that is a true log unlike a ChangeSet which tries to normalize on the fly and does not maintain an order.
  Each change object carries more information than a record in a ChangeSet does - and they know how to produce their anti change which in turn gives a DSDelta the ability to produce its own anti Delta. Such an anti Delta can be used to revert a Delta.!

Item was removed:
- ----- Method: DSDelta>>attachments (in category 'accessing') -----
- attachments
- 	^attachments!

More information about the Packages mailing list