diff options
author | Mark Spruiell <mes@zeroc.com> | 2003-04-08 16:10:41 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2003-04-08 16:10:41 +0000 |
commit | 55332a5cbee9b31601991614283cc3a4b7a8633d (patch) | |
tree | 2cfcb737706174c890ffb60c8fb110890d0b9e6d /java/demo/Freeze/library/Collocated.java | |
parent | fix (diff) | |
download | ice-55332a5cbee9b31601991614283cc3a4b7a8633d.tar.bz2 ice-55332a5cbee9b31601991614283cc3a4b7a8633d.tar.xz ice-55332a5cbee9b31601991614283cc3a4b7a8633d.zip |
merging changes from freeze_strategy branch
Diffstat (limited to 'java/demo/Freeze/library/Collocated.java')
-rw-r--r-- | java/demo/Freeze/library/Collocated.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/java/demo/Freeze/library/Collocated.java b/java/demo/Freeze/library/Collocated.java index e5a21895b46..5811b17bbae 100644 --- a/java/demo/Freeze/library/Collocated.java +++ b/java/demo/Freeze/library/Collocated.java @@ -25,15 +25,16 @@ class LibraryCollocated extends Freeze.Application // // Create an Evictor for books. // - Freeze.Evictor evictor; - if(properties.getPropertyAsInt("Library.SaveAfterMutatingOperation") > 0) + Freeze.PersistenceStrategy strategy; + if(properties.getPropertyAsInt("Library.IdleStrategy") > 0) { - evictor = dbBooks.createEvictor(Freeze.EvictorPersistenceMode.SaveAfterMutatingOperation); + strategy = dbBooks.createIdleStrategy(); } else { - evictor = dbBooks.createEvictor(Freeze.EvictorPersistenceMode.SaveUponEviction); + strategy = dbBooks.createEvictionStrategy(); } + Freeze.Evictor evictor = dbBooks.createEvictor(strategy); int evictorSize = properties.getPropertyAsInt("Library.EvictorSize"); if(evictorSize > 0) { @@ -80,6 +81,6 @@ public class Collocated main(String[] args) { LibraryCollocated app = new LibraryCollocated("db"); - app.main("test.Freeze.library.Collocated", args, "config"); + app.main("demo.Freeze.library.Collocated", args, "config"); } } |