Created
February 11, 2011 18:34
-
-
Save rik0/822792 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn -initialize [this params] | |
(dosync | |
(alter (.state this) assoc :starting-node false) | |
(alter (.state this) assoc :m-value (int *m*)) | |
(alter (.state this) assoc :logger | |
(Logger/getLogger (->> this .getAddress .getName)))) | |
(condp = (alength params) | |
0 true | |
1 (dosync | |
(alter (.state this) assoc :starting-node (boolean (aget params 0))) | |
true) | |
2 (dosync | |
(alter (.state this) assoc :starting-node (boolean (aget params 0))) | |
(alter (.state this) assoc :m-value (int (aget params 1))) | |
true))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment