Hi. I was wondering if gemstone let me declare that certain instance variable of a class should be transiente (not commited). For example, in the Java world, we can do something along: "public transiente int age" .
I saw DbTransient and I saw you can do "aClass makeInstancesDbTransient" but that's not what I want. I don't want all instances of a class to be transient. Instead, CERTAIN instances variables, of a certain class. is that possible? how? thanks! mariano |
On 03/02/2011 01:15 PM, Mariano Martinez Peck wrote:
> Hi. I was wondering if gemstone let me declare that certain instance > variable of a class should be transiente (not commited). For example, in > the Java world, we can do something along: "public transiente int age" . > > I saw DbTransient and I saw you can do "aClass > makeInstancesDbTransient" but that's not what I want. I don't want all > instances of a class to be transient. Instead, CERTAIN instances > variables, of a certain class. is that possible? how? > > thanks! > > mariano > > Mariano, At the moment you can only declare the whole class transient ... we have talked about doing that on an ivar by ivar basis, but we have yet to implement that ... So for now, you can use an instance of TransientValue to wrap the actual value want to be transient ... Dale |
On Thu, Mar 3, 2011 at 12:18 AM, Dale Henrichs <[hidden email]> wrote:
Thanks Dale. What do you mean "doing that on an ivar by ivar basis" ? We are thinking how to be able to define transient instVar for Fuel serializer...this is why I am asking ;)
Ok, Esteban suggested me this also. Thanks! Mariano |
On 03/03/2011 01:22 AM, Mariano Martinez Peck wrote:
> > > On Thu, Mar 3, 2011 at 12:18 AM, Dale Henrichs <[hidden email] > <mailto:[hidden email]>> wrote: > > On 03/02/2011 01:15 PM, Mariano Martinez Peck wrote: > > Hi. I was wondering if gemstone let me declare that certain instance > variable of a class should be transiente (not commited). For > example, in > the Java world, we can do something along: "public transiente > int age" . > > I saw DbTransient and I saw you can do "aClass > makeInstancesDbTransient" but that's not what I want. I don't > want all > instances of a class to be transient. Instead, CERTAIN instances > variables, of a certain class. is that possible? how? > > thanks! > > mariano > > > > Mariano, > > At the moment you can only declare the whole class transient ... we > have talked about doing that on an ivar by ivar basis, but we have > yet to implement that ... > > > Thanks Dale. What do you mean "doing that on an ivar by ivar basis" ? > We are thinking how to be able to define transient instVar for Fuel > serializer...this is why I am asking ;) Making certain instance variables transient instead of making the whole class transient. The draw back for implementing a transient iv is the extra bookkeeping and overhead of managing them ... class-based transience is one-stop shopping:) |
On Thu, Mar 3, 2011 at 9:19 PM, Dale Henrichs <[hidden email]> wrote:
Yes, but my question is how to implement that. I mean, in Pharo we do: Object subclass: #MyClass instanceVariableNames: 'aTransientInstVar' classVariableNames: '' poolDictionaries: '' category: 'blah' And Class >> instanceVariables is not more than an array of Strings...I mean, instance variables are not reifed. Are they in Gemstone? how would you mark/make them as transient otherwise? |
On 03/03/2011 12:41 PM, Mariano Martinez Peck wrote:
> Yes, but my question is how to implement that. I mean, in Pharo we do: > > Object subclass: #MyClass > instanceVariableNames: 'aTransientInstVar' > classVariableNames: '' > poolDictionaries: '' > category: 'blah' > > And Class >> instanceVariables is not more than an array of Strings...I > mean, instance variables are not reifed. Are they in Gemstone? how > would you mark/make them as transient otherwise? > For instance variables we've got an array of strings in the definition that correspond to the slots in the actual object too ... in GemStone 3.0 we've got an options array which is used to specify the funky characteristics of a class that like dbTransient, etc. We've got more of these puppies in GemStone3.0 because of ruby ... The options array gets translated to a bit field in the class disk representation ... when classes and objects are retored from disk we create a memory-based representations of them where there's room to work..... Yes, specifying which instance variables need to be transient would be a pain ... Dale |
On Thu, Mar 3, 2011 at 10:28 PM, Dale Henrichs <[hidden email]> wrote:
The options array gets translated to a bit field in the class disk representation ... when classes and objects are retored from disk we create a memory-based representations of them where there's room to work..... wow...this sounds awesome.
yes it seems to thanks dale |
Free forum by Nabble | Edit this page |