summaryrefslogtreecommitdiff
path: root/cpp/demo/Freeze/library/Collocated.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2003-04-08 16:10:41 +0000
committerMark Spruiell <mes@zeroc.com>2003-04-08 16:10:41 +0000
commit55332a5cbee9b31601991614283cc3a4b7a8633d (patch)
tree2cfcb737706174c890ffb60c8fb110890d0b9e6d /cpp/demo/Freeze/library/Collocated.cpp
parentfix (diff)
downloadice-55332a5cbee9b31601991614283cc3a4b7a8633d.tar.bz2
ice-55332a5cbee9b31601991614283cc3a4b7a8633d.tar.xz
ice-55332a5cbee9b31601991614283cc3a4b7a8633d.zip
merging changes from freeze_strategy branch
Diffstat (limited to 'cpp/demo/Freeze/library/Collocated.cpp')
-rw-r--r--cpp/demo/Freeze/library/Collocated.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/cpp/demo/Freeze/library/Collocated.cpp b/cpp/demo/Freeze/library/Collocated.cpp
index e8fe6a2091c..ff676c85f34 100644
--- a/cpp/demo/Freeze/library/Collocated.cpp
+++ b/cpp/demo/Freeze/library/Collocated.cpp
@@ -51,15 +51,16 @@ LibraryCollocated::runFreeze(int argc, char* argv[], const DBEnvironmentPtr& dbE
//
// Create an Evictor for books.
//
- EvictorPtr evictor;
- if(properties->getPropertyAsInt("Library.SaveAfterMutatingOperation") > 0)
+ PersistenceStrategyPtr strategy;
+ if(properties->getPropertyAsInt("Library.IdleStrategy") > 0)
{
- evictor = dbBooks->createEvictor(SaveAfterMutatingOperation);
+ strategy = dbBooks->createIdleStrategy();
}
else
{
- evictor = dbBooks->createEvictor(SaveUponEviction);
+ strategy = dbBooks->createEvictionStrategy();
}
+ EvictorPtr evictor = dbBooks->createEvictor(strategy);
Int evictorSize = properties->getPropertyAsInt("Library.EvictorSize");
if(evictorSize > 0)
{