Menu

#88 No possibility of alternative relaxers

open
nobody
None
5
2007-09-18
2007-09-18
No

Relaxer is an interface, but in your current setup it's impossible to ever install an alternative implementation of it.

Unfortunately I'd implemented an alternative relaxer before realising this. :-)

Instead I've shoehorned it into a replacement for VisRunner and changed VisualizationModel so that it accepts a relaxer factory which you can use to generate new relaxers given an IterativeContext, and it uses this instead.

I've attached a patch. This patch also includes an isRunning method on Relaxer, because I found its absence annoying.

I haven't done anything to this effect, but it might be worth nerfing the pause and resume methods. If you take advantage of the Java 5 concurrency libraries it should be no more expensive to pause and resume than it is to start and stop.

Discussion

  • David R. MacIver

    Replacement version of the patch. Fixed indentation and removed a stupid bug in my implementation (didn't mark the relaxer as stopped when run terminated).

     
  • David R. MacIver

    Logged In: YES
    user_id=1681313
    Originator: YES

    File Added: relaxer.patch

     

Log in to post a comment.

MongoDB Logo MongoDB