Owning class for references included for better profiling?
Peter Veentjer (1 May):
In the 0.6 release I'll add a 'owning class' field to the
transactional reference (can be set using the reference factory
builder)
It would be best if all this functionality initialized when the class
is initialized because it prevents creating unwanted objects and I can
do a lot of optimizations in the factorybuilder based on the
configuration.
Would this be possible in Scala without having the user to build the
factory explicitly? So somehow adding content to the class
initializer?
In the 0.6 release I'll add a 'owning class' field to the
transactional reference (can be set using the reference factory
builder)
It would be best if all this functionality initialized when the class
is initialized because it prevents creating unwanted objects and I can
do a lot of optimizations in the factorybuilder based on the
configuration.
class Person{
static final RefFactory factory =
getGlobalStmInstance().getReferenceFactoryBuilder().setOwner(Person.class).build();
Ref<String> ref = factory.atomicCreate();
}
Would this be possible in Scala without having the user to build the
factory explicitly? So somehow adding content to the class
initializer?
Leave a comment
on 2010-06-02 17:32 *
By Peter Vlugter
Summary changed from Owning class for transactions included for better profiling? to Owning class for references included for better profiling?
on 2010-09-09 14:55 *
By viktorklang
This could be solved by obtaining a builder in Transactor:
trait Transactor (
lazy implicit val stmRefFactory = getGlobalStmInstance.getReferenceFactoryBuilder.setOwner(this.getClass).build
)
And then have Ref() take an implicit ReferenceFactory
workable?
trait Transactor (
lazy implicit val stmRefFactory = getGlobalStmInstance.getReferenceFactoryBuilder.setOwner(this.getClass).build
)
And then have Ref() take an implicit ReferenceFactory
workable?
on 2010-09-09 20:15 *
By Peter Vlugter
We're not using the ReferenceFactoryBuilder anymore, we're now extending the Multiverse BasicRef directly, so this ticket is probably invalid.
Peter Veentjer, what are your thoughts on this ticket?
Peter Veentjer, what are your thoughts on this ticket?
Superceded by ScalaSTM