Skip to content

Instantly share code, notes, and snippets.

@dwdyer
Created October 26, 2012 21:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dwdyer/3961650 to your computer and use it in GitHub Desktop.
Save dwdyer/3961650 to your computer and use it in GitHub Desktop.
Terracotta configuration file for the Watchmaker Framework (Sudoku example)
<?xml version="1.0" encoding="UTF-8"?>
<tc:tc-config xmlns:tc="http://www.terracotta.org/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.terracotta.org/schema/terracotta-4.xsd">
<application>
<dso>
<roots>
<root>
<field-name>org.uncommons.watchmaker.framework.FitnessEvaluationWorker.workQueue</field-name>
</root>
</roots>
<instrumented-classes>
<include>
<class-expression>org.uncommons.watchmaker.framework.CachingFitnessEvaluator</class-expression>
<honor-transient>true</honor-transient>
<on-load>
<execute><![CDATA[self.cache = new com.google.common.collect.MapMaker().weakKeys().makeMap();]]></execute>
</on-load>
</include>
<include>
<class-expression>org.uncommons.watchmaker.framework.EvaluatedCandidate</class-expression>
</include>
<include>
<class-expression>org.uncommons.watchmaker.framework.FitnessEvalutationTask</class-expression>
</include>
<include>
<class-expression>org.uncommons.watchmaker.examples.sudoku.SudokuEvaluator</class-expression>
</include>
<include>
<class-expression>org.uncommons.watchmaker.examples.sudoku.Sudoku</class-expression>
</include>
<include>
<class-expression>org.uncommons.watchmaker.examples.sudoku.Sudoku$Cell</class-expression>
</include>
</instrumented-classes>
<additional-boot-jar-classes>
<include>java.lang.Exception</include>
<include>java.lang.NullPointerException</include>
<include>java.lang.RuntimeException</include>
</additional-boot-jar-classes>
</dso>
</application>
</tc:tc-config>
@dwdyer
Copy link
Author

dwdyer commented Oct 26, 2012

This is from a distributed evolution proof-of-concept I created a couple of years ago with version 0.6.1 of the Watchmaker Framework and I don't know which version of Terracotta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment