summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/demo/Freeze/library/Collocated.cpp2
-rw-r--r--cpp/demo/Freeze/library/Server.cpp2
-rw-r--r--cpp/demo/Freeze/phonebook/Collocated.cpp8
-rw-r--r--cpp/demo/Freeze/phonebook/Server.cpp8
-rw-r--r--cpp/demo/book/freeze_filesystem/Server.cpp2
-rw-r--r--cpp/include/Freeze/Freeze.h3
-rw-r--r--cpp/include/Freeze/Index.h4
-rw-r--r--cpp/include/Freeze/Initialize.h53
-rw-r--r--cpp/include/Ice/DispatchInterceptor.h2
-rw-r--r--cpp/include/IceUtil/Cache.h207
-rw-r--r--cpp/slice/Freeze/BackgroundSaveEvictor.ice104
-rw-r--r--cpp/slice/Freeze/Evictor.ice81
-rw-r--r--cpp/slice/Freeze/EvictorF.ice3
-rw-r--r--cpp/slice/Freeze/TransactionalEvictor.ice36
-rw-r--r--cpp/src/Freeze/.depend23
-rw-r--r--cpp/src/Freeze/BackgroundSaveEvictorI.cpp1416
-rw-r--r--cpp/src/Freeze/BackgroundSaveEvictorI.h217
-rw-r--r--cpp/src/Freeze/ConnectionI.cpp26
-rw-r--r--cpp/src/Freeze/ConnectionI.h53
-rw-r--r--cpp/src/Freeze/EvictorI.cpp1594
-rw-r--r--cpp/src/Freeze/EvictorI.h299
-rw-r--r--cpp/src/Freeze/EvictorIteratorI.cpp51
-rw-r--r--cpp/src/Freeze/EvictorIteratorI.h7
-rw-r--r--cpp/src/Freeze/IndexI.cpp79
-rw-r--r--cpp/src/Freeze/IndexI.h8
-rw-r--r--cpp/src/Freeze/Makefile13
-rw-r--r--cpp/src/Freeze/ObjectStore.cpp299
-rw-r--r--cpp/src/Freeze/ObjectStore.h149
-rw-r--r--cpp/src/Freeze/SharedDbEnv.cpp121
-rw-r--r--cpp/src/Freeze/SharedDbEnv.h17
-rw-r--r--cpp/src/Freeze/TransactionI.h1
-rw-r--r--cpp/src/Freeze/TransactionalEvictorContextI.cpp298
-rw-r--r--cpp/src/Freeze/TransactionalEvictorContextI.h143
-rw-r--r--cpp/src/Freeze/TransactionalEvictorI.cpp782
-rw-r--r--cpp/src/Freeze/TransactionalEvictorI.h128
-rw-r--r--cpp/test/Freeze/evictor/Client.cpp213
-rw-r--r--cpp/test/Freeze/evictor/Test.ice2
-rw-r--r--cpp/test/Freeze/evictor/TestI.cpp19
-rw-r--r--cpp/test/Freeze/evictor/TestI.h6
-rw-r--r--cpp/test/Freeze/oldevictor/TestI.cpp6
-rw-r--r--cpp/test/Freeze/oldevictor/TestI.h2
-rw-r--r--cpp/test/FreezeScript/evictor/makedb.cpp2
42 files changed, 4218 insertions, 2271 deletions
diff --git a/cpp/demo/Freeze/library/Collocated.cpp b/cpp/demo/Freeze/library/Collocated.cpp
index abfb7d2378b..395a161a132 100644
--- a/cpp/demo/Freeze/library/Collocated.cpp
+++ b/cpp/demo/Freeze/library/Collocated.cpp
@@ -57,7 +57,7 @@ LibraryCollocated::run(int argc, char* argv[])
//
// Create an evictor for books.
//
- Freeze::EvictorPtr evictor = Freeze::createEvictor(adapter, _envName, "books");
+ Freeze::EvictorPtr evictor = Freeze::createBackgroundSaveEvictor(adapter, _envName, "books");
Ice::Int evictorSize = properties->getPropertyAsInt("EvictorSize");
if(evictorSize > 0)
{
diff --git a/cpp/demo/Freeze/library/Server.cpp b/cpp/demo/Freeze/library/Server.cpp
index c91b12215ff..f7e729422f8 100644
--- a/cpp/demo/Freeze/library/Server.cpp
+++ b/cpp/demo/Freeze/library/Server.cpp
@@ -49,7 +49,7 @@ LibraryServer::run(int argc, char* argv[])
//
// Create an evictor for books.
//
- Freeze::EvictorPtr evictor = Freeze::createEvictor(adapter, _envName, "books");
+ Freeze::EvictorPtr evictor = Freeze::createBackgroundSaveEvictor(adapter, _envName, "books");
Ice::Int evictorSize = properties->getPropertyAsInt("EvictorSize");
if(evictorSize > 0)
{
diff --git a/cpp/demo/Freeze/phonebook/Collocated.cpp b/cpp/demo/Freeze/phonebook/Collocated.cpp
index 43674a217f9..241b6280b3c 100644
--- a/cpp/demo/Freeze/phonebook/Collocated.cpp
+++ b/cpp/demo/Freeze/phonebook/Collocated.cpp
@@ -72,11 +72,11 @@ PhoneBookCollocated::run(int argc, char* argv[])
//
// When Freeze.Evictor.db.contacts.PopulateEmptyIndices is not 0
// and the Name index is empty, Freeze will traverse the database
- // to recreate the index during createEvictor(). Therefore the
+ // to recreate the index during createXXXEvictor(). Therefore the
// factories for the objects stored in evictor (contacts here)
- // must be registered before the call to createEvictor().
+ // must be registered before the call to createXXXEvictor().
//
- Freeze::EvictorPtr evictor = Freeze::createEvictor(adapter, _envName, "contacts", 0, indices);
+ Freeze::EvictorPtr evictor = Freeze::createBackgroundSaveEvictor(adapter, _envName, "contacts", 0, indices);
adapter->addServantLocator(evictor, "contact");
Ice::Int evictorSize = properties->getPropertyAsInt("EvictorSize");
@@ -88,7 +88,7 @@ PhoneBookCollocated::run(int argc, char* argv[])
//
// Completes the initialization of the contact factory. Note that ContactI/
// ContactFactoryI uses this evictor only when a Contact is destroyed,
- // which cannot happen during createEvictor().
+ // which cannot happen during createXXXEvictor().
//
contactFactory->setEvictor(evictor);
diff --git a/cpp/demo/Freeze/phonebook/Server.cpp b/cpp/demo/Freeze/phonebook/Server.cpp
index 16898b60bcc..a86f334225d 100644
--- a/cpp/demo/Freeze/phonebook/Server.cpp
+++ b/cpp/demo/Freeze/phonebook/Server.cpp
@@ -64,11 +64,11 @@ PhoneBookServer::run(int argc, char* argv[])
// Create an evictor for contacts.
// When Freeze.Evictor.db.contacts.PopulateEmptyIndices is not 0 and the
// Name index is empty, Freeze will traverse the database to recreate
- // the index during createEvictor(). Therefore the factories for the objects
+ // the index during createXXXEvictor(). Therefore the factories for the objects
// stored in evictor (contacts here) must be registered before the call
- // to createEvictor().
+ // to createXXXEvictor().
//
- Freeze::EvictorPtr evictor = Freeze::createEvictor(adapter, _envName, "contacts", 0, indices);
+ Freeze::EvictorPtr evictor = Freeze::createBackgroundSaveEvictor(adapter, _envName, "contacts", 0, indices);
adapter->addServantLocator(evictor, "contact");
Ice::Int evictorSize = properties->getPropertyAsInt("EvictorSize");
@@ -80,7 +80,7 @@ PhoneBookServer::run(int argc, char* argv[])
//
// Completes the initialization of the contact factory. Note that ContactI/
// ContactFactoryI uses this evictor only when a Contact is destroyed,
- // which cannot happen during createEvictor().
+ // which cannot happen during createXXXEvictor().
//
contactFactory->setEvictor(evictor);
diff --git a/cpp/demo/book/freeze_filesystem/Server.cpp b/cpp/demo/book/freeze_filesystem/Server.cpp
index 79dfb9365cc..c93bcbf3246 100644
--- a/cpp/demo/book/freeze_filesystem/Server.cpp
+++ b/cpp/demo/book/freeze_filesystem/Server.cpp
@@ -39,7 +39,7 @@ public:
// Create the Freeze evictor (stored in the NodeI::_evictor static member).
//
Freeze::ServantInitializerPtr init = new NodeInitializer;
- NodeI::_evictor = Freeze::createEvictor(NodeI::_adapter, _envName, "evictorfs", init);
+ NodeI::_evictor = Freeze::createBackgroundSaveEvictor(NodeI::_adapter, _envName, "evictorfs", init);
NodeI::_adapter->addServantLocator(NodeI::_evictor, "");
diff --git a/cpp/include/Freeze/Freeze.h b/cpp/include/Freeze/Freeze.h
index a6267acba05..340201190f8 100644
--- a/cpp/include/Freeze/Freeze.h
+++ b/cpp/include/Freeze/Freeze.h
@@ -11,7 +11,8 @@
#define FREEZE_FREEZE_H
#include <Freeze/Initialize.h>
-#include <Freeze/Evictor.h>
+#include <Freeze/BackgroundSaveEvictor.h>
+#include <Freeze/TransactionalEvictor.h>
#include <Freeze/Map.h>
#include <Freeze/TransactionHolder.h>
diff --git a/cpp/include/Freeze/Index.h b/cpp/include/Freeze/Index.h
index cfd66321d93..914720ced8e 100644
--- a/cpp/include/Freeze/Index.h
+++ b/cpp/include/Freeze/Index.h
@@ -18,7 +18,7 @@ namespace Freeze
{
class IndexI;
-class ObjectStore;
+class ObjectStoreBase;
class FREEZE_API Index : public IceUtil::Shared
{
@@ -46,7 +46,7 @@ protected:
private:
friend class IndexI;
- friend class ObjectStore;
+ friend class ObjectStoreBase;
std::string _name;
std::string _facet;
diff --git a/cpp/include/Freeze/Initialize.h b/cpp/include/Freeze/Initialize.h
index 87684264415..e180680bcbb 100644
--- a/cpp/include/Freeze/Initialize.h
+++ b/cpp/include/Freeze/Initialize.h
@@ -25,20 +25,43 @@ class DbTxn;
namespace Freeze
{
-FREEZE_API EvictorPtr createEvictor(const Ice::ObjectAdapterPtr& adapter,
- const std::string& envName,
- const std::string& filename,
- const ServantInitializerPtr& initializer = 0,
- const std::vector<Freeze::IndexPtr>& indices = std::vector<Freeze::IndexPtr>(),
- bool createDb = true);
-
-FREEZE_API EvictorPtr createEvictor(const Ice::ObjectAdapterPtr& adapter,
- const std::string& envName,
- DbEnv& dbEnv,
- const std::string& filename,
- const ServantInitializerPtr& initializer = 0,
- const std::vector<Freeze::IndexPtr>& indices = std::vector<Freeze::IndexPtr>(),
- bool createDb = true);
+typedef std::map<std::string, std::string> FacetTypeMap;
+
+FREEZE_API Freeze::BackgroundSaveEvictorPtr
+createBackgroundSaveEvictor(const Ice::ObjectAdapterPtr& adapter,
+ const std::string& envName,
+ const std::string& filename,
+ const ServantInitializerPtr& initializer = 0,
+ const std::vector<IndexPtr>& indices = std::vector<IndexPtr>(),
+ bool createDb = true);
+
+FREEZE_API BackgroundSaveEvictorPtr
+createBackgroundSaveEvictor(const Ice::ObjectAdapterPtr& adapter,
+ const std::string& envName,
+ DbEnv& dbEnv,
+ const std::string& filename,
+ const ServantInitializerPtr& initializer = 0,
+ const std::vector<IndexPtr>& indices = std::vector<IndexPtr>(),
+ bool createDb = true);
+
+FREEZE_API TransactionalEvictorPtr
+createTransactionalEvictor(const Ice::ObjectAdapterPtr& adapter,
+ const std::string& envName,
+ const std::string& filename,
+ const FacetTypeMap& facetTypes = FacetTypeMap(),
+ const ServantInitializerPtr& initializer = 0,
+ const std::vector<IndexPtr>& indices = std::vector<IndexPtr>(),
+ bool createDb = true);
+
+FREEZE_API TransactionalEvictorPtr
+createTransactionalEvictor(const Ice::ObjectAdapterPtr& adapter,
+ const std::string& envName,
+ DbEnv& dbEnv,
+ const std::string& filename,
+ const FacetTypeMap& facetTypes = FacetTypeMap(),
+ const ServantInitializerPtr& initializer = 0,
+ const std::vector<IndexPtr>& indices = std::vector<IndexPtr>(),
+ bool createDb = true);
FREEZE_API ConnectionPtr createConnection(const Ice::CommunicatorPtr& communicator,
@@ -53,7 +76,7 @@ FREEZE_API const std::string& catalogName();
FREEZE_API DbTxn* getTxn(const TransactionPtr&);
-typedef void (*FatalErrorCallback)(const EvictorPtr&, const Ice::CommunicatorPtr&);
+typedef void (*FatalErrorCallback)(const BackgroundSaveEvictorPtr&, const Ice::CommunicatorPtr&);
FREEZE_API FatalErrorCallback registerFatalErrorCallback(FatalErrorCallback);
}
diff --git a/cpp/include/Ice/DispatchInterceptor.h b/cpp/include/Ice/DispatchInterceptor.h
index b7e1228d68b..32a3dfa00e5 100644
--- a/cpp/include/Ice/DispatchInterceptor.h
+++ b/cpp/include/Ice/DispatchInterceptor.h
@@ -29,6 +29,8 @@ public:
__collocDispatch(IceInternal::Direct&);
};
+typedef IceInternal::Handle<DispatchInterceptor> DispatchInterceptorPtr;
+
}
#endif
diff --git a/cpp/include/IceUtil/Cache.h b/cpp/include/IceUtil/Cache.h
index a4d1532a969..04afc7564b7 100644
--- a/cpp/include/IceUtil/Cache.h
+++ b/cpp/include/IceUtil/Cache.h
@@ -61,7 +61,7 @@ public:
Handle<Value> getIfPinned(const Key&) const;
void unpin(Position);
- bool unpin(const Key&);
+ Handle<Value> unpin(const Key&);
void clear();
size_t size() const;
@@ -112,20 +112,69 @@ Cache<Key, Value>::getIfPinned(const Key& key) const
template<typename Key, typename Value> void
Cache<Key, Value>::unpin(typename Cache::Position p)
{
+ //
+ // There is no risk to erase a 'being loaded' position,
+ // since such position nevr got outside yet!
+ //
Mutex::Lock sync(_mutex);
_map.erase(p);
}
-template<typename Key, typename Value> bool
+template<typename Key, typename Value> Handle<Value>
Cache<Key, Value>::unpin(const Key& key)
{
Mutex::Lock sync(_mutex);
- return _map.erase(key) > 0;
+
+ for(;;)
+ {
+ typename CacheMap::iterator p = _map.find(key);
+
+ if(p == _map.end())
+ {
+ return 0;
+ }
+
+ Handle<Value> result = p->second.obj;
+
+ if(result != 0)
+ {
+ _map.erase(p);
+ return result;
+ }
+ else
+ {
+ //
+ // The object is being loaded so we need to wait:
+ // we can't erase 'p' while the loading thread is using it
+ //
+
+ if(p->second.latch == 0)
+ {
+ p->second.latch = new Latch;
+ }
+
+ Latch* latch = p->second.latch;
+ ++latch->useCount;
+ sync.release();
+ latch->await();
+ sync.acquire();
+ if(--latch->useCount == 0)
+ {
+ delete latch;
+ }
+ //
+ // Try again
+ //
+ }
+ }
}
template<typename Key, typename Value> void
Cache<Key, Value>::clear()
{
+ //
+ // Not safe during a pin!
+ //
Mutex::Lock sync(_mutex);
_map.clear();
}
@@ -153,7 +202,6 @@ Cache<Key, Value>::pin(const Key& key, const Handle<Value>& obj)
_map.insert(typename CacheMap::value_type(key, CacheValue(obj)));
#endif
-
if(ir.second)
{
pinned(obj, ir.first);
@@ -179,7 +227,7 @@ Cache<Key, Value>::pinImpl(const Key& key, const Handle<Value>& newObj)
Latch* latch = 0;
Position p;
- for(;;)
+ do
{
{
Mutex::Lock sync(_mutex);
@@ -232,98 +280,105 @@ Cache<Key, Value>::pinImpl(const Key& key, const Handle<Value>& newObj)
p = ir.first;
}
-
+
if(latch != 0)
- {
- latch->await();
+ {
+ //
+ // Note: only the threads owning a "useCount" wait; upon wake-up,
+ // they loop back, release this useCount and possibly delete the latch
+ //
+ latch->await();
+
//
// p could be stale now, e.g. some other thread pinned and unpinned the
// object while we were waiting.
// So start over.
- //
- continue;
- }
- else
- {
- Handle<Value> obj;
- try
- {
- obj = load(key);
- }
- catch(...)
- {
- {
- Mutex::Lock sync(_mutex);
- latch = p->second.latch;
- p->second.latch = 0;
- _map.erase(p);
- }
- if(latch != 0)
- {
- assert(latch->getCount() == 1);
- latch->countDown();
- }
- throw;
- }
-
- {
- Mutex::Lock sync(_mutex);
+ }
+ } while(latch != 0);
- latch = p->second.latch;
- p->second.latch = 0;
+
+ //
+ // Load
+ //
+ Handle<Value> obj;
+ try
+ {
+ obj = load(key);
+ }
+ catch(...)
+ {
+ {
+ Mutex::Lock sync(_mutex);
+ latch = p->second.latch;
+ p->second.latch = 0;
+ _map.erase(p);
+ }
+ if(latch != 0)
+ {
+ assert(latch->getCount() == 1);
+ latch->countDown();
+ }
+ throw;
+ }
- try
+ {
+ Mutex::Lock sync(_mutex);
+
+ //
+ // p is still valid here -- nobody knows about it. See also unpin().
+ //
+ latch = p->second.latch;
+ p->second.latch = 0;
+
+ try
+ {
+ if(obj != 0)
+ {
+ p->second.obj = obj;
+ pinned(obj, p);
+ }
+ else
+ {
+ if(newObj == 0)
{
- if(obj != 0)
- {
- p->second.obj = obj;
- pinned(obj, p);
- }
- else
- {
- if(newObj == 0)
- {
- //
- // pin() did not find the object
- //
-
- //
- // The waiting threads will have to call load() to see by themselves.
- //
- _map.erase(p);
- }
- else
- {
- //
- // putIfAbsent() inserts key/newObj
- //
- p->second.obj = newObj;
- pinned(newObj, p);
- }
- }
+ //
+ // pin() did not find the object
+ //
+
+ //
+ // The waiting threads will have to call load() to see by themselves.
+ //
+ _map.erase(p);
}
- catch(...)
+ else
{
- if(latch != 0)
- {
- assert(latch->getCount() == 1);
- latch->countDown();
- }
- throw;
+ //
+ // putIfAbsent() inserts key/newObj
+ //
+ p->second.obj = newObj;
+ pinned(newObj, p);
}
}
+ }
+ catch(...)
+ {
if(latch != 0)
{
assert(latch->getCount() == 1);
latch->countDown();
}
- return obj;
- }
+ throw;
+ }
}
+ if(latch != 0)
+ {
+ assert(latch->getCount() == 1);
+ latch->countDown();
+ }
+ return obj;
}
-
}
#endif
diff --git a/cpp/slice/Freeze/BackgroundSaveEvictor.ice b/cpp/slice/Freeze/BackgroundSaveEvictor.ice
new file mode 100644
index 00000000000..089f01d0f7f
--- /dev/null
+++ b/cpp/slice/Freeze/BackgroundSaveEvictor.ice
@@ -0,0 +1,104 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#ifndef FREEZE_BACKGROUND_SAVE_EVICTOR_ICE
+#define FREEZE_BACKGROUND_SAVE_EVICTOR_ICE
+
+#include <Freeze/Evictor.ice>
+
+module Freeze
+{
+
+local interface BackgroundSaveEvictor extends Evictor
+{
+ /**
+ *
+ * Lock this object in the evictor cache. This lock can be released
+ * by [release] or [remove]. [release] releases only one lock, while
+ * [remove] releases all the locks.
+ *
+ * @param id The identity of the Ice object.
+ *
+ * @throws ::Ice::NotRegisteredException Raised if this identity was not
+ * registered with the evictor.
+ *
+ * @throws DatabaseException Raised if a database failure occurred.
+ *
+ * @see keepFacet
+ * @see release
+ * @see remove
+ *
+ **/
+ void keep(Ice::Identity id);
+
+ /**
+ *
+ * Like [keep], but with a facet. Calling <tt>keep(id)</tt>
+ * is equivalent to calling [keepFacet] with an empty facet.
+ *
+ * @param id The identity of the Ice object.
+ *
+ * @param facet The facet. An empty facet means the default
+ * facet.
+ *
+ * @throws ::Ice::NotRegisteredException Raised if this identity was not
+ * registered with the evictor.
+ *
+ * @throws DatabaseException Raised if a database failure occurred.
+ *
+ * @see keep
+ * @see releaseFacet
+ * @see removeFacet
+ *
+ **/
+ void keepFacet(Ice::Identity id, string facet);
+
+
+ /**
+ *
+ * Release a lock acquired by [keep]. Once all the locks on an
+ * object have been released, the object is again subject to the
+ * normal eviction strategy.
+ *
+ * @param id The identity of the Ice object.
+ *
+ * @throws ::Ice::NotRegisteredException Raised if this object was not
+ * locked with [keep] or [keepFacet].
+ *
+ * @see keepFacet
+ * @see release
+ *
+ **/
+ void release(Ice::Identity id);
+
+ /**
+ *
+ * Like [release], but with a facet. Calling <tt>release(id)</tt>
+ * is equivalent to calling [releaseFacet] with an empty facet.
+ *
+ * @param id The identity of the Ice object.
+ *
+ * @param facet The facet. An empty facet means the default
+ * facet.
+ *
+ * @throws ::Ice::NotRegisteredException Raised if this object was not
+ * locked with [keep] or [keepFacet].
+ *
+ * @see keep
+ * @see releaseFacet
+ *
+ **/
+ void releaseFacet(Ice::Identity id, string facet);
+};
+
+};
+
+
+#endif
+
diff --git a/cpp/slice/Freeze/Evictor.ice b/cpp/slice/Freeze/Evictor.ice
index ec0220dbace..17482eb6084 100644
--- a/cpp/slice/Freeze/Evictor.ice
+++ b/cpp/slice/Freeze/Evictor.ice
@@ -283,87 +283,6 @@ local interface Evictor extends Ice::ServantLocator
/**
*
- * Lock this object in the evictor cache. This lock can be released
- * by [release] or [remove]. [release] releases only one lock, while
- * [remove] releases all the locks.
- *
- * @param id The identity of the Ice object.
- *
- * @throws ::Ice::NotRegisteredException Raised if this identity was not
- * registered with the evictor.
- *
- * @throws DatabaseException Raised if a database failure occurred.
- *
- * @see keepFacet
- * @see release
- * @see remove
- *
- **/
- void keep(Ice::Identity id);
-
- /**
- *
- * Like [keep], but with a facet. Calling <tt>keep(id)</tt>
- * is equivalent to calling [keepFacet] with an empty facet.
- *
- * @param id The identity of the Ice object.
- *
- * @param facet The facet. An empty facet means the default
- * facet.
- *
- * @throws ::Ice::NotRegisteredException Raised if this identity was not
- * registered with the evictor.
- *
- * @throws DatabaseException Raised if a database failure occurred.
- *
- * @see keep
- * @see releaseFacet
- * @see removeFacet
- *
- **/
- void keepFacet(Ice::Identity id, string facet);
-
-
- /**
- *
- * Release a lock acquired by [keep]. Once all the locks on an
- * object have been released, the object is again subject to the
- * normal eviction strategy.
- *
- * @param id The identity of the Ice object.
- *
- * @throws ::Ice::NotRegisteredException Raised if this object was not
- * locked with [keep] or [keepFacet].
- *
- * @see keepFacet
- * @see release
- *
- **/
- void release(Ice::Identity id);
-
-
- /**
- *
- * Like [release], but with a facet. Calling <tt>release(id)</tt>
- * is equivalent to calling [releaseFacet] with an empty facet.
- *
- * @param id The identity of the Ice object.
- *
- * @param facet The facet. An empty facet means the default
- * facet.
- *
- * @throws ::Ice::NotRegisteredException Raised if this object was not
- * locked with [keep] or [keepFacet].
- *
- * @see keep
- * @see releaseFacet
- *
- **/
- void releaseFacet(Ice::Identity id, string facet);
-
-
- /**
- *
* Returns true if the given identity is managed by the evictor
* with the default facet.
*
diff --git a/cpp/slice/Freeze/EvictorF.ice b/cpp/slice/Freeze/EvictorF.ice
index 304f762b7a8..504d65e4316 100644
--- a/cpp/slice/Freeze/EvictorF.ice
+++ b/cpp/slice/Freeze/EvictorF.ice
@@ -14,7 +14,8 @@ module Freeze
{
local interface ServantInitializer;
-local interface Evictor;
+local interface BackgroundSaveEvictor;
+local interface TransactionalEvictor;
};
diff --git a/cpp/slice/Freeze/TransactionalEvictor.ice b/cpp/slice/Freeze/TransactionalEvictor.ice
new file mode 100644
index 00000000000..107c855cdee
--- /dev/null
+++ b/cpp/slice/Freeze/TransactionalEvictor.ice
@@ -0,0 +1,36 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#ifndef FREEZE_TRANSACTIONAL_EVICTOR_ICE
+#define FREEZE_TRANSACTIONAL_EVICTOR_ICE
+
+#include <Freeze/Evictor.ice>
+
+module Freeze
+{
+
+local interface TransactionalEvictorContext
+{
+ void rollbackOnly();
+ ["cpp:const"] bool isRollbackOnly();
+
+ void complete();
+};
+
+local interface TransactionalEvictor extends Evictor
+{
+ TransactionalEvictorContext getCurrentContext();
+ TransactionalEvictorContext createCurrentContext();
+};
+
+};
+
+
+#endif
+
diff --git a/cpp/src/Freeze/.depend b/cpp/src/Freeze/.depend
index 943ed8ff700..2805f3e9cac 100644
--- a/cpp/src/Freeze/.depend
+++ b/cpp/src/Freeze/.depend
@@ -1,24 +1,30 @@
+BackgroundSaveEvictor$(OBJEXT): BackgroundSaveEvictor.cpp ../../include/Freeze/BackgroundSaveEvictor.h ../../include/Ice/LocalObjectF.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionIF.h ../../include/Ice/EndpointIF.h ../../include/Ice/Endpoint.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/OutgoingAsyncF.h ../../include/Ice/Current.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/StreamF.h ../../include/Ice/CommunicatorF.h ../../include/Freeze/Evictor.h ../../include/Ice/ServantLocator.h ../../include/Freeze/Exception.h ../../include/Ice/BasicStream.h ../../include/Ice/InstanceF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Buffer.h ../../include/Ice/Protocol.h ../../include/Ice/StringConverter.h ../../include/IceUtil/Unicode.h ../../include/Ice/Object.h ../../include/Ice/IncomingAsyncF.h ../../include/IceUtil/Iterator.h ../../include/IceUtil/ScopedArray.h ../../include/IceUtil/DisableWarnings.h
+BackgroundSaveEvictorI$(OBJEXT): BackgroundSaveEvictorI.cpp ../Freeze/BackgroundSaveEvictorI.h ../Freeze/EvictorI.h ../../include/IceUtil/IceUtil.h ../../include/IceUtil/Config.h ../../include/IceUtil/AbstractMutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Algorithm.h ../../include/IceUtil/ArgVector.h ../../include/IceUtil/Base64.h ../../include/IceUtil/Cache.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/CountDownLatch.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/IceUtil/CtrlCHandler.h ../../include/IceUtil/Functional.h ../../include/IceUtil/InputUtil.h ../../include/IceUtil/Iterator.h ../../include/IceUtil/MD5.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Options.h ../../include/IceUtil/RecMutex.h ../../include/IceUtil/Shared.h ../../include/IceUtil/OutputUtil.h ../../include/IceUtil/RWRecMutex.h ../../include/IceUtil/Thread.h ../../include/IceUtil/Random.h ../../include/IceUtil/ScopedArray.h ../../include/IceUtil/StaticMutex.h ../../include/IceUtil/StringUtil.h ../../include/IceUtil/UUID.h ../../include/IceUtil/Unicode.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/LoggerF.h ../../include/Ice/StreamF.h ../../include/Ice/StatsF.h ../../include/Ice/StringConverter.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionIF.h ../../include/Ice/EndpointIF.h ../../include/Ice/Endpoint.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/OutgoingAsyncF.h ../../include/Ice/Current.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/Stats.h ../../include/Ice/Communicator.h ../../include/Ice/Object.h ../../include/Ice/IncomingAsyncF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ImplicitContextF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/FacetMap.h ../../include/Ice/ServantLocator.h ../../include/Ice/OutgoingAsync.h ../../include/Ice/IncomingAsync.h ../../include/Ice/Incoming.h ../../include/Ice/ServantManagerF.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/Protocol.h ../../include/Ice/Process.h ../../include/Ice/Outgoing.h ../../include/Ice/Direct.h ../../include/Ice/Application.h ../../include/Ice/Connection.h ../../include/Ice/Functional.h ../../include/Ice/Stream.h ../../include/Ice/ImplicitContext.h ../../include/Ice/Locator.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/FactoryTable.h ../../include/Ice/FactoryTableDef.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/ProcessF.h ../../include/Ice/Router.h ../../include/Ice/DispatchInterceptor.h ../../include/Freeze/Freeze.h ../../include/Freeze/Initialize.h ../../include/Freeze/EvictorF.h ../../include/Freeze/ConnectionF.h ../../include/Freeze/Index.h ../../include/Freeze/DB.h ../../include/Freeze/Transaction.h ../../include/Freeze/BackgroundSaveEvictor.h ../../include/Freeze/Evictor.h ../../include/Freeze/Exception.h ../../include/Freeze/TransactionalEvictor.h ../../include/Freeze/Map.h ../../include/Freeze/Connection.h ../../include/Freeze/TransactionHolder.h ../Freeze/ObjectStore.h ../../include/Freeze/EvictorStorage.h ../Freeze/TransactionI.h ../Freeze/EvictorIteratorI.h ../Freeze/SharedDbEnv.h ../../include/IceUtil/DisableWarnings.h ../Freeze/Util.h
CatalogData$(OBJEXT): CatalogData.cpp ../../include/Freeze/CatalogData.h ../../include/Ice/LocalObjectF.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/BasicStream.h ../../include/Ice/InstanceF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Buffer.h ../../include/Ice/Protocol.h ../../include/Ice/StringConverter.h ../../include/IceUtil/Unicode.h ../../include/Ice/Object.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/Ice/IncomingAsyncF.h ../../include/Ice/Current.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/StreamF.h ../../include/IceUtil/Iterator.h ../../include/IceUtil/ScopedArray.h ../../include/IceUtil/DisableWarnings.h
Catalog$(OBJEXT): Catalog.cpp ../../include/Ice/BasicStream.h ../../include/Ice/InstanceF.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/Buffer.h ../../include/Ice/Protocol.h ../../include/Ice/StringConverter.h ../../include/IceUtil/Unicode.h ../../include/Freeze/Catalog.h ../../include/Freeze/Map.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/PropertiesF.h ../../include/Ice/LoggerF.h ../../include/Ice/StreamF.h ../../include/Ice/StatsF.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionIF.h ../../include/Ice/EndpointIF.h ../../include/Ice/Endpoint.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/OutgoingAsyncF.h ../../include/Ice/Current.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/Stats.h ../../include/Ice/Communicator.h ../../include/Ice/Object.h ../../include/Ice/IncomingAsyncF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ImplicitContextF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/FacetMap.h ../../include/Ice/ServantLocator.h ../../include/Ice/OutgoingAsync.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/IceUtil/RecMutex.h ../../include/Ice/IncomingAsync.h ../../include/Ice/Incoming.h ../../include/Ice/ServantManagerF.h ../../include/Ice/Process.h ../../include/Ice/Outgoing.h ../../include/Ice/Direct.h ../../include/Ice/Application.h ../../include/Ice/Connection.h ../../include/Ice/Functional.h ../../include/IceUtil/Functional.h ../../include/Ice/Stream.h ../../include/Ice/ImplicitContext.h ../../include/Ice/Locator.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/FactoryTable.h ../../include/Ice/FactoryTableDef.h ../../include/IceUtil/StaticMutex.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/ProcessF.h ../../include/Ice/Router.h ../../include/Ice/DispatchInterceptor.h ../../include/Freeze/DB.h ../../include/Freeze/Exception.h ../../include/Freeze/Connection.h ../../include/Freeze/Transaction.h ../../include/Freeze/CatalogData.h
ConnectionI$(OBJEXT): ConnectionI.cpp ../Freeze/ConnectionI.h ../../include/Freeze/Connection.h ../../include/Ice/LocalObjectF.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Freeze/Transaction.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/CommunicatorF.h ../../include/Freeze/Initialize.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/LoggerF.h ../../include/Ice/StreamF.h ../../include/Ice/StatsF.h ../../include/Ice/StringConverter.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionIF.h ../../include/Ice/EndpointIF.h ../../include/Ice/Endpoint.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/OutgoingAsyncF.h ../../include/Ice/Current.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/Stats.h ../../include/Ice/Communicator.h ../../include/Ice/Object.h ../../include/Ice/IncomingAsyncF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ImplicitContextF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/FacetMap.h ../../include/Ice/ServantLocator.h ../../include/Ice/OutgoingAsync.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/IceUtil/RecMutex.h ../../include/Ice/IncomingAsync.h ../../include/Ice/Incoming.h ../../include/Ice/ServantManagerF.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/Protocol.h ../../include/IceUtil/Unicode.h ../../include/Ice/Process.h ../../include/Ice/Outgoing.h ../../include/Ice/Direct.h ../../include/Ice/Application.h ../../include/Ice/Connection.h ../../include/Ice/Functional.h ../../include/IceUtil/Functional.h ../../include/Ice/Stream.h ../../include/Ice/ImplicitContext.h ../../include/Ice/Locator.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/FactoryTable.h ../../include/Ice/FactoryTableDef.h ../../include/IceUtil/StaticMutex.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/ProcessF.h ../../include/Ice/Router.h ../../include/Ice/DispatchInterceptor.h ../../include/Freeze/EvictorF.h ../../include/Freeze/ConnectionF.h ../../include/Freeze/Index.h ../../include/Freeze/DB.h ../Freeze/TransactionI.h ../Freeze/SharedDbEnv.h ../Freeze/MapI.h ../../include/Freeze/Map.h ../../include/Freeze/Exception.h ../Freeze/SharedDb.h
Connection$(OBJEXT): Connection.cpp ../../include/Freeze/Connection.h ../../include/Ice/LocalObjectF.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Freeze/Transaction.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/CommunicatorF.h ../../include/IceUtil/Iterator.h ../../include/IceUtil/ScopedArray.h ../../include/IceUtil/DisableWarnings.h
DB$(OBJEXT): DB.cpp ../../include/Freeze/DB.h ../../include/Ice/LocalObjectF.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/BasicStream.h ../../include/Ice/InstanceF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Buffer.h ../../include/Ice/Protocol.h ../../include/Ice/StringConverter.h ../../include/IceUtil/Unicode.h ../../include/Ice/Object.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/Ice/IncomingAsyncF.h ../../include/Ice/Current.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/StreamF.h ../../include/IceUtil/Iterator.h ../../include/IceUtil/ScopedArray.h ../../include/IceUtil/DisableWarnings.h
-EvictorI$(OBJEXT): EvictorI.cpp ../Freeze/EvictorI.h ../../include/IceUtil/IceUtil.h ../../include/IceUtil/Config.h ../../include/IceUtil/AbstractMutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Algorithm.h ../../include/IceUtil/ArgVector.h ../../include/IceUtil/Base64.h ../../include/IceUtil/Cache.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/CountDownLatch.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/IceUtil/CtrlCHandler.h ../../include/IceUtil/Functional.h ../../include/IceUtil/InputUtil.h ../../include/IceUtil/Iterator.h ../../include/IceUtil/MD5.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Options.h ../../include/IceUtil/RecMutex.h ../../include/IceUtil/Shared.h ../../include/IceUtil/OutputUtil.h ../../include/IceUtil/RWRecMutex.h ../../include/IceUtil/Thread.h ../../include/IceUtil/Random.h ../../include/IceUtil/ScopedArray.h ../../include/IceUtil/StaticMutex.h ../../include/IceUtil/StringUtil.h ../../include/IceUtil/UUID.h ../../include/IceUtil/Unicode.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/LoggerF.h ../../include/Ice/StreamF.h ../../include/Ice/StatsF.h ../../include/Ice/StringConverter.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionIF.h ../../include/Ice/EndpointIF.h ../../include/Ice/Endpoint.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/OutgoingAsyncF.h ../../include/Ice/Current.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/Stats.h ../../include/Ice/Communicator.h ../../include/Ice/Object.h ../../include/Ice/IncomingAsyncF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ImplicitContextF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/FacetMap.h ../../include/Ice/ServantLocator.h ../../include/Ice/OutgoingAsync.h ../../include/Ice/IncomingAsync.h ../../include/Ice/Incoming.h ../../include/Ice/ServantManagerF.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/Protocol.h ../../include/Ice/Process.h ../../include/Ice/Outgoing.h ../../include/Ice/Direct.h ../../include/Ice/Application.h ../../include/Ice/Connection.h ../../include/Ice/Functional.h ../../include/Ice/Stream.h ../../include/Ice/ImplicitContext.h ../../include/Ice/Locator.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/FactoryTable.h ../../include/Ice/FactoryTableDef.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/ProcessF.h ../../include/Ice/Router.h ../../include/Ice/DispatchInterceptor.h ../../include/Freeze/Freeze.h ../../include/Freeze/Initialize.h ../../include/Freeze/EvictorF.h ../../include/Freeze/ConnectionF.h ../../include/Freeze/Index.h ../../include/Freeze/DB.h ../../include/Freeze/Transaction.h ../../include/Freeze/Evictor.h ../../include/Freeze/Exception.h ../../include/Freeze/Map.h ../../include/Freeze/Connection.h ../../include/Freeze/TransactionHolder.h ../Freeze/ObjectStore.h ../../include/Freeze/EvictorStorage.h ../Freeze/SharedDbEnv.h ../../include/IceUtil/DisableWarnings.h ../Freeze/Util.h ../Freeze/EvictorIteratorI.h ../Freeze/PingObject.h
-EvictorIteratorI$(OBJEXT): EvictorIteratorI.cpp ../Freeze/EvictorIteratorI.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/LoggerF.h ../../include/Ice/StreamF.h ../../include/Ice/StatsF.h ../../include/Ice/StringConverter.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionIF.h ../../include/Ice/EndpointIF.h ../../include/Ice/Endpoint.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/OutgoingAsyncF.h ../../include/Ice/Current.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/Stats.h ../../include/Ice/Communicator.h ../../include/Ice/Object.h ../../include/Ice/IncomingAsyncF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ImplicitContextF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/FacetMap.h ../../include/Ice/ServantLocator.h ../../include/Ice/OutgoingAsync.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/IceUtil/RecMutex.h ../../include/Ice/IncomingAsync.h ../../include/Ice/Incoming.h ../../include/Ice/ServantManagerF.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/Protocol.h ../../include/IceUtil/Unicode.h ../../include/Ice/Process.h ../../include/Ice/Outgoing.h ../../include/Ice/Direct.h ../../include/Ice/Application.h ../../include/Ice/Connection.h ../../include/Ice/Functional.h ../../include/IceUtil/Functional.h ../../include/Ice/Stream.h ../../include/Ice/ImplicitContext.h ../../include/Ice/Locator.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/FactoryTable.h ../../include/Ice/FactoryTableDef.h ../../include/IceUtil/StaticMutex.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/ProcessF.h ../../include/Ice/Router.h ../../include/Ice/DispatchInterceptor.h ../../include/Freeze/Freeze.h ../../include/Freeze/Initialize.h ../../include/Freeze/EvictorF.h ../../include/Freeze/ConnectionF.h ../../include/Freeze/Index.h ../../include/Freeze/DB.h ../../include/Freeze/Transaction.h ../../include/Freeze/Evictor.h ../../include/Freeze/Exception.h ../../include/Freeze/Map.h ../../include/Freeze/Connection.h ../../include/Freeze/TransactionHolder.h ../Freeze/ObjectStore.h ../../include/Freeze/EvictorStorage.h ../../include/IceUtil/Cache.h ../../include/IceUtil/CountDownLatch.h ../Freeze/EvictorI.h ../../include/IceUtil/IceUtil.h ../../include/IceUtil/AbstractMutex.h ../../include/IceUtil/Algorithm.h ../../include/IceUtil/ArgVector.h ../../include/IceUtil/Base64.h ../../include/IceUtil/CtrlCHandler.h ../../include/IceUtil/InputUtil.h ../../include/IceUtil/Iterator.h ../../include/IceUtil/MD5.h ../../include/IceUtil/Options.h ../../include/IceUtil/OutputUtil.h ../../include/IceUtil/RWRecMutex.h ../../include/IceUtil/Thread.h ../../include/IceUtil/Random.h ../../include/IceUtil/ScopedArray.h ../../include/IceUtil/StringUtil.h ../../include/IceUtil/UUID.h ../Freeze/SharedDbEnv.h ../../include/IceUtil/DisableWarnings.h ../Freeze/Util.h
-Evictor$(OBJEXT): Evictor.cpp ../../include/Freeze/Evictor.h ../../include/Ice/LocalObjectF.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionIF.h ../../include/Ice/EndpointIF.h ../../include/Ice/Endpoint.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/OutgoingAsyncF.h ../../include/Ice/Current.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/StreamF.h ../../include/Ice/CommunicatorF.h ../../include/Ice/ServantLocator.h ../../include/Freeze/Exception.h ../../include/Ice/BasicStream.h ../../include/Ice/InstanceF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Buffer.h ../../include/Ice/Protocol.h ../../include/Ice/StringConverter.h ../../include/IceUtil/Unicode.h ../../include/Ice/Object.h ../../include/Ice/IncomingAsyncF.h ../../include/IceUtil/Iterator.h ../../include/IceUtil/ScopedArray.h ../../include/IceUtil/DisableWarnings.h
+EvictorI$(OBJEXT): EvictorI.cpp ../Freeze/EvictorI.h ../../include/IceUtil/IceUtil.h ../../include/IceUtil/Config.h ../../include/IceUtil/AbstractMutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Algorithm.h ../../include/IceUtil/ArgVector.h ../../include/IceUtil/Base64.h ../../include/IceUtil/Cache.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/CountDownLatch.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/IceUtil/CtrlCHandler.h ../../include/IceUtil/Functional.h ../../include/IceUtil/InputUtil.h ../../include/IceUtil/Iterator.h ../../include/IceUtil/MD5.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Options.h ../../include/IceUtil/RecMutex.h ../../include/IceUtil/Shared.h ../../include/IceUtil/OutputUtil.h ../../include/IceUtil/RWRecMutex.h ../../include/IceUtil/Thread.h ../../include/IceUtil/Random.h ../../include/IceUtil/ScopedArray.h ../../include/IceUtil/StaticMutex.h ../../include/IceUtil/StringUtil.h ../../include/IceUtil/UUID.h ../../include/IceUtil/Unicode.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/LoggerF.h ../../include/Ice/StreamF.h ../../include/Ice/StatsF.h ../../include/Ice/StringConverter.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionIF.h ../../include/Ice/EndpointIF.h ../../include/Ice/Endpoint.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/OutgoingAsyncF.h ../../include/Ice/Current.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/Stats.h ../../include/Ice/Communicator.h ../../include/Ice/Object.h ../../include/Ice/IncomingAsyncF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ImplicitContextF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/FacetMap.h ../../include/Ice/ServantLocator.h ../../include/Ice/OutgoingAsync.h ../../include/Ice/IncomingAsync.h ../../include/Ice/Incoming.h ../../include/Ice/ServantManagerF.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/Protocol.h ../../include/Ice/Process.h ../../include/Ice/Outgoing.h ../../include/Ice/Direct.h ../../include/Ice/Application.h ../../include/Ice/Connection.h ../../include/Ice/Functional.h ../../include/Ice/Stream.h ../../include/Ice/ImplicitContext.h ../../include/Ice/Locator.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/FactoryTable.h ../../include/Ice/FactoryTableDef.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/ProcessF.h ../../include/Ice/Router.h ../../include/Ice/DispatchInterceptor.h ../../include/Freeze/Freeze.h ../../include/Freeze/Initialize.h ../../include/Freeze/EvictorF.h ../../include/Freeze/ConnectionF.h ../../include/Freeze/Index.h ../../include/Freeze/DB.h ../../include/Freeze/Transaction.h ../../include/Freeze/BackgroundSaveEvictor.h ../../include/Freeze/Evictor.h ../../include/Freeze/Exception.h ../../include/Freeze/TransactionalEvictor.h ../../include/Freeze/Map.h ../../include/Freeze/Connection.h ../../include/Freeze/TransactionHolder.h ../Freeze/ObjectStore.h ../../include/Freeze/EvictorStorage.h ../Freeze/TransactionI.h ../Freeze/EvictorIteratorI.h ../Freeze/SharedDbEnv.h ../../include/IceUtil/DisableWarnings.h ../Freeze/Util.h ../Freeze/PingObject.h
+EvictorIteratorI$(OBJEXT): EvictorIteratorI.cpp ../Freeze/EvictorIteratorI.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/LoggerF.h ../../include/Ice/StreamF.h ../../include/Ice/StatsF.h ../../include/Ice/StringConverter.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionIF.h ../../include/Ice/EndpointIF.h ../../include/Ice/Endpoint.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/OutgoingAsyncF.h ../../include/Ice/Current.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/Stats.h ../../include/Ice/Communicator.h ../../include/Ice/Object.h ../../include/Ice/IncomingAsyncF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ImplicitContextF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/FacetMap.h ../../include/Ice/ServantLocator.h ../../include/Ice/OutgoingAsync.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/IceUtil/RecMutex.h ../../include/Ice/IncomingAsync.h ../../include/Ice/Incoming.h ../../include/Ice/ServantManagerF.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/Protocol.h ../../include/IceUtil/Unicode.h ../../include/Ice/Process.h ../../include/Ice/Outgoing.h ../../include/Ice/Direct.h ../../include/Ice/Application.h ../../include/Ice/Connection.h ../../include/Ice/Functional.h ../../include/IceUtil/Functional.h ../../include/Ice/Stream.h ../../include/Ice/ImplicitContext.h ../../include/Ice/Locator.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/FactoryTable.h ../../include/Ice/FactoryTableDef.h ../../include/IceUtil/StaticMutex.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/ProcessF.h ../../include/Ice/Router.h ../../include/Ice/DispatchInterceptor.h ../../include/Freeze/Freeze.h ../../include/Freeze/Initialize.h ../../include/Freeze/EvictorF.h ../../include/Freeze/ConnectionF.h ../../include/Freeze/Index.h ../../include/Freeze/DB.h ../../include/Freeze/Transaction.h ../../include/Freeze/BackgroundSaveEvictor.h ../../include/Freeze/Evictor.h ../../include/Freeze/Exception.h ../../include/Freeze/TransactionalEvictor.h ../../include/Freeze/Map.h ../../include/Freeze/Connection.h ../../include/Freeze/TransactionHolder.h ../Freeze/ObjectStore.h ../../include/Freeze/EvictorStorage.h ../Freeze/TransactionI.h ../../include/IceUtil/Cache.h ../../include/IceUtil/CountDownLatch.h ../Freeze/EvictorI.h ../../include/IceUtil/IceUtil.h ../../include/IceUtil/AbstractMutex.h ../../include/IceUtil/Algorithm.h ../../include/IceUtil/ArgVector.h ../../include/IceUtil/Base64.h ../../include/IceUtil/CtrlCHandler.h ../../include/IceUtil/InputUtil.h ../../include/IceUtil/Iterator.h ../../include/IceUtil/MD5.h ../../include/IceUtil/Options.h ../../include/IceUtil/OutputUtil.h ../../include/IceUtil/RWRecMutex.h ../../include/IceUtil/Thread.h ../../include/IceUtil/Random.h ../../include/IceUtil/ScopedArray.h ../../include/IceUtil/StringUtil.h ../../include/IceUtil/UUID.h ../Freeze/SharedDbEnv.h ../../include/IceUtil/DisableWarnings.h ../Freeze/Util.h
EvictorStorage$(OBJEXT): EvictorStorage.cpp ../../include/Freeze/EvictorStorage.h ../../include/Ice/LocalObjectF.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/Identity.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/BasicStream.h ../../include/Ice/InstanceF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Buffer.h ../../include/Ice/Protocol.h ../../include/Ice/StringConverter.h ../../include/IceUtil/Unicode.h ../../include/Ice/Object.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/Ice/IncomingAsyncF.h ../../include/Ice/Current.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ConnectionF.h ../../include/Ice/StreamF.h ../../include/IceUtil/Iterator.h ../../include/IceUtil/ScopedArray.h ../../include/IceUtil/DisableWarnings.h
+Evictor$(OBJEXT): Evictor.cpp ../../include/Freeze/Evictor.h ../../include/Ice/LocalObjectF.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionIF.h ../../include/Ice/EndpointIF.h ../../include/Ice/Endpoint.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/OutgoingAsyncF.h ../../include/Ice/Current.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/StreamF.h ../../include/Ice/CommunicatorF.h ../../include/Ice/ServantLocator.h ../../include/Freeze/Exception.h ../../include/Ice/BasicStream.h ../../include/Ice/InstanceF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Buffer.h ../../include/Ice/Protocol.h ../../include/Ice/StringConverter.h ../../include/IceUtil/Unicode.h ../../include/Ice/Object.h ../../include/Ice/IncomingAsyncF.h ../../include/IceUtil/Iterator.h ../../include/IceUtil/ScopedArray.h ../../include/IceUtil/DisableWarnings.h
Exception$(OBJEXT): Exception.cpp ../../include/Freeze/Exception.h ../../include/Ice/LocalObjectF.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/UndefSysMacros.h ../../include/IceUtil/Iterator.h ../../include/IceUtil/ScopedArray.h ../../include/IceUtil/DisableWarnings.h
-IndexI$(OBJEXT): IndexI.cpp ../Freeze/IndexI.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/LoggerF.h ../../include/Ice/StreamF.h ../../include/Ice/StatsF.h ../../include/Ice/StringConverter.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionIF.h ../../include/Ice/EndpointIF.h ../../include/Ice/Endpoint.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/OutgoingAsyncF.h ../../include/Ice/Current.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/Stats.h ../../include/Ice/Communicator.h ../../include/Ice/Object.h ../../include/Ice/IncomingAsyncF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ImplicitContextF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/FacetMap.h ../../include/Ice/ServantLocator.h ../../include/Ice/OutgoingAsync.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/IceUtil/RecMutex.h ../../include/Ice/IncomingAsync.h ../../include/Ice/Incoming.h ../../include/Ice/ServantManagerF.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/Protocol.h ../../include/IceUtil/Unicode.h ../../include/Ice/Process.h ../../include/Ice/Outgoing.h ../../include/Ice/Direct.h ../../include/Ice/Application.h ../../include/Ice/Connection.h ../../include/Ice/Functional.h ../../include/IceUtil/Functional.h ../../include/Ice/Stream.h ../../include/Ice/ImplicitContext.h ../../include/Ice/Locator.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/FactoryTable.h ../../include/Ice/FactoryTableDef.h ../../include/IceUtil/StaticMutex.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/ProcessF.h ../../include/Ice/Router.h ../../include/Ice/DispatchInterceptor.h ../../include/Freeze/Index.h ../../include/Freeze/DB.h ../Freeze/EvictorI.h ../../include/IceUtil/IceUtil.h ../../include/IceUtil/AbstractMutex.h ../../include/IceUtil/Algorithm.h ../../include/IceUtil/ArgVector.h ../../include/IceUtil/Base64.h ../../include/IceUtil/Cache.h ../../include/IceUtil/CountDownLatch.h ../../include/IceUtil/CtrlCHandler.h ../../include/IceUtil/InputUtil.h ../../include/IceUtil/Iterator.h ../../include/IceUtil/MD5.h ../../include/IceUtil/Options.h ../../include/IceUtil/OutputUtil.h ../../include/IceUtil/RWRecMutex.h ../../include/IceUtil/Thread.h ../../include/IceUtil/Random.h ../../include/IceUtil/ScopedArray.h ../../include/IceUtil/StringUtil.h ../../include/IceUtil/UUID.h ../../include/Freeze/Freeze.h ../../include/Freeze/Initialize.h ../../include/Freeze/EvictorF.h ../../include/Freeze/ConnectionF.h ../../include/Freeze/Transaction.h ../../include/Freeze/Evictor.h ../../include/Freeze/Exception.h ../../include/Freeze/Map.h ../../include/Freeze/Connection.h ../../include/Freeze/TransactionHolder.h ../Freeze/ObjectStore.h ../../include/Freeze/EvictorStorage.h ../Freeze/SharedDbEnv.h ../../include/IceUtil/DisableWarnings.h ../Freeze/Util.h
-Index$(OBJEXT): Index.cpp ../../include/Freeze/Index.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/LoggerF.h ../../include/Ice/StreamF.h ../../include/Ice/StatsF.h ../../include/Ice/StringConverter.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionIF.h ../../include/Ice/EndpointIF.h ../../include/Ice/Endpoint.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/OutgoingAsyncF.h ../../include/Ice/Current.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/Stats.h ../../include/Ice/Communicator.h ../../include/Ice/Object.h ../../include/Ice/IncomingAsyncF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ImplicitContextF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/FacetMap.h ../../include/Ice/ServantLocator.h ../../include/Ice/OutgoingAsync.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/IceUtil/RecMutex.h ../../include/Ice/IncomingAsync.h ../../include/Ice/Incoming.h ../../include/Ice/ServantManagerF.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/Protocol.h ../../include/IceUtil/Unicode.h ../../include/Ice/Process.h ../../include/Ice/Outgoing.h ../../include/Ice/Direct.h ../../include/Ice/Application.h ../../include/Ice/Connection.h ../../include/Ice/Functional.h ../../include/IceUtil/Functional.h ../../include/Ice/Stream.h ../../include/Ice/ImplicitContext.h ../../include/Ice/Locator.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/FactoryTable.h ../../include/Ice/FactoryTableDef.h ../../include/IceUtil/StaticMutex.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/ProcessF.h ../../include/Ice/Router.h ../../include/Ice/DispatchInterceptor.h ../../include/Freeze/DB.h ../Freeze/IndexI.h ../Freeze/EvictorI.h ../../include/IceUtil/IceUtil.h ../../include/IceUtil/AbstractMutex.h ../../include/IceUtil/Algorithm.h ../../include/IceUtil/ArgVector.h ../../include/IceUtil/Base64.h ../../include/IceUtil/Cache.h ../../include/IceUtil/CountDownLatch.h ../../include/IceUtil/CtrlCHandler.h ../../include/IceUtil/InputUtil.h ../../include/IceUtil/Iterator.h ../../include/IceUtil/MD5.h ../../include/IceUtil/Options.h ../../include/IceUtil/OutputUtil.h ../../include/IceUtil/RWRecMutex.h ../../include/IceUtil/Thread.h ../../include/IceUtil/Random.h ../../include/IceUtil/ScopedArray.h ../../include/IceUtil/StringUtil.h ../../include/IceUtil/UUID.h ../../include/Freeze/Freeze.h ../../include/Freeze/Initialize.h ../../include/Freeze/EvictorF.h ../../include/Freeze/ConnectionF.h ../../include/Freeze/Transaction.h ../../include/Freeze/Evictor.h ../../include/Freeze/Exception.h ../../include/Freeze/Map.h ../../include/Freeze/Connection.h ../../include/Freeze/TransactionHolder.h ../Freeze/ObjectStore.h ../../include/Freeze/EvictorStorage.h ../Freeze/SharedDbEnv.h ../../include/IceUtil/DisableWarnings.h
+IndexI$(OBJEXT): IndexI.cpp ../Freeze/IndexI.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/LoggerF.h ../../include/Ice/StreamF.h ../../include/Ice/StatsF.h ../../include/Ice/StringConverter.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionIF.h ../../include/Ice/EndpointIF.h ../../include/Ice/Endpoint.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/OutgoingAsyncF.h ../../include/Ice/Current.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/Stats.h ../../include/Ice/Communicator.h ../../include/Ice/Object.h ../../include/Ice/IncomingAsyncF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ImplicitContextF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/FacetMap.h ../../include/Ice/ServantLocator.h ../../include/Ice/OutgoingAsync.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/IceUtil/RecMutex.h ../../include/Ice/IncomingAsync.h ../../include/Ice/Incoming.h ../../include/Ice/ServantManagerF.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/Protocol.h ../../include/IceUtil/Unicode.h ../../include/Ice/Process.h ../../include/Ice/Outgoing.h ../../include/Ice/Direct.h ../../include/Ice/Application.h ../../include/Ice/Connection.h ../../include/Ice/Functional.h ../../include/IceUtil/Functional.h ../../include/Ice/Stream.h ../../include/Ice/ImplicitContext.h ../../include/Ice/Locator.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/FactoryTable.h ../../include/Ice/FactoryTableDef.h ../../include/IceUtil/StaticMutex.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/ProcessF.h ../../include/Ice/Router.h ../../include/Ice/DispatchInterceptor.h ../../include/Freeze/Index.h ../../include/Freeze/DB.h ../Freeze/EvictorI.h ../../include/IceUtil/IceUtil.h ../../include/IceUtil/AbstractMutex.h ../../include/IceUtil/Algorithm.h ../../include/IceUtil/ArgVector.h ../../include/IceUtil/Base64.h ../../include/IceUtil/Cache.h ../../include/IceUtil/CountDownLatch.h ../../include/IceUtil/CtrlCHandler.h ../../include/IceUtil/InputUtil.h ../../include/IceUtil/Iterator.h ../../include/IceUtil/MD5.h ../../include/IceUtil/Options.h ../../include/IceUtil/OutputUtil.h ../../include/IceUtil/RWRecMutex.h ../../include/IceUtil/Thread.h ../../include/IceUtil/Random.h ../../include/IceUtil/ScopedArray.h ../../include/IceUtil/StringUtil.h ../../include/IceUtil/UUID.h ../../include/Freeze/Freeze.h ../../include/Freeze/Initialize.h ../../include/Freeze/EvictorF.h ../../include/Freeze/ConnectionF.h ../../include/Freeze/Transaction.h ../../include/Freeze/BackgroundSaveEvictor.h ../../include/Freeze/Evictor.h ../../include/Freeze/Exception.h ../../include/Freeze/TransactionalEvictor.h ../../include/Freeze/Map.h ../../include/Freeze/Connection.h ../../include/Freeze/TransactionHolder.h ../Freeze/ObjectStore.h ../../include/Freeze/EvictorStorage.h ../Freeze/TransactionI.h ../Freeze/EvictorIteratorI.h ../Freeze/SharedDbEnv.h ../../include/IceUtil/DisableWarnings.h ../Freeze/Util.h
+Index$(OBJEXT): Index.cpp ../../include/Freeze/Index.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/LoggerF.h ../../include/Ice/StreamF.h ../../include/Ice/StatsF.h ../../include/Ice/StringConverter.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionIF.h ../../include/Ice/EndpointIF.h ../../include/Ice/Endpoint.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/OutgoingAsyncF.h ../../include/Ice/Current.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/Stats.h ../../include/Ice/Communicator.h ../../include/Ice/Object.h ../../include/Ice/IncomingAsyncF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ImplicitContextF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/FacetMap.h ../../include/Ice/ServantLocator.h ../../include/Ice/OutgoingAsync.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/IceUtil/RecMutex.h ../../include/Ice/IncomingAsync.h ../../include/Ice/Incoming.h ../../include/Ice/ServantManagerF.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/Protocol.h ../../include/IceUtil/Unicode.h ../../include/Ice/Process.h ../../include/Ice/Outgoing.h ../../include/Ice/Direct.h ../../include/Ice/Application.h ../../include/Ice/Connection.h ../../include/Ice/Functional.h ../../include/IceUtil/Functional.h ../../include/Ice/Stream.h ../../include/Ice/ImplicitContext.h ../../include/Ice/Locator.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/FactoryTable.h ../../include/Ice/FactoryTableDef.h ../../include/IceUtil/StaticMutex.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/ProcessF.h ../../include/Ice/Router.h ../../include/Ice/DispatchInterceptor.h ../../include/Freeze/DB.h ../Freeze/IndexI.h ../Freeze/EvictorI.h ../../include/IceUtil/IceUtil.h ../../include/IceUtil/AbstractMutex.h ../../include/IceUtil/Algorithm.h ../../include/IceUtil/ArgVector.h ../../include/IceUtil/Base64.h ../../include/IceUtil/Cache.h ../../include/IceUtil/CountDownLatch.h ../../include/IceUtil/CtrlCHandler.h ../../include/IceUtil/InputUtil.h ../../include/IceUtil/Iterator.h ../../include/IceUtil/MD5.h ../../include/IceUtil/Options.h ../../include/IceUtil/OutputUtil.h ../../include/IceUtil/RWRecMutex.h ../../include/IceUtil/Thread.h ../../include/IceUtil/Random.h ../../include/IceUtil/ScopedArray.h ../../include/IceUtil/StringUtil.h ../../include/IceUtil/UUID.h ../../include/Freeze/Freeze.h ../../include/Freeze/Initialize.h ../../include/Freeze/EvictorF.h ../../include/Freeze/ConnectionF.h ../../include/Freeze/Transaction.h ../../include/Freeze/BackgroundSaveEvictor.h ../../include/Freeze/Evictor.h ../../include/Freeze/Exception.h ../../include/Freeze/TransactionalEvictor.h ../../include/Freeze/Map.h ../../include/Freeze/Connection.h ../../include/Freeze/TransactionHolder.h ../Freeze/ObjectStore.h ../../include/Freeze/EvictorStorage.h ../Freeze/TransactionI.h ../Freeze/EvictorIteratorI.h ../Freeze/SharedDbEnv.h ../../include/IceUtil/DisableWarnings.h
MapI$(OBJEXT): MapI.cpp ../Freeze/MapI.h ../../include/Freeze/Map.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/LoggerF.h ../../include/Ice/StreamF.h ../../include/Ice/StatsF.h ../../include/Ice/StringConverter.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionIF.h ../../include/Ice/EndpointIF.h ../../include/Ice/Endpoint.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/OutgoingAsyncF.h ../../include/Ice/Current.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/Stats.h ../../include/Ice/Communicator.h ../../include/Ice/Object.h ../../include/Ice/IncomingAsyncF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ImplicitContextF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/FacetMap.h ../../include/Ice/ServantLocator.h ../../include/Ice/OutgoingAsync.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/IceUtil/RecMutex.h ../../include/Ice/IncomingAsync.h ../../include/Ice/Incoming.h ../../include/Ice/ServantManagerF.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/Protocol.h ../../include/IceUtil/Unicode.h ../../include/Ice/Process.h ../../include/Ice/Outgoing.h ../../include/Ice/Direct.h ../../include/Ice/Application.h ../../include/Ice/Connection.h ../../include/Ice/Functional.h ../../include/IceUtil/Functional.h ../../include/Ice/Stream.h ../../include/Ice/ImplicitContext.h ../../include/Ice/Locator.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/FactoryTable.h ../../include/Ice/FactoryTableDef.h ../../include/IceUtil/StaticMutex.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/ProcessF.h ../../include/Ice/Router.h ../../include/Ice/DispatchInterceptor.h ../../include/Freeze/DB.h ../../include/Freeze/Exception.h ../../include/Freeze/Connection.h ../../include/Freeze/Transaction.h ../Freeze/SharedDb.h ../Freeze/ConnectionI.h ../../include/Freeze/Initialize.h ../../include/Freeze/EvictorF.h ../../include/Freeze/ConnectionF.h ../../include/Freeze/Index.h ../Freeze/TransactionI.h ../Freeze/SharedDbEnv.h ../Freeze/Util.h ../../include/Freeze/Catalog.h ../../include/Freeze/CatalogData.h
-ObjectStore$(OBJEXT): ObjectStore.cpp ../Freeze/ObjectStore.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/LoggerF.h ../../include/Ice/StreamF.h ../../include/Ice/StatsF.h ../../include/Ice/StringConverter.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionIF.h ../../include/Ice/EndpointIF.h ../../include/Ice/Endpoint.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/OutgoingAsyncF.h ../../include/Ice/Current.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/Stats.h ../../include/Ice/Communicator.h ../../include/Ice/Object.h ../../include/Ice/IncomingAsyncF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ImplicitContextF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/FacetMap.h ../../include/Ice/ServantLocator.h ../../include/Ice/OutgoingAsync.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/IceUtil/RecMutex.h ../../include/Ice/IncomingAsync.h ../../include/Ice/Incoming.h ../../include/Ice/ServantManagerF.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/Protocol.h ../../include/IceUtil/Unicode.h ../../include/Ice/Process.h ../../include/Ice/Outgoing.h ../../include/Ice/Direct.h ../../include/Ice/Application.h ../../include/Ice/Connection.h ../../include/Ice/Functional.h ../../include/IceUtil/Functional.h ../../include/Ice/Stream.h ../../include/Ice/ImplicitContext.h ../../include/Ice/Locator.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/FactoryTable.h ../../include/Ice/FactoryTableDef.h ../../include/IceUtil/StaticMutex.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/ProcessF.h ../../include/Ice/Router.h ../../include/Ice/DispatchInterceptor.h ../../include/Freeze/DB.h ../../include/Freeze/EvictorStorage.h ../../include/Freeze/Index.h ../../include/IceUtil/Cache.h ../../include/IceUtil/CountDownLatch.h ../Freeze/EvictorI.h ../../include/IceUtil/IceUtil.h ../../include/IceUtil/AbstractMutex.h ../../include/IceUtil/Algorithm.h ../../include/IceUtil/ArgVector.h ../../include/IceUtil/Base64.h ../../include/IceUtil/CtrlCHandler.h ../../include/IceUtil/InputUtil.h ../../include/IceUtil/Iterator.h ../../include/IceUtil/MD5.h ../../include/IceUtil/Options.h ../../include/IceUtil/OutputUtil.h ../../include/IceUtil/RWRecMutex.h ../../include/IceUtil/Thread.h ../../include/IceUtil/Random.h ../../include/IceUtil/ScopedArray.h ../../include/IceUtil/StringUtil.h ../../include/IceUtil/UUID.h ../../include/Freeze/Freeze.h ../../include/Freeze/Initialize.h ../../include/Freeze/EvictorF.h ../../include/Freeze/ConnectionF.h ../../include/Freeze/Transaction.h ../../include/Freeze/Evictor.h ../../include/Freeze/Exception.h ../../include/Freeze/Map.h ../../include/Freeze/Connection.h ../../include/Freeze/TransactionHolder.h ../Freeze/SharedDbEnv.h ../../include/IceUtil/DisableWarnings.h ../Freeze/Util.h ../Freeze/IndexI.h ../../include/Freeze/Catalog.h ../../include/Freeze/CatalogData.h ../Freeze/TransactionI.h
+ObjectStore$(OBJEXT): ObjectStore.cpp ../Freeze/ObjectStore.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/LoggerF.h ../../include/Ice/StreamF.h ../../include/Ice/StatsF.h ../../include/Ice/StringConverter.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionIF.h ../../include/Ice/EndpointIF.h ../../include/Ice/Endpoint.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/OutgoingAsyncF.h ../../include/Ice/Current.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/Stats.h ../../include/Ice/Communicator.h ../../include/Ice/Object.h ../../include/Ice/IncomingAsyncF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ImplicitContextF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/FacetMap.h ../../include/Ice/ServantLocator.h ../../include/Ice/OutgoingAsync.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/IceUtil/RecMutex.h ../../include/Ice/IncomingAsync.h ../../include/Ice/Incoming.h ../../include/Ice/ServantManagerF.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/Protocol.h ../../include/IceUtil/Unicode.h ../../include/Ice/Process.h ../../include/Ice/Outgoing.h ../../include/Ice/Direct.h ../../include/Ice/Application.h ../../include/Ice/Connection.h ../../include/Ice/Functional.h ../../include/IceUtil/Functional.h ../../include/Ice/Stream.h ../../include/Ice/ImplicitContext.h ../../include/Ice/Locator.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/FactoryTable.h ../../include/Ice/FactoryTableDef.h ../../include/IceUtil/StaticMutex.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/ProcessF.h ../../include/Ice/Router.h ../../include/Ice/DispatchInterceptor.h ../../include/Freeze/DB.h ../../include/Freeze/EvictorStorage.h ../../include/Freeze/Index.h ../Freeze/TransactionI.h ../../include/Freeze/Transaction.h ../../include/IceUtil/Cache.h ../../include/IceUtil/CountDownLatch.h ../Freeze/EvictorI.h ../../include/IceUtil/IceUtil.h ../../include/IceUtil/AbstractMutex.h ../../include/IceUtil/Algorithm.h ../../include/IceUtil/ArgVector.h ../../include/IceUtil/Base64.h ../../include/IceUtil/CtrlCHandler.h ../../include/IceUtil/InputUtil.h ../../include/IceUtil/Iterator.h ../../include/IceUtil/MD5.h ../../include/IceUtil/Options.h ../../include/IceUtil/OutputUtil.h ../../include/IceUtil/RWRecMutex.h ../../include/IceUtil/Thread.h ../../include/IceUtil/Random.h ../../include/IceUtil/ScopedArray.h ../../include/IceUtil/StringUtil.h ../../include/IceUtil/UUID.h ../../include/Freeze/Freeze.h ../../include/Freeze/Initialize.h ../../include/Freeze/EvictorF.h ../../include/Freeze/ConnectionF.h ../../include/Freeze/BackgroundSaveEvictor.h ../../include/Freeze/Evictor.h ../../include/Freeze/Exception.h ../../include/Freeze/TransactionalEvictor.h ../../include/Freeze/Map.h ../../include/Freeze/Connection.h ../../include/Freeze/TransactionHolder.h ../Freeze/EvictorIteratorI.h ../Freeze/SharedDbEnv.h ../../include/IceUtil/DisableWarnings.h ../Freeze/BackgroundSaveEvictorI.h ../Freeze/Util.h ../../include/Freeze/Catalog.h ../../include/Freeze/CatalogData.h ../Freeze/IndexI.h
PingObject$(OBJEXT): PingObject.cpp ../Freeze/PingObject.h ../../include/Ice/LocalObjectF.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionIF.h ../../include/Ice/EndpointIF.h ../../include/Ice/Endpoint.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/OutgoingAsyncF.h ../../include/Ice/Current.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/StreamF.h ../../include/Ice/CommunicatorF.h ../../include/Ice/Object.h ../../include/Ice/IncomingAsyncF.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/Ice/BasicStream.h ../../include/Ice/InstanceF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Buffer.h ../../include/Ice/Protocol.h ../../include/Ice/StringConverter.h ../../include/IceUtil/Unicode.h ../../include/Ice/Incoming.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/ServantManagerF.h ../../include/Ice/Direct.h ../../include/Ice/FactoryTable.h ../../include/Ice/FactoryTableDef.h ../../include/IceUtil/StaticMutex.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/LocalException.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/ObjectFactory.h ../../include/IceUtil/Iterator.h ../../include/IceUtil/ScopedArray.h ../../include/IceUtil/DisableWarnings.h
-SharedDbEnv$(OBJEXT): SharedDbEnv.cpp ../Freeze/SharedDbEnv.h ../../include/Ice/Config.h ../../include/IceUtil/Config.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/IceUtil/Shared.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/LoggerF.h ../../include/Ice/StreamF.h ../../include/Ice/StatsF.h ../../include/Ice/StringConverter.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionIF.h ../../include/Ice/EndpointIF.h ../../include/Ice/Endpoint.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/OutgoingAsyncF.h ../../include/Ice/Current.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/Stats.h ../../include/Ice/Communicator.h ../../include/Ice/Object.h ../../include/Ice/IncomingAsyncF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ImplicitContextF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/FacetMap.h ../../include/Ice/ServantLocator.h ../../include/Ice/OutgoingAsync.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/IceUtil/RecMutex.h ../../include/Ice/IncomingAsync.h ../../include/Ice/Incoming.h ../../include/Ice/ServantManagerF.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/Protocol.h ../../include/IceUtil/Unicode.h ../../include/Ice/Process.h ../../include/Ice/Outgoing.h ../../include/Ice/Direct.h ../../include/Ice/Application.h ../../include/Ice/Connection.h ../../include/Ice/Functional.h ../../include/IceUtil/Functional.h ../../include/Ice/Stream.h ../../include/Ice/ImplicitContext.h ../../include/Ice/Locator.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/FactoryTable.h ../../include/Ice/FactoryTableDef.h ../../include/IceUtil/StaticMutex.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/ProcessF.h ../../include/Ice/Router.h ../../include/Ice/DispatchInterceptor.h ../../include/IceUtil/Thread.h ../../include/Freeze/Exception.h ../Freeze/Util.h ../../include/Freeze/DB.h ../Freeze/SharedDb.h ../Freeze/ConnectionI.h ../../include/Freeze/Connection.h ../../include/Freeze/Transaction.h ../../include/Freeze/Initialize.h ../../include/Freeze/EvictorF.h ../../include/Freeze/ConnectionF.h ../../include/Freeze/Index.h ../Freeze/TransactionI.h ../../include/Freeze/Map.h
+SharedDbEnv$(OBJEXT): SharedDbEnv.cpp ../Freeze/SharedDbEnv.h ../../include/Ice/Config.h ../../include/IceUtil/Config.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/IceUtil/Shared.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/LoggerF.h ../../include/Ice/StreamF.h ../../include/Ice/StatsF.h ../../include/Ice/StringConverter.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionIF.h ../../include/Ice/EndpointIF.h ../../include/Ice/Endpoint.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/OutgoingAsyncF.h ../../include/Ice/Current.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/Stats.h ../../include/Ice/Communicator.h ../../include/Ice/Object.h ../../include/Ice/IncomingAsyncF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ImplicitContextF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/FacetMap.h ../../include/Ice/ServantLocator.h ../../include/Ice/OutgoingAsync.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/IceUtil/RecMutex.h ../../include/Ice/IncomingAsync.h ../../include/Ice/Incoming.h ../../include/Ice/ServantManagerF.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/Protocol.h ../../include/IceUtil/Unicode.h ../../include/Ice/Process.h ../../include/Ice/Outgoing.h ../../include/Ice/Direct.h ../../include/Ice/Application.h ../../include/Ice/Connection.h ../../include/Ice/Functional.h ../../include/IceUtil/Functional.h ../../include/Ice/Stream.h ../../include/Ice/ImplicitContext.h ../../include/Ice/Locator.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/FactoryTable.h ../../include/Ice/FactoryTableDef.h ../../include/IceUtil/StaticMutex.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/ProcessF.h ../../include/Ice/Router.h ../../include/Ice/DispatchInterceptor.h ../../include/Freeze/Exception.h ../Freeze/Util.h ../../include/Freeze/DB.h ../Freeze/SharedDb.h ../Freeze/ConnectionI.h ../../include/Freeze/Connection.h ../../include/Freeze/Transaction.h ../../include/Freeze/Initialize.h ../../include/Freeze/EvictorF.h ../../include/Freeze/ConnectionF.h ../../include/Freeze/Index.h ../Freeze/TransactionI.h ../../include/Freeze/Map.h ../Freeze/TransactionalEvictorContextI.h ../../include/Freeze/TransactionalEvictor.h ../../include/Freeze/Evictor.h ../../include/Freeze/EvictorStorage.h ../Freeze/EvictorI.h ../../include/IceUtil/IceUtil.h ../../include/IceUtil/AbstractMutex.h ../../include/IceUtil/Algorithm.h ../../include/IceUtil/ArgVector.h ../../include/IceUtil/Base64.h ../../include/IceUtil/Cache.h ../../include/IceUtil/CountDownLatch.h ../../include/IceUtil/CtrlCHandler.h ../../include/IceUtil/InputUtil.h ../../include/IceUtil/Iterator.h ../../include/IceUtil/MD5.h ../../include/IceUtil/Options.h ../../include/IceUtil/OutputUtil.h ../../include/IceUtil/RWRecMutex.h ../../include/IceUtil/Thread.h ../../include/IceUtil/Random.h ../../include/IceUtil/ScopedArray.h ../../include/IceUtil/StringUtil.h ../../include/IceUtil/UUID.h ../../include/Freeze/Freeze.h ../../include/Freeze/BackgroundSaveEvictor.h ../../include/Freeze/TransactionHolder.h ../Freeze/ObjectStore.h ../Freeze/EvictorIteratorI.h ../../include/IceUtil/DisableWarnings.h
SharedDb$(OBJEXT): SharedDb.cpp ../Freeze/SharedDb.h ../../include/IceUtil/Config.h ../Freeze/ConnectionI.h ../../include/Freeze/Connection.h ../../include/Ice/LocalObjectF.h ../../include/IceUtil/Shared.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Freeze/Transaction.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/CommunicatorF.h ../../include/Freeze/Initialize.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/LoggerF.h ../../include/Ice/StreamF.h ../../include/Ice/StatsF.h ../../include/Ice/StringConverter.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionIF.h ../../include/Ice/EndpointIF.h ../../include/Ice/Endpoint.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/OutgoingAsyncF.h ../../include/Ice/Current.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/Stats.h ../../include/Ice/Communicator.h ../../include/Ice/Object.h ../../include/Ice/IncomingAsyncF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ImplicitContextF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/FacetMap.h ../../include/Ice/ServantLocator.h ../../include/Ice/OutgoingAsync.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/IceUtil/RecMutex.h ../../include/Ice/IncomingAsync.h ../../include/Ice/Incoming.h ../../include/Ice/ServantManagerF.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/Protocol.h ../../include/IceUtil/Unicode.h ../../include/Ice/Process.h ../../include/Ice/Outgoing.h ../../include/Ice/Direct.h ../../include/Ice/Application.h ../../include/Ice/Connection.h ../../include/Ice/Functional.h ../../include/IceUtil/Functional.h ../../include/Ice/Stream.h ../../include/Ice/ImplicitContext.h ../../include/Ice/Locator.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/FactoryTable.h ../../include/Ice/FactoryTableDef.h ../../include/IceUtil/StaticMutex.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/ProcessF.h ../../include/Ice/Router.h ../../include/Ice/DispatchInterceptor.h ../../include/Freeze/EvictorF.h ../../include/Freeze/ConnectionF.h ../../include/Freeze/Index.h ../../include/Freeze/DB.h ../Freeze/TransactionI.h ../Freeze/SharedDbEnv.h ../../include/Freeze/Map.h ../../include/Freeze/Exception.h ../Freeze/Util.h ../../include/Freeze/Catalog.h ../../include/Freeze/CatalogData.h
+TransactionalEvictor$(OBJEXT): TransactionalEvictor.cpp ../../include/Freeze/TransactionalEvictor.h ../../include/Ice/LocalObjectF.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionIF.h ../../include/Ice/EndpointIF.h ../../include/Ice/Endpoint.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/OutgoingAsyncF.h ../../include/Ice/Current.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/StreamF.h ../../include/Ice/CommunicatorF.h ../../include/Freeze/Evictor.h ../../include/Ice/ServantLocator.h ../../include/Freeze/Exception.h ../../include/Ice/BasicStream.h ../../include/Ice/InstanceF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Buffer.h ../../include/Ice/Protocol.h ../../include/Ice/StringConverter.h ../../include/IceUtil/Unicode.h ../../include/Ice/Object.h ../../include/Ice/IncomingAsyncF.h ../../include/IceUtil/Iterator.h ../../include/IceUtil/ScopedArray.h ../../include/IceUtil/DisableWarnings.h
+TransactionalEvictorI$(OBJEXT): TransactionalEvictorI.cpp ../Freeze/TransactionalEvictorI.h ../Freeze/EvictorI.h ../../include/IceUtil/IceUtil.h ../../include/IceUtil/Config.h ../../include/IceUtil/AbstractMutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Algorithm.h ../../include/IceUtil/ArgVector.h ../../include/IceUtil/Base64.h ../../include/IceUtil/Cache.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/CountDownLatch.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/IceUtil/CtrlCHandler.h ../../include/IceUtil/Functional.h ../../include/IceUtil/InputUtil.h ../../include/IceUtil/Iterator.h ../../include/IceUtil/MD5.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Options.h ../../include/IceUtil/RecMutex.h ../../include/IceUtil/Shared.h ../../include/IceUtil/OutputUtil.h ../../include/IceUtil/RWRecMutex.h ../../include/IceUtil/Thread.h ../../include/IceUtil/Random.h ../../include/IceUtil/ScopedArray.h ../../include/IceUtil/StaticMutex.h ../../include/IceUtil/StringUtil.h ../../include/IceUtil/UUID.h ../../include/IceUtil/Unicode.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/LoggerF.h ../../include/Ice/StreamF.h ../../include/Ice/StatsF.h ../../include/Ice/StringConverter.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionIF.h ../../include/Ice/EndpointIF.h ../../include/Ice/Endpoint.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/OutgoingAsyncF.h ../../include/Ice/Current.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/Stats.h ../../include/Ice/Communicator.h ../../include/Ice/Object.h ../../include/Ice/IncomingAsyncF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ImplicitContextF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/FacetMap.h ../../include/Ice/ServantLocator.h ../../include/Ice/OutgoingAsync.h ../../include/Ice/IncomingAsync.h ../../include/Ice/Incoming.h ../../include/Ice/ServantManagerF.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/Protocol.h ../../include/Ice/Process.h ../../include/Ice/Outgoing.h ../../include/Ice/Direct.h ../../include/Ice/Application.h ../../include/Ice/Connection.h ../../include/Ice/Functional.h ../../include/Ice/Stream.h ../../include/Ice/ImplicitContext.h ../../include/Ice/Locator.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/FactoryTable.h ../../include/Ice/FactoryTableDef.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/ProcessF.h ../../include/Ice/Router.h ../../include/Ice/DispatchInterceptor.h ../../include/Freeze/Freeze.h ../../include/Freeze/Initialize.h ../../include/Freeze/EvictorF.h ../../include/Freeze/ConnectionF.h ../../include/Freeze/Index.h ../../include/Freeze/DB.h ../../include/Freeze/Transaction.h ../../include/Freeze/BackgroundSaveEvictor.h ../../include/Freeze/Evictor.h ../../include/Freeze/Exception.h ../../include/Freeze/TransactionalEvictor.h ../../include/Freeze/Map.h ../../include/Freeze/Connection.h ../../include/Freeze/TransactionHolder.h ../Freeze/ObjectStore.h ../../include/Freeze/EvictorStorage.h ../Freeze/TransactionI.h ../Freeze/EvictorIteratorI.h ../Freeze/SharedDbEnv.h ../../include/IceUtil/DisableWarnings.h ../Freeze/Util.h ../Freeze/TransactionalEvictorContextI.h
+TransactionalEvictorContextI$(OBJEXT): TransactionalEvictorContextI.cpp ../Freeze/TransactionalEvictorContextI.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/LoggerF.h ../../include/Ice/StreamF.h ../../include/Ice/StatsF.h ../../include/Ice/StringConverter.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionIF.h ../../include/Ice/EndpointIF.h ../../include/Ice/Endpoint.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/OutgoingAsyncF.h ../../include/Ice/Current.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/Stats.h ../../include/Ice/Communicator.h ../../include/Ice/Object.h ../../include/Ice/IncomingAsyncF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ImplicitContextF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/FacetMap.h ../../include/Ice/ServantLocator.h ../../include/Ice/OutgoingAsync.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/IceUtil/RecMutex.h ../../include/Ice/IncomingAsync.h ../../include/Ice/Incoming.h ../../include/Ice/ServantManagerF.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/Protocol.h ../../include/IceUtil/Unicode.h ../../include/Ice/Process.h ../../include/Ice/Outgoing.h ../../include/Ice/Direct.h ../../include/Ice/Application.h ../../include/Ice/Connection.h ../../include/Ice/Functional.h ../../include/IceUtil/Functional.h ../../include/Ice/Stream.h ../../include/Ice/ImplicitContext.h ../../include/Ice/Locator.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/FactoryTable.h ../../include/Ice/FactoryTableDef.h ../../include/IceUtil/StaticMutex.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/ProcessF.h ../../include/Ice/Router.h ../../include/Ice/DispatchInterceptor.h ../../include/Freeze/TransactionalEvictor.h ../../include/Freeze/Evictor.h ../../include/Freeze/Exception.h ../../include/Freeze/EvictorStorage.h ../Freeze/EvictorI.h ../../include/IceUtil/IceUtil.h ../../include/IceUtil/AbstractMutex.h ../../include/IceUtil/Algorithm.h ../../include/IceUtil/ArgVector.h ../../include/IceUtil/Base64.h ../../include/IceUtil/Cache.h ../../include/IceUtil/CountDownLatch.h ../../include/IceUtil/CtrlCHandler.h ../../include/IceUtil/InputUtil.h ../../include/IceUtil/Iterator.h ../../include/IceUtil/MD5.h ../../include/IceUtil/Options.h ../../include/IceUtil/OutputUtil.h ../../include/IceUtil/RWRecMutex.h ../../include/IceUtil/Thread.h ../../include/IceUtil/Random.h ../../include/IceUtil/ScopedArray.h ../../include/IceUtil/StringUtil.h ../../include/IceUtil/UUID.h ../../include/Freeze/Freeze.h ../../include/Freeze/Initialize.h ../../include/Freeze/EvictorF.h ../../include/Freeze/ConnectionF.h ../../include/Freeze/Index.h ../../include/Freeze/DB.h ../../include/Freeze/Transaction.h ../../include/Freeze/BackgroundSaveEvictor.h ../../include/Freeze/Map.h ../../include/Freeze/Connection.h ../../include/Freeze/TransactionHolder.h ../Freeze/ObjectStore.h ../Freeze/TransactionI.h ../Freeze/EvictorIteratorI.h ../Freeze/SharedDbEnv.h ../../include/IceUtil/DisableWarnings.h ../Freeze/TransactionalEvictorI.h ../Freeze/Util.h ../Freeze/ConnectionI.h
TransactionHolder$(OBJEXT): TransactionHolder.cpp ../../include/Freeze/TransactionHolder.h ../../include/Freeze/Connection.h ../../include/Ice/LocalObjectF.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Freeze/Transaction.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/CommunicatorF.h
TransactionI$(OBJEXT): TransactionI.cpp ../Freeze/TransactionI.h ../../include/Freeze/Transaction.h ../../include/Ice/LocalObjectF.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/UndefSysMacros.h ../Freeze/ConnectionI.h ../../include/Freeze/Connection.h ../../include/Ice/CommunicatorF.h ../../include/Freeze/Initialize.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/LoggerF.h ../../include/Ice/StreamF.h ../../include/Ice/StatsF.h ../../include/Ice/StringConverter.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionIF.h ../../include/Ice/EndpointIF.h ../../include/Ice/Endpoint.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/OutgoingAsyncF.h ../../include/Ice/Current.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/Stats.h ../../include/Ice/Communicator.h ../../include/Ice/Object.h ../../include/Ice/IncomingAsyncF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ImplicitContextF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/FacetMap.h ../../include/Ice/ServantLocator.h ../../include/Ice/OutgoingAsync.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/IceUtil/RecMutex.h ../../include/Ice/IncomingAsync.h ../../include/Ice/Incoming.h ../../include/Ice/ServantManagerF.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/Protocol.h ../../include/IceUtil/Unicode.h ../../include/Ice/Process.h ../../include/Ice/Outgoing.h ../../include/Ice/Direct.h ../../include/Ice/Application.h ../../include/Ice/Connection.h ../../include/Ice/Functional.h ../../include/IceUtil/Functional.h ../../include/Ice/Stream.h ../../include/Ice/ImplicitContext.h ../../include/Ice/Locator.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/FactoryTable.h ../../include/Ice/FactoryTableDef.h ../../include/IceUtil/StaticMutex.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/ProcessF.h ../../include/Ice/Router.h ../../include/Ice/DispatchInterceptor.h ../../include/Freeze/EvictorF.h ../../include/Freeze/ConnectionF.h ../../include/Freeze/Index.h ../../include/Freeze/DB.h ../Freeze/SharedDbEnv.h ../../include/Freeze/Exception.h
Transaction$(OBJEXT): Transaction.cpp ../../include/Freeze/Transaction.h ../../include/Ice/LocalObjectF.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/UndefSysMacros.h ../../include/IceUtil/Iterator.h ../../include/IceUtil/ScopedArray.h ../../include/IceUtil/DisableWarnings.h
Util$(OBJEXT): Util.cpp ../Freeze/Util.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ProxyF.h ../../include/Ice/ObjectF.h ../../include/Ice/GCCountMap.h ../../include/Ice/GCShared.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/LoggerF.h ../../include/Ice/StreamF.h ../../include/Ice/StatsF.h ../../include/Ice/StringConverter.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionIF.h ../../include/Ice/EndpointIF.h ../../include/Ice/Endpoint.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/OutgoingAsyncF.h ../../include/Ice/Current.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/Stats.h ../../include/Ice/Communicator.h ../../include/Ice/Object.h ../../include/Ice/IncomingAsyncF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ImplicitContextF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/FacetMap.h ../../include/Ice/ServantLocator.h ../../include/Ice/OutgoingAsync.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/IceUtil/RecMutex.h ../../include/Ice/IncomingAsync.h ../../include/Ice/Incoming.h ../../include/Ice/ServantManagerF.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/Protocol.h ../../include/IceUtil/Unicode.h ../../include/Ice/Process.h ../../include/Ice/Outgoing.h ../../include/Ice/Direct.h ../../include/Ice/Application.h ../../include/Ice/Connection.h ../../include/Ice/Functional.h ../../include/IceUtil/Functional.h ../../include/Ice/Stream.h ../../include/Ice/ImplicitContext.h ../../include/Ice/Locator.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/FactoryTable.h ../../include/Ice/FactoryTableDef.h ../../include/IceUtil/StaticMutex.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/ProcessF.h ../../include/Ice/Router.h ../../include/Ice/DispatchInterceptor.h ../../include/Freeze/DB.h ../../include/Freeze/Exception.h
+BackgroundSaveEvictor.cpp: ../../slice/Freeze/BackgroundSaveEvictor.ice ../../slice/Freeze/Evictor.ice ../../slice/Ice/ObjectAdapterF.ice ../../slice/Ice/ServantLocator.ice ../../slice/Ice/Current.ice ../../slice/Ice/ConnectionF.ice ../../slice/Ice/Identity.ice ../../slice/Freeze/Exception.ice
DB.cpp: ../../slice/Freeze/DB.ice
CatalogData.cpp: ../../slice/Freeze/CatalogData.ice
Connection.cpp: ../../slice/Freeze/Connection.ice ../../slice/Freeze/Transaction.ice ../../slice/Ice/CommunicatorF.ice
@@ -27,8 +33,10 @@ Exception.cpp: ../../slice/Freeze/Exception.ice
EvictorF.cpp: ../../slice/Freeze/EvictorF.ice
EvictorStorage.cpp: ../../slice/Freeze/EvictorStorage.ice ../../slice/Ice/Identity.ice
Evictor.cpp: ../../slice/Freeze/Evictor.ice ../../slice/Ice/ObjectAdapterF.ice ../../slice/Ice/ServantLocator.ice ../../slice/Ice/Current.ice ../../slice/Ice/ConnectionF.ice ../../slice/Ice/Identity.ice ../../slice/Freeze/Exception.ice
+TransactionalEvictor.cpp: ../../slice/Freeze/TransactionalEvictor.ice ../../slice/Freeze/Evictor.ice ../../slice/Ice/ObjectAdapterF.ice ../../slice/Ice/ServantLocator.ice ../../slice/Ice/Current.ice ../../slice/Ice/ConnectionF.ice ../../slice/Ice/Identity.ice ../../slice/Freeze/Exception.ice
Transaction.cpp: ../../slice/Freeze/Transaction.ice
PingObject.cpp: ../Freeze/PingObject.ice
+../../slice/Freeze/BackgroundSaveEvictor.ice: $(SLICE2CPP) $(SLICEPARSERLIB)
../../slice/Freeze/DB.ice: $(SLICE2CPP) $(SLICEPARSERLIB)
../../slice/Freeze/CatalogData.ice: $(SLICE2CPP) $(SLICEPARSERLIB)
../../slice/Freeze/Connection.ice: $(SLICE2CPP) $(SLICEPARSERLIB)
@@ -37,5 +45,6 @@ PingObject.cpp: ../Freeze/PingObject.ice
../../slice/Freeze/EvictorF.ice: $(SLICE2CPP) $(SLICEPARSERLIB)
../../slice/Freeze/EvictorStorage.ice: $(SLICE2CPP) $(SLICEPARSERLIB)
../../slice/Freeze/Evictor.ice: $(SLICE2CPP) $(SLICEPARSERLIB)
+../../slice/Freeze/TransactionalEvictor.ice: $(SLICE2CPP) $(SLICEPARSERLIB)
../../slice/Freeze/Transaction.ice: $(SLICE2CPP) $(SLICEPARSERLIB)
../Freeze/PingObject.ice: $(SLICE2CPP) $(SLICEPARSERLIB)
diff --git a/cpp/src/Freeze/BackgroundSaveEvictorI.cpp b/cpp/src/Freeze/BackgroundSaveEvictorI.cpp
new file mode 100644
index 00000000000..dd228d80cd7
--- /dev/null
+++ b/cpp/src/Freeze/BackgroundSaveEvictorI.cpp
@@ -0,0 +1,1416 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#include <Freeze/BackgroundSaveEvictorI.h>
+#include <Freeze/Initialize.h>
+#include <IceUtil/AbstractMutex.h>
+#include <IceUtil/StringUtil.h>
+#include <Freeze/Util.h>
+
+#include <typeinfo>
+
+using namespace std;
+using namespace Freeze;
+using namespace Ice;
+
+
+//
+// createEvictor functions
+//
+
+Freeze::BackgroundSaveEvictorPtr
+Freeze::createBackgroundSaveEvictor(const ObjectAdapterPtr& adapter,
+ const string& envName,
+ const string& filename,
+ const ServantInitializerPtr& initializer,
+ const vector<IndexPtr>& indices,
+ bool createDb)
+{
+ return new BackgroundSaveEvictorI(adapter, envName, 0, filename, initializer, indices, createDb);
+}
+
+BackgroundSaveEvictorPtr
+Freeze::createBackgroundSaveEvictor(const ObjectAdapterPtr& adapter,
+ const string& envName,
+ DbEnv& dbEnv,
+ const string& filename,
+ const ServantInitializerPtr& initializer,
+ const vector<IndexPtr>& indices,
+ bool createDb)
+{
+ return new BackgroundSaveEvictorI(adapter, envName, &dbEnv, filename, initializer, indices, createDb);
+}
+
+//
+// Fatal error callback
+//
+
+static Freeze::FatalErrorCallback fatalErrorCallback = 0;
+static IceUtil::StaticMutex fatalErrorCallbackMutex = ICE_STATIC_MUTEX_INITIALIZER;
+
+FatalErrorCallback
+Freeze::registerFatalErrorCallback(FatalErrorCallback cb)
+{
+ IceUtil::StaticMutex::Lock lock(fatalErrorCallbackMutex);
+ FatalErrorCallback result = fatalErrorCallback;
+ return result;
+}
+
+static void
+handleFatalError(const Freeze::BackgroundSaveEvictorPtr& evictor, const Ice::CommunicatorPtr& communicator)
+{
+ IceUtil::StaticMutex::Lock lock(fatalErrorCallbackMutex);
+ if(fatalErrorCallback != 0)
+ {
+ fatalErrorCallback(evictor, communicator);
+ }
+ else
+ {
+ ::abort();
+ }
+}
+
+
+//
+// WatchDogThread
+//
+
+Freeze::WatchDogThread::WatchDogThread(long timeout, BackgroundSaveEvictorI& evictor) :
+ _timeout(IceUtil::Time::milliSeconds(timeout)),
+ _evictor(evictor),
+ _done(false),
+ _active(false)
+{
+}
+
+
+void
+Freeze::WatchDogThread::run()
+{
+ Lock sync(*this);
+
+ while(!_done)
+ {
+ if(_active)
+ {
+ if(timedWait(_timeout) == false && _active && !_done)
+ {
+ Error out(_evictor.communicator()->getLogger());
+ out << "Fatal error: streaming watch dog thread timed out.";
+ out.flush();
+ handleFatalError(&_evictor, _evictor.communicator());
+ }
+ }
+ else
+ {
+ wait();
+ }
+ }
+}
+
+void Freeze::WatchDogThread::activate()
+{
+ Lock sync(*this);
+ _active = true;
+ notify();
+}
+
+void Freeze::WatchDogThread::deactivate()
+{
+ Lock sync(*this);
+ _active = false;
+ notify();
+}
+
+void
+Freeze::WatchDogThread::terminate()
+{
+ Lock sync(*this);
+ _done = true;
+ notify();
+}
+
+
+//
+// BackgroundSaveEvictorI
+//
+
+Freeze::BackgroundSaveEvictorI::BackgroundSaveEvictorI(const ObjectAdapterPtr& adapter,
+ const string& envName,
+ DbEnv* dbEnv,
+ const string& filename,
+ const ServantInitializerPtr& initializer,
+ const vector<IndexPtr>& indices,
+ bool createDb) :
+ EvictorI<BackgroundSaveEvictorElement>(adapter, envName, dbEnv, filename, FacetTypeMap(), initializer, indices, createDb),
+ _currentEvictorSize(0),
+ _savingThreadDone(false)
+{
+ string propertyPrefix = string("Freeze.Evictor.") + envName + '.' + _filename;
+
+ //
+ // By default, we save every minute or when the size of the modified queue
+ // reaches 10.
+ //
+
+ _saveSizeTrigger = _communicator->getProperties()->
+ getPropertyAsIntWithDefault(propertyPrefix + ".SaveSizeTrigger", 10);
+
+ Int savePeriod = _communicator->getProperties()->
+ getPropertyAsIntWithDefault(propertyPrefix + ".SavePeriod", 60 * 1000);
+
+ _savePeriod = IceUtil::Time::milliSeconds(savePeriod);
+
+ //
+ // By default, we save at most 10 * SaveSizeTrigger objects per transaction
+ //
+ _maxTxSize = _communicator->getProperties()->
+ getPropertyAsIntWithDefault(propertyPrefix + ".MaxTxSize", 10 * _saveSizeTrigger);
+
+ if(_maxTxSize <= 0)
+ {
+ _maxTxSize = 100;
+ }
+
+ //
+ // By default, no stream timeout
+ //
+ long streamTimeout = _communicator->getProperties()->
+ getPropertyAsIntWithDefault(propertyPrefix+ ".StreamTimeout", 0) * 1000;
+
+ if(streamTimeout > 0)
+ {
+ _watchDogThread = new WatchDogThread(streamTimeout, *this);
+ _watchDogThread->start();
+ }
+
+ //
+ // Start saving thread
+ //
+ start();
+}
+
+
+Ice::ObjectPrx
+Freeze::BackgroundSaveEvictorI::addFacet(const ObjectPtr& servant, const Identity& ident, const string& facet)
+{
+ checkIdentity(ident);
+ DeactivateController::Guard deactivateGuard(_deactivateController);
+
+ ObjectStore<BackgroundSaveEvictorElement>* store = findStore(facet, _createDb);
+
+ if(store == 0)
+ {
+ throw NotFoundException(__FILE__, __LINE__, "addFacet: could not open database for facet '"
+ + facet + "'");
+ }
+
+ bool alreadyThere = false;
+
+ for(;;)
+ {
+ //
+ // Create a new entry
+ //
+
+ BackgroundSaveEvictorElementPtr element = new BackgroundSaveEvictorElement(*store);
+ element->status = dead;
+ BackgroundSaveEvictorElementPtr oldElt = store->putIfAbsent(ident, element);
+
+ if(oldElt != 0)
+ {
+ element = oldElt;
+ }
+
+ {
+ Lock sync(*this);
+
+ if(element->stale)
+ {
+ //
+ // Try again
+ //
+ continue;
+ }
+ fixEvictPosition(element);
+
+ IceUtil::Mutex::Lock lock(element->mutex);
+
+ switch(element->status)
+ {
+ case clean:
+ case created:
+ case modified:
+ {
+ alreadyThere = true;
+ break;
+ }
+ case destroyed:
+ {
+ element->status = modified;
+ element->rec.servant = servant;
+
+ //
+ // No need to push it on the modified queue, as a destroyed object
+ // is either already on the queue or about to be saved. When saved,
+ // it becomes dead.
+ //
+ break;
+ }
+ case dead:
+ {
+ element->status = created;
+ ObjectRecord& rec = element->rec;
+
+ rec.servant = servant;
+ rec.stats.creationTime = IceUtil::Time::now().toMilliSeconds();
+ rec.stats.lastSaveTime = 0;
+ rec.stats.avgSaveTime = 0;
+
+ addToModifiedQueue(element);
+ break;
+ }
+ default:
+ {
+ assert(0);
+ break;
+ }
+ }
+ }
+ break; // for(;;)
+ }
+
+ if(alreadyThere)
+ {
+ AlreadyRegisteredException ex(__FILE__, __LINE__);
+ ex.kindOfObject = "servant";
+ ex.id = _communicator->identityToString(ident);
+ if(!facet.empty())
+ {
+ ex.id += " -f " + IceUtil::escapeString(facet, "");
+ }
+ throw ex;
+ }
+
+ if(_trace >= 1)
+ {
+ Trace out(_communicator->getLogger(), "Freeze.Evictor");
+ out << "added object \"" << _communicator->identityToString(ident) << "\"";
+ if(!facet.empty())
+ {
+ out << " with facet \"" << facet << "\"";
+ }
+ out << " to Db \"" << _filename << "\"";
+ }
+
+ ObjectPrx obj = _adapter->createProxy(ident);
+ if(!facet.empty())
+ {
+ obj = obj->ice_facet(facet);
+ }
+ return obj;
+}
+
+Ice::ObjectPtr
+Freeze::BackgroundSaveEvictorI::removeFacet(const Identity& ident, const string& facet)
+{
+ checkIdentity(ident);
+ DeactivateController::Guard deactivateGuard(_deactivateController);
+
+ ObjectStore<BackgroundSaveEvictorElement>* store = findStore(facet, false);
+ ObjectPtr servant = 0;
+
+ if(store != 0)
+ {
+ for(;;)
+ {
+ //
+ // Retrieve object
+ //
+
+ BackgroundSaveEvictorElementPtr element = store->pin(ident);
+ if(element != 0)
+ {
+ Lock sync(*this);
+ if(element->stale)
+ {
+ //
+ // Try again
+ //
+ continue;
+ }
+
+ fixEvictPosition(element);
+ {
+ IceUtil::Mutex::Lock lock(element->mutex);
+
+ switch(element->status)
+ {
+ case clean:
+ {
+ servant = element->rec.servant;
+ element->status = destroyed;
+ element->rec.servant = 0;
+ addToModifiedQueue(element);
+ break;
+ }
+ case created:
+ {
+ servant = element->rec.servant;
+ element->status = dead;
+ element->rec.servant = 0;
+ break;
+ }
+ case modified:
+ {
+ servant = element->rec.servant;
+ element->status = destroyed;
+ element->rec.servant = 0;
+ //
+ // Not necessary to push it on the modified queue, as a modified
+ // element is either on the queue already or about to be saved
+ // (at which point it becomes clean)
+ //
+ break;
+ }
+ case destroyed:
+ case dead:
+ {
+ break;
+ }
+ default:
+ {
+ assert(0);
+ break;
+ }
+ }
+ }
+ if(element->keepCount > 0)
+ {
+ assert(servant != 0);
+
+ element->keepCount = 0;
+ //
+ // Add to front of evictor queue
+ //
+ // Note that save evicts dead objects
+ //
+ _evictorList.push_front(element);
+ _currentEvictorSize++;
+ element->evictPosition = _evictorList.begin();
+ }
+ }
+ break; // for(;;)
+ }
+ }
+
+ if(servant == 0)
+ {
+ NotRegisteredException ex(__FILE__, __LINE__);
+ ex.kindOfObject = "servant";
+ ex.id = _communicator->identityToString(ident);
+ if(!facet.empty())
+ {
+ ex.id += " -f " + IceUtil::escapeString(facet, "");
+ }
+ throw ex;
+ }
+
+ if(_trace >= 1)
+ {
+ Trace out(_communicator->getLogger(), "Freeze.Evictor");
+ out << "removed object \"" << _communicator->identityToString(ident) << "\"";
+ if(!facet.empty())
+ {
+ out << " with facet \"" << facet << "\"";
+ }
+ out << " from Db \"" << _filename << "\"";
+ }
+ return servant;
+}
+
+void
+Freeze::BackgroundSaveEvictorI::keep(const Identity& ident)
+{
+ keepFacet(ident, "");
+}
+
+void
+Freeze::BackgroundSaveEvictorI::keepFacet(const Identity& ident, const string& facet)
+{
+ checkIdentity(ident);
+ DeactivateController::Guard deactivateGuard(_deactivateController);
+
+ bool notThere = false;
+
+ ObjectStore<BackgroundSaveEvictorElement>* store = findStore(facet, false);
+ if(store == 0)
+ {
+ notThere = true;
+ }
+ else
+ {
+ for(;;)
+ {
+ BackgroundSaveEvictorElementPtr element = store->pin(ident);
+ if(element == 0)
+ {
+ notThere = true;
+ break;
+ }
+
+ Lock sync(*this);
+
+ if(element->stale)
+ {
+ //
+ // try again
+ //
+ continue;
+ }
+
+
+ {
+ IceUtil::Mutex::Lock lockElement(element->mutex);
+ if(element->status == destroyed || element->status == dead)
+ {
+ notThere = true;
+ break;
+ }
+ }
+
+ //
+ // Found!
+ //
+
+ if(element->keepCount == 0)
+ {
+ if(element->usageCount < 0)
+ {
+ //
+ // New object
+ //
+ element->usageCount = 0;
+ }
+ else
+ {
+ _evictorList.erase(element->evictPosition);
+ _currentEvictorSize--;
+ }
+ element->keepCount = 1;
+ }
+ else
+ {
+ element->keepCount++;
+ }
+ break;
+ }
+ }
+
+ if(notThere)
+ {
+ NotRegisteredException ex(__FILE__, __LINE__);
+ ex.kindOfObject = "servant";
+ ex.id = _communicator->identityToString(ident);
+ if(!facet.empty())
+ {
+ ex.id += " -f " + IceUtil::escapeString(facet, "");
+ }
+ throw ex;
+ }
+}
+
+void
+Freeze::BackgroundSaveEvictorI::release(const Identity& ident)
+{
+ releaseFacet(ident, "");
+}
+
+void
+Freeze::BackgroundSaveEvictorI::releaseFacet(const Identity& ident, const string& facet)
+{
+ checkIdentity(ident);
+ DeactivateController::Guard deactivateGuard(_deactivateController);
+
+ ObjectStore<BackgroundSaveEvictorElement>* store = findStore(facet, false);
+
+ if(store != 0)
+ {
+ Lock sync(*this);
+
+ BackgroundSaveEvictorElementPtr element = store->getIfPinned(ident);
+ if(element != 0)
+ {
+ assert(!element->stale);
+ if(element->keepCount > 0)
+ {
+ if(--element->keepCount == 0)
+ {
+ //
+ // Add to front of evictor queue
+ //
+ // Note that the element cannot be destroyed or dead since
+ // its keepCount was > 0.
+ //
+ _evictorList.push_front(element);
+ _currentEvictorSize++;
+ element->evictPosition = _evictorList.begin();
+ }
+ //
+ // Success
+ //
+ return;
+ }
+ }
+ }
+
+ NotRegisteredException ex(__FILE__, __LINE__);
+ ex.kindOfObject = "servant";
+ ex.id = _communicator->identityToString(ident);
+ if(!facet.empty())
+ {
+ ex.id += " -f " + IceUtil::escapeString(facet, "");
+ }
+ throw ex;
+}
+
+
+bool
+Freeze::BackgroundSaveEvictorI::hasFacet(const Identity& ident, const string& facet)
+{
+ DeactivateController::Guard deactivateGuard(_deactivateController);
+ checkIdentity(ident);
+ ObjectStore<BackgroundSaveEvictorElement>* store = findStore(facet, false);
+
+ if(store == 0)
+ {
+ return false;
+ }
+
+ {
+ Lock sync(*this);
+ BackgroundSaveEvictorElementPtr element = store->getIfPinned(ident);
+ if(element != 0)
+ {
+ assert(!element->stale);
+
+ IceUtil::Mutex::Lock lock(element->mutex);
+ return element->status != dead && element->status != destroyed;
+ }
+ }
+ return store->dbHasObject(ident, 0);
+}
+
+bool
+Freeze::BackgroundSaveEvictorI::hasAnotherFacet(const Identity& ident, const string& facet)
+{
+ DeactivateController::Guard deactivateGuard(_deactivateController);
+
+ //
+ // If the object exists in another store, throw FacetNotExistException
+ // instead of returning 0 (== ObjectNotExistException)
+ //
+ StoreMap storeMapCopy;
+ {
+ Lock sync(*this);
+ storeMapCopy = _storeMap;
+ }
+
+ for(StoreMap::iterator p = storeMapCopy.begin(); p != storeMapCopy.end(); ++p)
+ {
+ //
+ // Do not check again the given facet
+ //
+ if((*p).first != facet)
+ {
+ ObjectStore<BackgroundSaveEvictorElement>* store = (*p).second;
+
+ bool inCache = false;
+ {
+ Lock sync(*this);
+
+ BackgroundSaveEvictorElementPtr element = store->getIfPinned(ident);
+ if(element != 0)
+ {
+ inCache = true;
+ assert(!element->stale);
+
+ IceUtil::Mutex::Lock lock(element->mutex);
+ if(element->status != dead && element->status != destroyed)
+ {
+ return true;
+ }
+ }
+ }
+ if(!inCache)
+ {
+ if(store->dbHasObject(ident, 0))
+ {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+}
+
+
+ObjectPtr
+Freeze::BackgroundSaveEvictorI::locateImpl(const Current& current, LocalObjectPtr& cookie)
+{
+ DeactivateController::Guard deactivateGuard(_deactivateController);
+
+ cookie = 0;
+
+ ObjectStore<BackgroundSaveEvictorElement>* store = findStore(current.facet, false);
+ if(store == 0)
+ {
+ if(_trace >= 2)
+ {
+ Trace out(_communicator->getLogger(), "Freeze.Evictor");
+ out << "locate could not find a database for facet \"" << current.facet << "\"";
+ }
+ return 0;
+ }
+
+ for(;;)
+ {
+ BackgroundSaveEvictorElementPtr element = store->pin(current.id);
+ if(element == 0)
+ {
+ if(_trace >= 2)
+ {
+ Trace out(_communicator->getLogger(), "Freeze.Evictor");
+ out << "locate could not find \"" << _communicator->identityToString(current.id) << "\" in Db \""
+ << _filename << "\"";
+ }
+ return 0;
+ }
+
+ Lock sync(*this);
+
+ if(element->stale)
+ {
+ //
+ // try again
+ //
+ continue;
+ }
+
+
+ IceUtil::Mutex::Lock lockElement(element->mutex);
+ if(element->status == destroyed || element->status == dead)
+ {
+ if(_trace >= 2)
+ {
+ Trace out(_communicator->getLogger(), "Freeze.Evictor");
+ out << "locate found \"" << _communicator->identityToString(current.id)
+ << "\" in the cache for database \"" << current.facet << "\" but it was dead or destroyed";
+ }
+ return 0;
+ }
+
+ //
+ // It's a good one!
+ //
+ if(_trace >= 2)
+ {
+ Trace out(_communicator->getLogger(), "Freeze.Evictor");
+ out << "locate found \"" << _communicator->identityToString(current.id) << "\" in Db \""
+ << _filename << "\"";
+ }
+
+ fixEvictPosition(element);
+ element->usageCount++;
+ cookie = element;
+ assert(element->rec.servant != 0);
+ return element->rec.servant;
+ }
+}
+
+void
+Freeze::BackgroundSaveEvictorI::finished(const Current& current, const ObjectPtr& servant, const LocalObjectPtr& cookie)
+{
+ assert(servant != 0);
+ DeactivateController::Guard deactivateGuard(_deactivateController);
+
+ if(cookie != 0)
+ {
+ BackgroundSaveEvictorElementPtr element = BackgroundSaveEvictorElementPtr::dynamicCast(cookie);
+ assert(element);
+
+ bool enqueue = false;
+
+ if((_useNonmutating && current.mode != Nonmutating) ||
+ (!_useNonmutating && servant->ice_operationAttributes(current.operation) & 0x1) != 0)
+ {
+ IceUtil::Mutex::Lock lock(element->mutex);
+
+ if(element->status == clean)
+ {
+ //
+ // Assume this operation updated the object
+ //
+ element->status = modified;
+ enqueue = true;
+ }
+ }
+
+ Lock sync(*this);
+
+ //
+ // Only elements with a usageCount == 0 can become stale and we own
+ // one count!
+ //
+ assert(!element->stale);
+ assert(element->usageCount >= 1);
+
+ //
+ // Decrease the usage count of the evictor queue element.
+ //
+ element->usageCount--;
+
+ if(enqueue)
+ {
+ addToModifiedQueue(element);
+ }
+ else if(element->usageCount == 0 && element->keepCount == 0)
+ {
+ //
+ // Evict as many elements as necessary.
+ //
+ evict();
+ }
+ }
+}
+
+void
+Freeze::BackgroundSaveEvictorI::deactivate(const string&)
+{
+ if(_deactivateController.deactivate())
+ {
+ try
+ {
+ saveNow();
+
+ Lock sync(*this);
+
+ //
+ // Set the evictor size to zero, meaning that we will evict
+ // everything possible.
+ //
+ _evictorSize = 0;
+ evict();
+
+ _savingThreadDone = true;
+ notifyAll();
+ sync.release();
+ getThreadControl().join();
+
+ if(_watchDogThread != 0)
+ {
+ _watchDogThread->terminate();
+ _watchDogThread->getThreadControl().join();
+ }
+
+ closeDbEnv();
+ }
+ catch(...)
+ {
+ _deactivateController.deactivationComplete();
+ throw;
+ }
+ _deactivateController.deactivationComplete();
+ }
+}
+
+Freeze::BackgroundSaveEvictorI::~BackgroundSaveEvictorI()
+{
+ if(!_deactivateController.deactivated())
+ {
+ Warning out(_communicator->getLogger());
+ out << "evictor has not been deactivated";
+ }
+}
+
+
+void
+Freeze::BackgroundSaveEvictorI::run()
+{
+ try
+ {
+ for(;;)
+ {
+ deque<BackgroundSaveEvictorElementPtr> allObjects;
+ deque<BackgroundSaveEvictorElementPtr> deadObjects;
+
+ size_t saveNowThreadsSize = 0;
+
+ {
+ Lock sync(*this);
+
+ while(!_savingThreadDone &&
+ (_saveNowThreads.size() == 0) &&
+ (_saveSizeTrigger < 0 || static_cast<Int>(_modifiedQueue.size()) < _saveSizeTrigger))
+ {
+ if(_savePeriod == IceUtil::Time::milliSeconds(0))
+ {
+ wait();
+ }
+ else if(timedWait(_savePeriod) == false)
+ {
+ //
+ // Timeout, so let's save
+ //
+ break; // while
+ }
+ }
+
+ saveNowThreadsSize = _saveNowThreads.size();
+
+ if(_savingThreadDone)
+ {
+ assert(_modifiedQueue.size() == 0);
+ assert(saveNowThreadsSize == 0);
+ break; // for(;;)
+ }
+
+ //
+ // Check first if there is something to do!
+ //
+ if(_modifiedQueue.size() == 0)
+ {
+ if(saveNowThreadsSize > 0)
+ {
+ _saveNowThreads.clear();
+ notifyAll();
+ }
+ continue; // for(;;)
+ }
+
+ _modifiedQueue.swap(allObjects);
+ }
+
+ const size_t size = allObjects.size();
+
+ deque<StreamedObject> streamedObjectQueue;
+
+ Long streamStart = IceUtil::Time::now().toMilliSeconds();
+
+ //
+ // Stream each element
+ //
+ for(size_t i = 0; i < size; i++)
+ {
+ BackgroundSaveEvictorElementPtr& element = allObjects[i];
+
+ bool tryAgain;
+ do
+ {
+ tryAgain = false;
+ ObjectPtr servant = 0;
+
+ //
+ // These elements can't be stale as only elements with
+ // usageCount == 0 can become stale, and the modifiedQueue
+ // (us now) owns one count.
+ //
+
+ IceUtil::Mutex::Lock lockElement(element->mutex);
+ Byte status = element->status;
+
+ switch(status)
+ {
+ case created:
+ case modified:
+ {
+ servant = element->rec.servant;
+ break;
+ }
+ case destroyed:
+ {
+ size_t index = streamedObjectQueue.size();
+ streamedObjectQueue.resize(index + 1);
+ StreamedObject& obj = streamedObjectQueue[index];
+ stream(element, streamStart, obj);
+
+ element->status = dead;
+ deadObjects.push_back(element);
+
+ break;
+ }
+ case dead:
+ {
+ deadObjects.push_back(element);
+ break;
+ }
+ default:
+ {
+ //
+ // Nothing to do (could be a duplicate)
+ //
+ break;
+ }
+ }
+ if(servant == 0)
+ {
+ lockElement.release();
+ }
+ else
+ {
+ IceUtil::AbstractMutex* mutex = dynamic_cast<IceUtil::AbstractMutex*>(servant.get());
+ if(mutex != 0)
+ {
+ //
+ // Lock servant and then element so that user can safely lock
+ // servant and call various Evictor operations
+ //
+
+ IceUtil::AbstractMutex::TryLock lockServant(*mutex);
+ if(!lockServant.acquired())
+ {
+ lockElement.release();
+
+ if(_watchDogThread != 0)
+ {
+ _watchDogThread->activate();
+ }
+ lockServant.acquire();
+ if(_watchDogThread != 0)
+ {
+ _watchDogThread->deactivate();
+ }
+
+ lockElement.acquire();
+ status = element->status;
+ }
+
+ switch(status)
+ {
+ case created:
+ case modified:
+ {
+ if(servant == element->rec.servant)
+ {
+ size_t index = streamedObjectQueue.size();
+ streamedObjectQueue.resize(index + 1);
+ StreamedObject& obj = streamedObjectQueue[index];
+ stream(element, streamStart, obj);
+
+ element->status = clean;
+ }
+ else
+ {
+ tryAgain = true;
+ }
+ break;
+ }
+ case destroyed:
+ {
+ lockServant.release();
+
+ size_t index = streamedObjectQueue.size();
+ streamedObjectQueue.resize(index + 1);
+ StreamedObject& obj = streamedObjectQueue[index];
+ stream(element, streamStart, obj);
+
+ element->status = dead;
+ deadObjects.push_back(element);
+ break;
+ }
+ case dead:
+ {
+ deadObjects.push_back(element);
+ break;
+ }
+ default:
+ {
+ //
+ // Nothing to do (could be a duplicate)
+ //
+ break;
+ }
+ }
+ }
+ else
+ {
+ DatabaseException ex(__FILE__, __LINE__);
+ ex.message = string(typeid(*element->rec.servant).name())
+ + " does not implement IceUtil::AbstractMutex";
+ throw ex;
+ }
+ }
+ } while(tryAgain);
+ }
+
+ if(_trace >= 1)
+ {
+ Long now = IceUtil::Time::now().toMilliSeconds();
+ Trace out(_communicator->getLogger(), "Freeze.Evictor");
+ out << "streamed " << streamedObjectQueue.size() << " objects in "
+ << static_cast<Int>(now - streamStart) << " ms";
+ }
+
+ //
+ // Now let's save all these streamed objects to disk using a transaction
+ //
+
+ //
+ // Each time we get a deadlock, we reduce the number of objects to save
+ // per transaction
+ //
+ size_t txSize = streamedObjectQueue.size();
+ if(txSize > static_cast<size_t>(_maxTxSize))
+ {
+ txSize = static_cast<size_t>(_maxTxSize);
+ }
+ bool tryAgain;
+
+ do
+ {
+ tryAgain = false;
+
+ while(streamedObjectQueue.size() > 0)
+ {
+ if(txSize > streamedObjectQueue.size())
+ {
+ txSize = streamedObjectQueue.size();
+ }
+
+ Long saveStart = IceUtil::Time::now().toMilliSeconds();
+ try
+ {
+ DbTxn* tx = 0;
+ _dbEnv->getEnv()->txn_begin(0, &tx, 0);
+
+ long txnId = 0;
+ if(_txTrace >= 1)
+ {
+ txnId = (tx->id() & 0x7FFFFFFF) + 0x80000000L;
+ Trace out(_communicator->getLogger(), "Freeze.Evictor");
+ out << "started transaction " << hex << txnId << dec << " in saving thread";
+ }
+
+ try
+ {
+ for(size_t i = 0; i < txSize; i++)
+ {
+ StreamedObject& obj = streamedObjectQueue[i];
+ obj.store->save(obj.key, obj.value, obj.status, tx);
+ }
+ }
+ catch(...)
+ {
+ tx->abort();
+ if(_txTrace >= 1)
+ {
+ Trace out(_communicator->getLogger(), "Freeze.Evictor");
+ out << "rolled back transaction " << hex << txnId << dec;
+ }
+ throw;
+ }
+ tx->commit(0);
+
+ if(_txTrace >= 1)
+ {
+ Trace out(_communicator->getLogger(), "Freeze.Evictor");
+ out << "committed transaction " << hex << txnId << dec;
+ }
+
+ streamedObjectQueue.erase
+ (streamedObjectQueue.begin(),
+ streamedObjectQueue.begin() + txSize);
+
+ if(_trace >= 1)
+ {
+ Long now = IceUtil::Time::now().toMilliSeconds();
+ Trace out(_communicator->getLogger(), "Freeze.Evictor");
+ out << "saved " << txSize << " objects in "
+ << static_cast<Int>(now - saveStart) << " ms";
+ }
+ }
+ catch(const DbDeadlockException&)
+ {
+ if(_deadlockWarning)
+ {
+ Warning out(_communicator->getLogger());
+ out << "Deadlock in Freeze::BackgroundSaveEvictorI::run while writing into Db \"" + _filename
+ + "\"; retrying ...";
+ }
+
+ tryAgain = true;
+ txSize = (txSize + 1)/2;
+ }
+ catch(const DbException& dx)
+ {
+ DatabaseException ex(__FILE__, __LINE__);
+ ex.message = dx.what();
+ throw ex;
+ }
+ }
+ }
+ while(tryAgain);
+
+ {
+ Lock sync(*this);
+
+ //
+ // Release usage count
+ //
+ for(deque<BackgroundSaveEvictorElementPtr>::iterator p = allObjects.begin();
+ p != allObjects.end(); p++)
+ {
+ BackgroundSaveEvictorElementPtr& element = *p;
+ element->usageCount--;
+ }
+ allObjects.clear();
+
+ for(deque<BackgroundSaveEvictorElementPtr>::iterator q = deadObjects.begin();
+ q != deadObjects.end(); q++)
+ {
+ BackgroundSaveEvictorElementPtr& element = *q;
+ if(!element->stale)
+ {
+ //
+ // Can be stale when there are duplicate elements on the
+ // deadObjecst queue
+ //
+
+ if(!element->stale && element->usageCount == 0 && element->keepCount == 0)
+ {
+ //
+ // Get rid of unused dead elements
+ //
+ IceUtil::Mutex::Lock lockElement(element->mutex);
+ if(element->status == dead)
+ {
+ evict(element);
+ }
+ }
+ }
+ }
+ deadObjects.clear();
+ evict();
+
+ if(saveNowThreadsSize > 0)
+ {
+ _saveNowThreads.erase(_saveNowThreads.begin(), _saveNowThreads.begin() + saveNowThreadsSize);
+ notifyAll();
+ }
+ }
+ }
+ }
+ catch(const IceUtil::Exception& ex)
+ {
+ Error out(_communicator->getLogger());
+ out << "Saving thread killed by exception: " << ex;
+ out.flush();
+ handleFatalError(this, _communicator);
+ }
+ catch(const std::exception& ex)
+ {
+ Error out(_communicator->getLogger());
+ out << "Saving thread killed by std::exception: " << ex.what();
+ out.flush();
+ handleFatalError(this, _communicator);
+ }
+ catch(...)
+ {
+ Error out(_communicator->getLogger());
+ out << "Saving thread killed by unknown exception";
+ out.flush();
+ handleFatalError(this, _communicator);
+ }
+}
+
+DbTxn*
+Freeze::BackgroundSaveEvictorI::beforeQuery()
+{
+ saveNow();
+ return 0;
+}
+
+void
+Freeze::BackgroundSaveEvictorI::saveNow()
+{
+ Lock sync(*this);
+
+ IceUtil::ThreadControl myself;
+
+ _saveNowThreads.push_back(myself);
+ notifyAll();
+ do
+ {
+ wait();
+ }
+ while(find(_saveNowThreads.begin(), _saveNowThreads.end(), myself) != _saveNowThreads.end());
+}
+
+void
+Freeze::BackgroundSaveEvictorI::evict()
+{
+ //
+ // Must be called with *this locked
+ //
+
+ assert(_currentEvictorSize == _evictorList.size());
+
+ list<BackgroundSaveEvictorElementPtr>::reverse_iterator p = _evictorList.rbegin();
+
+ while(_currentEvictorSize > _evictorSize)
+ {
+ //
+ // Get the last unused element from the evictor queue.
+ //
+ while(p != _evictorList.rend())
+ {
+ if((*p)->usageCount == 0)
+ {
+ break; // Fine, servant is not in use (and not in the modifiedQueue)
+ }
+ ++p;
+ }
+ if(p == _evictorList.rend())
+ {
+ //
+ // All servants are active, can't evict any further.
+ //
+ break;
+ }
+
+ BackgroundSaveEvictorElementPtr& element = *p;
+ assert(!element->stale);
+ assert(element->keepCount == 0);
+
+ if(_trace >= 2 || (_trace >= 1 && _evictorList.size() % 50 == 0))
+ {
+ string facet = element->store.facet();
+
+ Trace out(_communicator->getLogger(), "Freeze.Evictor");
+ out << "evicting \"" << _communicator->identityToString(element->cachePosition->first) << "\" ";
+ if(facet != "")
+ {
+ out << "-f \"" << facet << "\" ";
+ }
+ out << "from the queue\n"
+ << "number of elements in the queue: " << _currentEvictorSize;
+ }
+
+ //
+ // Remove last unused element from the evictor queue.
+ //
+ element->stale = true;
+ element->store.unpin(element->cachePosition);
+ p = list<BackgroundSaveEvictorElementPtr>::reverse_iterator(_evictorList.erase(element->evictPosition));
+ _currentEvictorSize--;
+ }
+}
+
+void
+Freeze::BackgroundSaveEvictorI::fixEvictPosition(const BackgroundSaveEvictorElementPtr& element)
+{
+ assert(!element->stale);
+
+ if(element->keepCount == 0)
+ {
+ if(element->usageCount < 0)
+ {
+ //
+ // New object
+ //
+ element->usageCount = 0;
+ _currentEvictorSize++;
+ }
+ else
+ {
+ _evictorList.erase(element->evictPosition);
+ }
+ _evictorList.push_front(element);
+ element->evictPosition = _evictorList.begin();
+ }
+}
+
+void
+Freeze::BackgroundSaveEvictorI::evict(const BackgroundSaveEvictorElementPtr& element)
+{
+ assert(!element->stale);
+ assert(element->keepCount == 0);
+
+ _evictorList.erase(element->evictPosition);
+ _currentEvictorSize--;
+ element->stale = true;
+ element->store.unpin(element->cachePosition);
+}
+
+
+void
+Freeze::BackgroundSaveEvictorI::addToModifiedQueue(const BackgroundSaveEvictorElementPtr& element)
+{
+ element->usageCount++;
+ _modifiedQueue.push_back(element);
+
+ if(_saveSizeTrigger >= 0 && static_cast<Int>(_modifiedQueue.size()) >= _saveSizeTrigger)
+ {
+ notifyAll();
+ }
+}
+
+
+void
+Freeze::BackgroundSaveEvictorI::stream(const BackgroundSaveEvictorElementPtr& element, Long streamStart, StreamedObject& obj)
+{
+ assert(element->status != dead);
+
+ obj.status = element->status;
+ obj.store = &element->store;
+
+ const Identity& ident = element->cachePosition->first;
+ ObjectStoreBase::marshal(ident, obj.key, _communicator);
+
+ if(element->status != destroyed)
+ {
+ EvictorIBase::updateStats(element->rec.stats, streamStart);
+ ObjectStoreBase::marshal(element->rec, obj.value, _communicator);
+ }
+}
+
+Freeze::BackgroundSaveEvictorElement::BackgroundSaveEvictorElement(ObjectRecord& r,
+ ObjectStore<BackgroundSaveEvictorElement>& s) :
+ store(s),
+ usageCount(-1),
+ keepCount(0),
+ stale(true),
+ rec(r),
+ status(clean)
+{
+}
+
+Freeze::BackgroundSaveEvictorElement::BackgroundSaveEvictorElement(ObjectStore<BackgroundSaveEvictorElement>& s) :
+ store(s),
+ usageCount(-1),
+ keepCount(0),
+ stale(true),
+ status(clean)
+{
+}
+
+Freeze::BackgroundSaveEvictorElement::~BackgroundSaveEvictorElement()
+
+{
+}
+
+void
+Freeze::BackgroundSaveEvictorElement::init(ObjectStore<BackgroundSaveEvictorElement>::Position p)
+{
+ stale = false;
+ cachePosition = p;
+}
+
+
+
diff --git a/cpp/src/Freeze/BackgroundSaveEvictorI.h b/cpp/src/Freeze/BackgroundSaveEvictorI.h
new file mode 100644
index 00000000000..83498be90c7
--- /dev/null
+++ b/cpp/src/Freeze/BackgroundSaveEvictorI.h
@@ -0,0 +1,217 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#ifndef FREEZE_BACKGROUND_SAVE_EVICTOR_I_H
+#define FREEZE_BACKGROUND_SAVE_EVICTOR_I_H
+
+#include <Freeze/EvictorI.h>
+#include <Freeze/BackgroundSaveEvictor.h>
+
+namespace Freeze
+{
+
+#if defined(_MSC_VER) && (_MSC_VER <= 1200) || defined(__IBMCPP__)
+
+ enum
+ {
+ clean = 0,
+ created = 1,
+ modified = 2,
+ destroyed = 3,
+ dead = 4
+ };
+
+#else
+ //
+ // Clean object; can become modified or destroyed
+ //
+ static const Ice::Byte clean = 0;
+
+ //
+ // New object; can become clean, dead or destroyed
+ //
+ static const Ice::Byte created = 1;
+
+ //
+ // Modified object; can become clean or destroyed
+ //
+ static const Ice::Byte modified = 2;
+
+ //
+ // Being saved. Can become dead or created
+ //
+ static const Ice::Byte destroyed = 3;
+
+ //
+ // Exists only in the Evictor; for example the object was created
+ // and later destroyed (without a save in between), or it was
+ // destroyed on disk but is still in use. Can become created.
+ //
+ static const Ice::Byte dead = 4;
+
+#endif
+
+
+class BackgroundSaveEvictorI;
+
+//
+// The WatchDogThread is used by the saving thread to ensure the
+// streaming of some object does not take more than timeout ms.
+// We only measure the time necessary to acquire the lock on the
+// object (servant), not the streaming itself.
+//
+
+class WatchDogThread : public IceUtil::Thread, private IceUtil::Monitor<IceUtil::Mutex>
+{
+public:
+
+ WatchDogThread(long, BackgroundSaveEvictorI&);
+
+ void run();
+
+ void activate();
+ void deactivate();
+ void terminate();
+
+private:
+ const IceUtil::Time _timeout;
+ BackgroundSaveEvictorI& _evictor;
+ bool _done;
+ bool _active;
+};
+
+typedef IceUtil::Handle<WatchDogThread> WatchDogThreadPtr;
+
+struct BackgroundSaveEvictorElement;
+typedef IceUtil::Handle<BackgroundSaveEvictorElement> BackgroundSaveEvictorElementPtr;
+
+struct BackgroundSaveEvictorElement : public Ice::LocalObject
+{
+ BackgroundSaveEvictorElement(ObjectRecord&, ObjectStore<BackgroundSaveEvictorElement>&);
+ BackgroundSaveEvictorElement(ObjectStore<BackgroundSaveEvictorElement>&);
+ ~BackgroundSaveEvictorElement();
+
+ void init(ObjectStore<BackgroundSaveEvictorElement>::Position);
+
+ //
+ // Immutable
+ //
+ ObjectStore<BackgroundSaveEvictorElement>& store;
+
+ //
+ // Immutable once set
+ //
+ ObjectStore<BackgroundSaveEvictorElement>::Position cachePosition;
+
+ //
+ // Protected by EvictorI
+ //
+ std::list<BackgroundSaveEvictorElementPtr>::iterator evictPosition;
+ int usageCount;
+ int keepCount;
+ bool stale;
+
+ //
+ // Protected by mutex
+ //
+ IceUtil::Mutex mutex;
+ ObjectRecord rec;
+ Ice::Byte status;
+};
+
+
+class BackgroundSaveEvictorI : public BackgroundSaveEvictor, public EvictorI<BackgroundSaveEvictorElement>,
+ public IceUtil::Thread
+{
+public:
+
+ BackgroundSaveEvictorI(const Ice::ObjectAdapterPtr&, const std::string&, DbEnv*, const std::string&,
+ const ServantInitializerPtr&, const std::vector<IndexPtr>&, bool);
+
+ virtual Ice::ObjectPrx addFacet(const Ice::ObjectPtr&, const Ice::Identity&, const std::string&);
+ virtual Ice::ObjectPtr removeFacet(const Ice::Identity&, const std::string&);
+
+ virtual void keep(const Ice::Identity&);
+ virtual void keepFacet(const Ice::Identity&, const std::string&);
+
+ virtual void release(const Ice::Identity&);
+ virtual void releaseFacet(const Ice::Identity&, const std::string&);
+
+ virtual bool hasFacet(const Ice::Identity&, const std::string&);
+
+ virtual void finished(const Ice::Current&, const Ice::ObjectPtr&, const Ice::LocalObjectPtr&);
+ virtual void deactivate(const std::string&);
+
+ virtual ~BackgroundSaveEvictorI();
+
+
+ virtual DbTxn* beforeQuery();
+
+ //
+ // Thread
+ //
+ virtual void run();
+
+ struct StreamedObject
+ {
+ Key key;
+ Value value;
+ Ice::Byte status;
+ ObjectStore<BackgroundSaveEvictorElement>* store;
+ };
+
+protected:
+
+ virtual bool hasAnotherFacet(const Ice::Identity&, const std::string&);
+
+ virtual Ice::ObjectPtr locateImpl(const Ice::Current&, Ice::LocalObjectPtr&);
+
+ virtual void evict();
+
+private:
+
+ void saveNow();
+
+ void evict(const BackgroundSaveEvictorElementPtr&);
+ void addToModifiedQueue(const BackgroundSaveEvictorElementPtr&);
+ void fixEvictPosition(const BackgroundSaveEvictorElementPtr&);
+
+ void stream(const BackgroundSaveEvictorElementPtr&, Ice::Long, StreamedObject&);
+
+ //
+ // The _evictorList contains a list of all objects we keep,
+ // with the most recently used first.
+ //
+ std::list<BackgroundSaveEvictorElementPtr> _evictorList;
+ std::list<BackgroundSaveEvictorElementPtr>::size_type _currentEvictorSize;
+
+ //
+ // The _modifiedQueue contains a queue of all modified objects
+ // Each element in the queue "owns" a usage count, to ensure the
+ // element containing the pointed element remains in the cache.
+ //
+ std::deque<BackgroundSaveEvictorElementPtr> _modifiedQueue;
+
+ bool _savingThreadDone;
+ WatchDogThreadPtr _watchDogThread;
+
+ //
+ // Threads that have requested a "saveNow" and are waiting for
+ // its completion
+ //
+ std::deque<IceUtil::ThreadControl> _saveNowThreads;
+
+ Ice::Int _saveSizeTrigger;
+ Ice::Int _maxTxSize;
+ IceUtil::Time _savePeriod;
+};
+
+}
+
+#endif
diff --git a/cpp/src/Freeze/ConnectionI.cpp b/cpp/src/Freeze/ConnectionI.cpp
index 3f93a4eebaa..d833d503a44 100644
--- a/cpp/src/Freeze/ConnectionI.cpp
+++ b/cpp/src/Freeze/ConnectionI.cpp
@@ -19,6 +19,12 @@ using namespace std;
Freeze::TransactionPtr
Freeze::ConnectionI::beginTransaction()
{
+ return beginTransactionI();
+}
+
+Freeze::TransactionIPtr
+Freeze::ConnectionI::beginTransactionI()
+{
if(_transaction != 0)
{
throw TransactionAlreadyInProgressException(__FILE__, __LINE__);
@@ -78,14 +84,14 @@ Freeze::ConnectionI::~ConnectionI()
close();
}
-Freeze::ConnectionI::ConnectionI(const CommunicatorPtr& communicator,
- const string& envName, DbEnv* dbEnv) :
- _communicator(communicator),
- _dbEnv(SharedDbEnv::get(communicator, envName, dbEnv)),
- _envName(envName),
- _trace(communicator->getProperties()->getPropertyAsInt("Freeze.Trace.Map")),
- _txTrace(communicator->getProperties()->getPropertyAsInt("Freeze.Trace.Transaction")),
- _deadlockWarning(communicator->getProperties()->getPropertyAsInt("Freeze.Warn.Deadlocks") != 0)
+
+Freeze::ConnectionI::ConnectionI(const SharedDbEnvPtr& dbEnv) :
+ _communicator(dbEnv->getCommunicator()),
+ _dbEnv(dbEnv),
+ _envName(dbEnv->getEnvName()),
+ _trace(_communicator->getProperties()->getPropertyAsInt("Freeze.Trace.Map")),
+ _txTrace(_communicator->getProperties()->getPropertyAsInt("Freeze.Trace.Transaction")),
+ _deadlockWarning(_communicator->getProperties()->getPropertyAsInt("Freeze.Warn.Deadlocks") != 0)
{
}
@@ -116,7 +122,7 @@ Freeze::createConnection(const CommunicatorPtr& communicator,
const string& envName)
{
- return new ConnectionI(communicator, envName, 0);
+ return new ConnectionI(SharedDbEnv::get(communicator, envName, 0));
}
Freeze::ConnectionPtr
@@ -124,7 +130,7 @@ Freeze::createConnection(const CommunicatorPtr& communicator,
const string& envName,
DbEnv& dbEnv)
{
- return new ConnectionI(communicator, envName, &dbEnv);
+ return new ConnectionI(SharedDbEnv::get(communicator, envName, &dbEnv));
}
void
diff --git a/cpp/src/Freeze/ConnectionI.h b/cpp/src/Freeze/ConnectionI.h
index 987077b1adf..da12f1bd4fb 100644
--- a/cpp/src/Freeze/ConnectionI.h
+++ b/cpp/src/Freeze/ConnectionI.h
@@ -25,58 +25,43 @@ class ConnectionI : public Connection
{
public:
- virtual TransactionPtr
- beginTransaction();
+ virtual TransactionPtr beginTransaction();
- virtual TransactionPtr
- currentTransaction() const;
+ virtual TransactionPtr currentTransaction() const;
- virtual void
- close();
+ virtual void close();
- virtual Ice::CommunicatorPtr
- getCommunicator() const;
+ virtual Ice::CommunicatorPtr getCommunicator() const;
- virtual std::string
- getName() const;
+ virtual std::string getName() const;
virtual ~ConnectionI();
- ConnectionI(const Ice::CommunicatorPtr& communicator,
- const std::string& envName, DbEnv*);
+ ConnectionI(const SharedDbEnvPtr&);
- void
- closeAllIterators();
+ TransactionIPtr beginTransactionI();
- void
- registerMap(MapHelperI*);
+ void closeAllIterators();
- void
- unregisterMap(MapHelperI*);
+ void registerMap(MapHelperI*);
- void
- clearTransaction();
+ void unregisterMap(MapHelperI*);
- DbTxn*
- dbTxn() const;
+ void clearTransaction();
- const SharedDbEnvPtr&
- dbEnv() const;
+ DbTxn* dbTxn() const;
+
+ const SharedDbEnvPtr& dbEnv() const;
- const Ice::CommunicatorPtr&
- communicator() const;
+ const Ice::CommunicatorPtr& communicator() const;
- const std::string&
- envName() const;
+ const std::string& envName() const;
- Ice::Int
- trace() const;
+ Ice::Int trace() const;
- Ice::Int
- txTrace() const;
+ Ice::Int txTrace() const;
- bool
- deadlockWarning() const;
+ bool deadlockWarning() const;
private:
diff --git a/cpp/src/Freeze/EvictorI.cpp b/cpp/src/Freeze/EvictorI.cpp
index 685eebde6ce..d050d2f2c74 100644
--- a/cpp/src/Freeze/EvictorI.cpp
+++ b/cpp/src/Freeze/EvictorI.cpp
@@ -9,100 +9,27 @@
#include <Freeze/EvictorI.h>
#include <Freeze/Initialize.h>
-#include <IceUtil/AbstractMutex.h>
-#include <IceUtil/StringUtil.h>
#include <Freeze/Util.h>
#include <Freeze/EvictorIteratorI.h>
#include <Freeze/PingObject.h>
+#include <IceUtil/IceUtil.h>
+
#include <typeinfo>
using namespace std;
using namespace Freeze;
using namespace Ice;
-
//
// Static members
//
-string Freeze::EvictorI::defaultDb = "$default";
-string Freeze::EvictorI::indexPrefix = "$index:";
-
-
-//
-// createEvictor functions
-//
-
-Freeze::EvictorPtr
-Freeze::createEvictor(const ObjectAdapterPtr& adapter,
- const string& envName,
- const string& filename,
- const ServantInitializerPtr& initializer,
- const vector<IndexPtr>& indices,
- bool createDb)
-{
- return new EvictorI(adapter, envName, 0, filename, initializer, indices, createDb);
-}
-
-Freeze::EvictorPtr
-Freeze::createEvictor(const ObjectAdapterPtr& adapter,
- const string& envName,
- DbEnv& dbEnv,
- const string& filename,
- const ServantInitializerPtr& initializer,
- const vector<IndexPtr>& indices,
- bool createDb)
-{
- return new EvictorI(adapter, envName, &dbEnv, filename, initializer, indices, createDb);
-}
-
-//
-// Fatal error callback
-//
-
-static Freeze::FatalErrorCallback fatalErrorCallback = 0;
-static IceUtil::StaticMutex fatalErrorCallbackMutex = ICE_STATIC_MUTEX_INITIALIZER;
-
-Freeze::FatalErrorCallback
-Freeze::registerFatalErrorCallback(Freeze::FatalErrorCallback cb)
-{
- IceUtil::StaticMutex::Lock lock(fatalErrorCallbackMutex);
- FatalErrorCallback result = fatalErrorCallback;
- return result;
-}
-
-static void
-handleFatalError(const Freeze::EvictorPtr& evictor, const Ice::CommunicatorPtr& communicator)
-{
- IceUtil::StaticMutex::Lock lock(fatalErrorCallbackMutex);
- if(fatalErrorCallback != 0)
- {
- fatalErrorCallback(evictor, communicator);
- }
- else
- {
- ::abort();
- }
-}
+string Freeze::EvictorIBase::defaultDb = "$default";
+string Freeze::EvictorIBase::indexPrefix = "$index:";
//
-// Helper functions
-//
-
-inline void
-checkIdentity(const Identity& ident)
-{
- if(ident.name.size() == 0)
- {
- IllegalIdentityException e(__FILE__, __LINE__);
- e.id = ident;
- throw e;
- }
-}
-
-//
// DeactivateController
//
@@ -131,7 +58,7 @@ Freeze::DeactivateController::Guard::~Guard()
}
}
-Freeze::DeactivateController::DeactivateController(EvictorI* evictor) :
+Freeze::DeactivateController::DeactivateController(EvictorIBase* evictor) :
_evictor(evictor),
_deactivating(false),
_deactivated(false),
@@ -175,7 +102,7 @@ Freeze::DeactivateController::deactivate()
if(_evictor->trace() >= 1)
{
Trace out(_evictor->communicator()->getLogger(), "Freeze.Evictor");
- out << "*** Waiting for " << _guardCount << " threads to complete before starting deactivation.";
+ out << "Waiting for " << _guardCount << " threads to complete before starting deactivation.";
}
wait();
@@ -205,82 +132,21 @@ Freeze::DeactivateController::deactivationComplete()
notifyAll();
}
-//
-// WatchDogThread
-//
-
-Freeze::WatchDogThread::WatchDogThread(long timeout, EvictorI& evictor) :
- _timeout(IceUtil::Time::milliSeconds(timeout)),
- _evictor(evictor),
- _done(false),
- _active(false)
-{
-}
-
-
-void
-Freeze::WatchDogThread::run()
-{
- Lock sync(*this);
-
- while(!_done)
- {
- if(_active)
- {
- if(timedWait(_timeout) == false && _active && !_done)
- {
- Error out(_evictor.communicator()->getLogger());
- out << "Fatal error: streaming watch dog thread timed out.";
- out.flush();
- handleFatalError(&_evictor, _evictor.communicator());
- }
- }
- else
- {
- wait();
- }
- }
-}
-
-void Freeze::WatchDogThread::activate()
-{
- Lock sync(*this);
- _active = true;
- notify();
-}
-
-void Freeze::WatchDogThread::deactivate()
-{
- Lock sync(*this);
- _active = false;
- notify();
-}
-
-void
-Freeze::WatchDogThread::terminate()
-{
- Lock sync(*this);
- _done = true;
- notify();
-}
-
//
-// EvictorI
+// EvictorIBase
//
-Freeze::EvictorI::EvictorI(const ObjectAdapterPtr& adapter,
- const string& envName,
- DbEnv* dbEnv,
- const string& filename,
- const ServantInitializerPtr& initializer,
- const vector<IndexPtr>& indices,
- bool createDb) :
-
+Freeze::EvictorIBase::EvictorIBase(const ObjectAdapterPtr& adapter,
+ const string& envName,
+ DbEnv* dbEnv,
+ const string& filename,
+ const FacetTypeMap& facetTypes,
+ const ServantInitializerPtr& initializer,
+ bool createDb) :
_evictorSize(10),
- _currentEvictorSize(0),
+ _facetTypes(facetTypes),
_deactivateController(this),
- _savingThreadDone(false),
_adapter(adapter),
_communicator(adapter->getCommunicator()),
_initializer(initializer),
@@ -295,136 +161,11 @@ Freeze::EvictorI::EvictorI(const ObjectAdapterPtr& adapter,
_txTrace = _communicator->getProperties()->getPropertyAsInt("Freeze.Trace.Transaction");
_deadlockWarning = (_communicator->getProperties()->getPropertyAsInt("Freeze.Warn.Deadlocks") != 0);
_useNonmutating = (_communicator->getProperties()->getPropertyAsInt("Freeze.Evictor.UseNonmutating") != 0);
-
- string propertyPrefix = string("Freeze.Evictor.") + envName + '.' + _filename;
-
- //
- // By default, we save every minute or when the size of the modified queue
- // reaches 10.
- //
-
- _saveSizeTrigger = _communicator->getProperties()->
- getPropertyAsIntWithDefault(propertyPrefix + ".SaveSizeTrigger", 10);
-
- Int savePeriod = _communicator->getProperties()->
- getPropertyAsIntWithDefault(propertyPrefix + ".SavePeriod", 60 * 1000);
-
- _savePeriod = IceUtil::Time::milliSeconds(savePeriod);
-
- //
- // By default, we save at most 10 * SaveSizeTrigger objects per transaction
- //
- _maxTxSize = _communicator->getProperties()->
- getPropertyAsIntWithDefault(propertyPrefix + ".MaxTxSize", 10 * _saveSizeTrigger);
-
- if(_maxTxSize <= 0)
- {
- _maxTxSize = 100;
- }
-
- bool populateEmptyIndices =
- (_communicator->getProperties()->
- getPropertyAsIntWithDefault(propertyPrefix + ".PopulateEmptyIndices", 0) != 0);
-
- //
- // Instantiate all Dbs in 2 steps:
- // (1) iterate over the indices and create ObjectStore with indices
- // (2) open ObjectStores without indices
- //
-
- vector<string> dbs = allDbs();
-
- //
- // Add default db in case it's not there
- //
- dbs.push_back(defaultDb);
-
-
- for(vector<IndexPtr>::const_iterator i = indices.begin(); i != indices.end(); ++i)
- {
- string facet = (*i)->facet();
-
- StoreMap::iterator q = _storeMap.find(facet);
- if(q == _storeMap.end())
- {
- //
- // New db
- //
-
- vector<IndexPtr> storeIndices;
-
- for(vector<IndexPtr>::const_iterator r = i; r != indices.end(); ++r)
- {
- if((*r)->facet() == facet)
- {
- storeIndices.push_back(*r);
- }
- }
- ObjectStore* store = new ObjectStore(facet, _createDb, this, storeIndices, populateEmptyIndices);
- _storeMap.insert(StoreMap::value_type(facet, store));
- }
- }
-
-
- for(vector<string>::iterator p = dbs.begin(); p != dbs.end(); ++p)
- {
- string facet = *p;
- if(facet == defaultDb)
- {
- facet = "";
- }
-
- pair<StoreMap::iterator, bool> ir =
- _storeMap.insert(StoreMap::value_type(facet, 0));
-
- if(ir.second)
- {
- ir.first->second = new ObjectStore(facet, _createDb, this);
- }
- }
-
- //
- // By default, no stream timeout
- //
- long streamTimeout = _communicator->getProperties()->
- getPropertyAsIntWithDefault(propertyPrefix+ ".StreamTimeout", 0) * 1000;
-
- if(streamTimeout > 0)
- {
- _watchDogThread = new WatchDogThread(streamTimeout, *this);
- _watchDogThread->start();
- }
-
- //
- // Start saving thread
- //
- start();
}
-Freeze::EvictorI::~EvictorI()
-{
- if(!_deactivateController.deactivated())
- {
- Warning out(_communicator->getLogger());
- out << "evictor has not been deactivated";
-
- //
- // Need to deactivate to save objects and join saving thread
- //
- deactivate("");
- }
-
- //
- // Delete all the ObjectStore*
- //
- for(StoreMap::iterator p = _storeMap.begin(); p != _storeMap.end(); ++p)
- {
- delete (*p).second;
- }
-}
void
-Freeze::EvictorI::setSize(Int evictorSize)
+Freeze::EvictorIBase::setSize(Int evictorSize)
{
DeactivateController::Guard deactivateGuard(_deactivateController);
@@ -450,7 +191,7 @@ Freeze::EvictorI::setSize(Int evictorSize)
}
Int
-Freeze::EvictorI::getSize()
+Freeze::EvictorIBase::getSize()
{
Lock sync(*this);
return static_cast<Int>(_evictorSize);
@@ -458,569 +199,32 @@ Freeze::EvictorI::getSize()
Ice::ObjectPrx
-Freeze::EvictorI::add(const ObjectPtr& servant, const Identity& ident)
+Freeze::EvictorIBase::add(const ObjectPtr& servant, const Identity& ident)
{
return addFacet(servant, ident, "");
}
-Ice::ObjectPrx
-Freeze::EvictorI::addFacet(const ObjectPtr& servant, const Identity& ident, const string& facet)
-{
- checkIdentity(ident);
- DeactivateController::Guard deactivateGuard(_deactivateController);
-
- ObjectStore* store = 0;
-
- for(;;)
- {
- {
- Lock sync(*this);
-
- StoreMap::iterator p = _storeMap.find(facet);
- if(p == _storeMap.end())
- {
- if(store != 0)
- {
- _storeMap.insert(StoreMap::value_type(facet, store));
- }
- }
- else
- {
- delete store;
- store = (*p).second;
- assert(store != 0);
- }
- }
-
- if(store == 0)
- {
- assert(facet != "");
- store = new ObjectStore(facet, _createDb, this);
- // loop
- }
- else
- {
- break; // for(;;)
- }
- }
-
- assert(store != 0);
- bool alreadyThere = false;
-
- for(;;)
- {
- //
- // Create a new entry
- //
-
- EvictorElementPtr element = new EvictorElement(*store);
- element->status = EvictorElement::dead;
- EvictorElementPtr oldElt = store->putIfAbsent(ident, element);
-
- if(oldElt != 0)
- {
- element = oldElt;
- }
-
- {
- Lock sync(*this);
-
- if(element->stale)
- {
- //
- // Try again
- //
- continue;
- }
- fixEvictPosition(element);
-
- IceUtil::Mutex::Lock lock(element->mutex);
-
- switch(element->status)
- {
- case EvictorElement::clean:
- case EvictorElement::created:
- case EvictorElement::modified:
- {
- alreadyThere = true;
- break;
- }
- case EvictorElement::destroyed:
- {
- element->status = EvictorElement::modified;
- element->rec.servant = servant;
-
- //
- // No need to push it on the modified queue, as a destroyed object
- // is either already on the queue or about to be saved. When saved,
- // it becomes dead.
- //
- break;
- }
- case EvictorElement::dead:
- {
- element->status = EvictorElement::created;
- ObjectRecord& rec = element->rec;
-
- rec.servant = servant;
- rec.stats.creationTime = IceUtil::Time::now().toMilliSeconds();
- rec.stats.lastSaveTime = 0;
- rec.stats.avgSaveTime = 0;
-
- addToModifiedQueue(element);
- break;
- }
- default:
- {
- assert(0);
- break;
- }
- }
- }
- break; // for(;;)
- }
-
- if(alreadyThere)
- {
- AlreadyRegisteredException ex(__FILE__, __LINE__);
- ex.kindOfObject = "servant";
- ex.id = _communicator->identityToString(ident);
- if(!facet.empty())
- {
- ex.id += " -f " + IceUtil::escapeString(facet, "");
- }
- throw ex;
- }
-
- if(_trace >= 1)
- {
- Trace out(_communicator->getLogger(), "Freeze.Evictor");
- out << "added object \"" << _communicator->identityToString(ident) << "\"";
- if(!facet.empty())
- {
- out << " with facet \"" << facet << "\"";
- }
- out << " to Db \"" << _filename << "\"";
- }
-
- ObjectPrx obj = _adapter->createProxy(ident);
- if(!facet.empty())
- {
- obj = obj->ice_facet(facet);
- }
- return obj;
-}
-
Ice::ObjectPtr
-Freeze::EvictorI::remove(const Identity& ident)
+Freeze::EvictorIBase::remove(const Identity& ident)
{
return removeFacet(ident, "");
}
-Ice::ObjectPtr
-Freeze::EvictorI::removeFacet(const Identity& ident, const string& facet)
-{
- checkIdentity(ident);
- DeactivateController::Guard deactivateGuard(_deactivateController);
-
- ObjectStore* store = findStore(facet);
- ObjectPtr servant = 0;
-
- if(store != 0)
- {
- for(;;)
- {
- //
- // Retrieve object
- //
-
- EvictorElementPtr element = store->pin(ident);
- if(element != 0)
- {
- Lock sync(*this);
- if(element->stale)
- {
- //
- // Try again
- //
- continue;
- }
-
- fixEvictPosition(element);
- {
- IceUtil::Mutex::Lock lock(element->mutex);
-
- switch(element->status)
- {
- case EvictorElement::clean:
- {
- servant = element->rec.servant;
- element->status = EvictorElement::destroyed;
- element->rec.servant = 0;
- addToModifiedQueue(element);
- break;
- }
- case EvictorElement::created:
- {
- servant = element->rec.servant;
- element->status = EvictorElement::dead;
- element->rec.servant = 0;
- break;
- }
- case EvictorElement::modified:
- {
- servant = element->rec.servant;
- element->status = EvictorElement::destroyed;
- element->rec.servant = 0;
- //
- // Not necessary to push it on the modified queue, as a modified
- // element is either on the queue already or about to be saved
- // (at which point it becomes clean)
- //
- break;
- }
- case EvictorElement::destroyed:
- case EvictorElement::dead:
- {
- break;
- }
- default:
- {
- assert(0);
- break;
- }
- }
- }
- if(element->keepCount > 0)
- {
- assert(servant != 0);
-
- element->keepCount = 0;
- //
- // Add to front of evictor queue
- //
- // Note that save evicts dead objects
- //
- _evictorList.push_front(element);
- _currentEvictorSize++;
- element->evictPosition = _evictorList.begin();
- }
- }
- break; // for(;;)
- }
- }
-
- if(servant == 0)
- {
- NotRegisteredException ex(__FILE__, __LINE__);
- ex.kindOfObject = "servant";
- ex.id = _communicator->identityToString(ident);
- if(!facet.empty())
- {
- ex.id += " -f " + IceUtil::escapeString(facet, "");
- }
- throw ex;
- }
-
- if(_trace >= 1)
- {
- Trace out(_communicator->getLogger(), "Freeze.Evictor");
- out << "removed object \"" << _communicator->identityToString(ident) << "\"";
- if(!facet.empty())
- {
- out << " with facet \"" << facet << "\"";
- }
- out << " from Db \"" << _filename << "\"";
- }
- return servant;
-}
-
-void
-Freeze::EvictorI::keep(const Identity& ident)
-{
- keepFacet(ident, "");
-}
-
-void
-Freeze::EvictorI::keepFacet(const Identity& ident, const string& facet)
-{
- checkIdentity(ident);
- DeactivateController::Guard deactivateGuard(_deactivateController);
-
- bool notThere = false;
-
- ObjectStore* store = findStore(facet);
- if(store == 0)
- {
- notThere = true;
- }
- else
- {
- for(;;)
- {
- EvictorElementPtr element = store->pin(ident);
- if(element == 0)
- {
- notThere = true;
- break;
- }
-
- Lock sync(*this);
-
- if(element->stale)
- {
- //
- // try again
- //
- continue;
- }
-
-
- {
- IceUtil::Mutex::Lock lockElement(element->mutex);
- if(element->status == EvictorElement::destroyed || element->status == EvictorElement::dead)
- {
- notThere = true;
- break;
- }
- }
-
- //
- // Found!
- //
-
- if(element->keepCount == 0)
- {
- if(element->usageCount < 0)
- {
- //
- // New object
- //
- element->usageCount = 0;
- }
- else
- {
- _evictorList.erase(element->evictPosition);
- _currentEvictorSize--;
- }
- element->keepCount = 1;
- }
- else
- {
- element->keepCount++;
- }
- break;
- }
- }
-
- if(notThere)
- {
- NotRegisteredException ex(__FILE__, __LINE__);
- ex.kindOfObject = "servant";
- ex.id = _communicator->identityToString(ident);
- if(!facet.empty())
- {
- ex.id += " -f " + IceUtil::escapeString(facet, "");
- }
- throw ex;
- }
-}
-
-void
-Freeze::EvictorI::release(const Identity& ident)
-{
- releaseFacet(ident, "");
-}
-
-void
-Freeze::EvictorI::releaseFacet(const Identity& ident, const string& facet)
-{
- checkIdentity(ident);
- DeactivateController::Guard deactivateGuard(_deactivateController);
-
- {
- Lock sync(*this);
-
- StoreMap::iterator p = _storeMap.find(facet);
- if(p != _storeMap.end())
- {
- ObjectStore* store = (*p).second;
-
- EvictorElementPtr element = store->getIfPinned(ident);
- if(element != 0)
- {
- assert(!element->stale);
- if(element->keepCount > 0)
- {
- if(--element->keepCount == 0)
- {
- //
- // Add to front of evictor queue
- //
- // Note that the element cannot be destroyed or dead since
- // its keepCount was > 0.
- //
- _evictorList.push_front(element);
- _currentEvictorSize++;
- element->evictPosition = _evictorList.begin();
- }
- //
- // Success
- //
- return;
- }
- }
- }
- }
-
- NotRegisteredException ex(__FILE__, __LINE__);
- ex.kindOfObject = "servant";
- ex.id = _communicator->identityToString(ident);
- if(!facet.empty())
- {
- ex.id += " -f " + IceUtil::escapeString(facet, "");
- }
- throw ex;
-}
-
-EvictorIteratorPtr
-Freeze::EvictorI::getIterator(const string& facet, Int batchSize)
-{
- DeactivateController::Guard deactivateGuard(_deactivateController);
-
- ObjectStore* store = 0;
- {
- Lock sync(*this);
-
- StoreMap::iterator p = _storeMap.find(facet);
- if(p != _storeMap.end())
- {
- store = (*p).second;
- saveNowNoSync();
- }
- }
- return new EvictorIteratorI(store, batchSize);
-}
-
bool
-Freeze::EvictorI::hasObject(const Identity& ident)
+Freeze::EvictorIBase::hasObject(const Identity& ident)
{
return hasFacet(ident, "");
}
-bool
-Freeze::EvictorI::hasFacet(const Identity& ident, const string& facet)
-{
- DeactivateController::Guard deactivateGuard(_deactivateController);
- return hasFacetImpl(ident, facet);
-}
-
-bool
-Freeze::EvictorI::hasFacetImpl(const Identity& ident, const string& facet)
-{
- //
- // Must be called with _deactivateController locked.
- //
-
- checkIdentity(ident);
- ObjectStore* store = 0;
-
- {
- Lock sync(*this);
-
- StoreMap::iterator p = _storeMap.find(facet);
- if(p == _storeMap.end())
- {
- return false;
- }
-
- store = (*p).second;
-
- EvictorElementPtr element = store->getIfPinned(ident);
- if(element != 0)
- {
- assert(!element->stale);
-
- IceUtil::Mutex::Lock lock(element->mutex);
- return element->status != EvictorElement::dead &&
- element->status != EvictorElement::destroyed;
- }
- }
- return store->dbHasObject(ident);
-}
-
-bool
-Freeze::EvictorI::hasAnotherFacet(const Identity& ident, const string& facet)
-{
- //
- // Must be called with _deactivateController locked.
- //
-
- //
- // If the object exists in another store, throw FacetNotExistException
- // instead of returning 0 (== ObjectNotExistException)
- //
- StoreMap storeMapCopy;
- {
- Lock sync(*this);
- storeMapCopy = _storeMap;
- }
-
- for(StoreMap::iterator p = storeMapCopy.begin(); p != storeMapCopy.end(); ++p)
- {
- //
- // Do not check again the given facet
- //
- if((*p).first != facet)
- {
- ObjectStore* store = (*p).second;
-
- bool inCache = false;
- {
- Lock sync(*this);
-
- EvictorElementPtr element = store->getIfPinned(ident);
- if(element != 0)
- {
- inCache = true;
- assert(!element->stale);
-
- IceUtil::Mutex::Lock lock(element->mutex);
- if(element->status != EvictorElement::dead &&
- element->status != EvictorElement::destroyed)
- {
- return true;
- }
- }
- }
- if(!inCache)
- {
- if(store->dbHasObject(ident))
- {
- return true;
- }
- }
- }
- }
- return false;
-}
-
-
ObjectPtr
-Freeze::EvictorI::locate(const Current& current, LocalObjectPtr& cookie)
+Freeze::EvictorIBase::locate(const Current& current, LocalObjectPtr& cookie)
{
//
- // We need this guard because the application may call locate/finished/deactivate
- // directly.
- //
- DeactivateController::Guard deactivateGuard(_deactivateController);
-
- //
// Special ice_ping() handling
//
if(current.operation == "ice_ping")
{
- if(hasFacetImpl(current.id, current.facet))
+ if(hasFacet(current.id, current.facet))
{
if(_trace >= 3)
{
@@ -1067,186 +271,10 @@ Freeze::EvictorI::locate(const Current& current, LocalObjectPtr& cookie)
}
-ObjectPtr
-Freeze::EvictorI::locateImpl(const Current& current, LocalObjectPtr& cookie)
-{
- cookie = 0;
-
- ObjectStore* store = findStore(current.facet);
- if(store == 0)
- {
- if(_trace >= 2)
- {
- Trace out(_communicator->getLogger(), "Freeze.Evictor");
- out << "locate could not find a database for facet \"" << current.facet << "\"";
- }
- return 0;
- }
-
- for(;;)
- {
- EvictorElementPtr element = store->pin(current.id);
- if(element == 0)
- {
- if(_trace >= 2)
- {
- Trace out(_communicator->getLogger(), "Freeze.Evictor");
- out << "locate could not find \"" << _communicator->identityToString(current.id) << "\" in Db \""
- << _filename << "\"";
- }
- return 0;
- }
-
- Lock sync(*this);
-
- if(element->stale)
- {
- //
- // try again
- //
- continue;
- }
-
-
- IceUtil::Mutex::Lock lockElement(element->mutex);
- if(element->status == EvictorElement::destroyed || element->status == EvictorElement::dead)
- {
- if(_trace >= 2)
- {
- Trace out(_communicator->getLogger(), "Freeze.Evictor");
- out << "locate found \"" << _communicator->identityToString(current.id)
- << "\" in the cache for database \"" << current.facet << "\" but it was dead or destroyed";
- }
- return 0;
- }
-
- //
- // It's a good one!
- //
- if(_trace >= 2)
- {
- Trace out(_communicator->getLogger(), "Freeze.Evictor");
- out << "locate found \"" << _communicator->identityToString(current.id) << "\" in Db \""
- << _filename << "\"";
- }
-
- fixEvictPosition(element);
- element->usageCount++;
- cookie = element;
- assert(element->rec.servant != 0);
- return element->rec.servant;
- }
-}
-
-void
-Freeze::EvictorI::finished(const Current& current, const ObjectPtr& servant, const LocalObjectPtr& cookie)
-{
- assert(servant);
-
- //
- // If only Ice calls locate/finished/deactivate, then it cannot be deactivated.
- //
- DeactivateController::Guard deactivateGuard(_deactivateController);
-
- if(cookie != 0)
- {
- EvictorElementPtr element = EvictorElementPtr::dynamicCast(cookie);
- assert(element);
-
- bool enqueue = false;
-
- if((_useNonmutating && current.mode != Nonmutating) ||
- (servant->ice_operationAttributes(current.operation) & 0x1) != 0)
- {
- IceUtil::Mutex::Lock lock(element->mutex);
-
- if(element->status == EvictorElement::clean)
- {
- //
- // Assume this operation updated the object
- //
- element->status = EvictorElement::modified;
- enqueue = true;
- }
- }
-
- Lock sync(*this);
-
- //
- // Only elements with a usageCount == 0 can become stale and we own
- // one count!
- //
- assert(!element->stale);
- assert(element->usageCount >= 1);
-
- //
- // Decrease the usage count of the evictor queue element.
- //
- element->usageCount--;
-
- if(enqueue)
- {
- addToModifiedQueue(element);
- }
- else if(element->usageCount == 0 && element->keepCount == 0)
- {
- //
- // Evict as many elements as necessary.
- //
- evict();
- }
- }
-}
-
-void
-Freeze::EvictorI::deactivate(const string&)
-{
- if(_deactivateController.deactivate())
- {
- try
- {
- Lock sync(*this);
-
- saveNowNoSync();
-
- //
- // Set the evictor size to zero, meaning that we will evict
- // everything possible.
- //
- _evictorSize = 0;
- evict();
-
- _savingThreadDone = true;
- notifyAll();
- sync.release();
- getThreadControl().join();
-
- if(_watchDogThread != 0)
- {
- _watchDogThread->terminate();
- _watchDogThread->getThreadControl().join();
- }
-
- for(StoreMap::iterator p = _storeMap.begin(); p != _storeMap.end(); ++p)
- {
- (*p).second->close();
- }
-
- _dbEnv = 0;
- _initializer = 0;
- }
- catch(...)
- {
- _deactivateController.deactivationComplete();
- throw;
- }
- _deactivateController.deactivationComplete();
- }
-}
void
-Freeze::EvictorI::initialize(const Identity& ident, const string& facet, const ObjectPtr& servant)
+Freeze::EvictorIBase::initialize(const Identity& ident, const string& facet, const ObjectPtr& servant)
{
if(_initializer != 0)
{
@@ -1254,585 +282,31 @@ Freeze::EvictorI::initialize(const Identity& ident, const string& facet, const O
}
}
-
-void
-Freeze::EvictorI::run()
+void
+Freeze::EvictorIBase::updateStats(Statistics& stats, IceUtil::Int64 time)
{
- try
+ IceUtil::Int64 diff = time - (stats.creationTime + stats.lastSaveTime);
+ if(stats.lastSaveTime == 0)
{
- for(;;)
- {
- deque<EvictorElementPtr> allObjects;
- deque<EvictorElementPtr> deadObjects;
-
- size_t saveNowThreadsSize = 0;
-
- {
- Lock sync(*this);
-
- while(!_savingThreadDone &&
- (_saveNowThreads.size() == 0) &&
- (_saveSizeTrigger < 0 || static_cast<Int>(_modifiedQueue.size()) < _saveSizeTrigger))
- {
- if(_savePeriod == IceUtil::Time::milliSeconds(0))
- {
- wait();
- }
- else if(timedWait(_savePeriod) == false)
- {
- //
- // Timeout, so let's save
- //
- break; // while
- }
- }
-
- saveNowThreadsSize = _saveNowThreads.size();
-
- if(_savingThreadDone)
- {
- assert(_modifiedQueue.size() == 0);
- assert(saveNowThreadsSize == 0);
- break; // for(;;)
- }
-
- //
- // Check first if there is something to do!
- //
- if(_modifiedQueue.size() == 0)
- {
- if(saveNowThreadsSize > 0)
- {
- _saveNowThreads.clear();
- notifyAll();
- }
- continue; // for(;;)
- }
-
- _modifiedQueue.swap(allObjects);
- }
-
- const size_t size = allObjects.size();
-
- deque<StreamedObject> streamedObjectQueue;
-
- Long streamStart = IceUtil::Time::now().toMilliSeconds();
-
- //
- // Stream each element
- //
- for(size_t i = 0; i < size; i++)
- {
- EvictorElementPtr& element = allObjects[i];
-
- bool tryAgain;
- do
- {
- tryAgain = false;
- ObjectPtr servant = 0;
-
- //
- // These elements can't be stale as only elements with
- // usageCount == 0 can become stale, and the modifiedQueue
- // (us now) owns one count.
- //
-
- IceUtil::Mutex::Lock lockElement(element->mutex);
- Byte status = element->status;
-
- switch(status)
- {
- case EvictorElement::created:
- case EvictorElement::modified:
- {
- servant = element->rec.servant;
- break;
- }
- case EvictorElement::destroyed:
- {
- size_t index = streamedObjectQueue.size();
- streamedObjectQueue.resize(index + 1);
- StreamedObject& obj = streamedObjectQueue[index];
- stream(element, streamStart, obj);
-
- element->status = EvictorElement::dead;
- deadObjects.push_back(element);
-
- break;
- }
- case EvictorElement::dead:
- {
- deadObjects.push_back(element);
- break;
- }
- default:
- {
- //
- // Nothing to do (could be a duplicate)
- //
- break;
- }
- }
- if(servant == 0)
- {
- lockElement.release();
- }
- else
- {
- IceUtil::AbstractMutex* mutex = dynamic_cast<IceUtil::AbstractMutex*>(servant.get());
- if(mutex != 0)
- {
- //
- // Lock servant and then element so that user can safely lock
- // servant and call various Evictor operations
- //
-
- IceUtil::AbstractMutex::TryLock lockServant(*mutex);
- if(!lockServant.acquired())
- {
- lockElement.release();
-
- if(_watchDogThread != 0)
- {
- _watchDogThread->activate();
- }
- lockServant.acquire();
- if(_watchDogThread != 0)
- {
- _watchDogThread->deactivate();
- }
-
- lockElement.acquire();
- status = element->status;
- }
-
- switch(status)
- {
- case EvictorElement::created:
- case EvictorElement::modified:
- {
- if(servant == element->rec.servant)
- {
- size_t index = streamedObjectQueue.size();
- streamedObjectQueue.resize(index + 1);
- StreamedObject& obj = streamedObjectQueue[index];
- stream(element, streamStart, obj);
-
- element->status = EvictorElement::clean;
- }
- else
- {
- tryAgain = true;
- }
- break;
- }
- case EvictorElement::destroyed:
- {
- lockServant.release();
-
- size_t index = streamedObjectQueue.size();
- streamedObjectQueue.resize(index + 1);
- StreamedObject& obj = streamedObjectQueue[index];
- stream(element, streamStart, obj);
-
- element->status = EvictorElement::dead;
- deadObjects.push_back(element);
- break;
- }
- case EvictorElement::dead:
- {
- deadObjects.push_back(element);
- break;
- }
- default:
- {
- //
- // Nothing to do (could be a duplicate)
- //
- break;
- }
- }
- }
- else
- {
- DatabaseException ex(__FILE__, __LINE__);
- ex.message = string(typeid(*element->rec.servant).name())
- + " does not implement IceUtil::AbstractMutex";
- throw ex;
- }
- }
- } while(tryAgain);
- }
-
- if(_trace >= 1)
- {
- Long now = IceUtil::Time::now().toMilliSeconds();
- Trace out(_communicator->getLogger(), "Freeze.Evictor");
- out << "streamed " << streamedObjectQueue.size() << " objects in "
- << static_cast<Int>(now - streamStart) << " ms";
- }
-
- //
- // Now let's save all these streamed objects to disk using a transaction
- //
-
- //
- // Each time we get a deadlock, we reduce the number of objects to save
- // per transaction
- //
- size_t txSize = streamedObjectQueue.size();
- if(txSize > static_cast<size_t>(_maxTxSize))
- {
- txSize = static_cast<size_t>(_maxTxSize);
- }
- bool tryAgain;
-
- do
- {
- tryAgain = false;
-
- while(streamedObjectQueue.size() > 0)
- {
- if(txSize > streamedObjectQueue.size())
- {
- txSize = streamedObjectQueue.size();
- }
-
- Long saveStart = IceUtil::Time::now().toMilliSeconds();
- try
- {
- DbTxn* tx = 0;
- _dbEnv->getEnv()->txn_begin(0, &tx, 0);
-
- long txnId = 0;
- if(_txTrace >= 1)
- {
- txnId = (tx->id() & 0x7FFFFFFF) + 0x80000000L;
- Trace out(_communicator->getLogger(), "Freeze.Evictor");
- out << "started transaction " << hex << txnId << dec << " in saving thread";
- }
-
- try
- {
- for(size_t i = 0; i < txSize; i++)
- {
- StreamedObject& obj = streamedObjectQueue[i];
- obj.store->save(obj.key, obj.value, obj.status, tx);
- }
- }
- catch(...)
- {
- tx->abort();
- if(_txTrace >= 1)
- {
- Trace out(_communicator->getLogger(), "Freeze.Evictor");
- out << "rolled back transaction " << hex << txnId << dec;
- }
- throw;
- }
- tx->commit(0);
-
- if(_txTrace >= 1)
- {
- Trace out(_communicator->getLogger(), "Freeze.Evictor");
- out << "committed transaction " << hex << txnId << dec;
- }
-
- streamedObjectQueue.erase
- (streamedObjectQueue.begin(),
- streamedObjectQueue.begin() + txSize);
-
- if(_trace >= 1)
- {
- Long now = IceUtil::Time::now().toMilliSeconds();
- Trace out(_communicator->getLogger(), "Freeze.Evictor");
- out << "saved " << txSize << " objects in "
- << static_cast<Int>(now - saveStart) << " ms";
- }
- }
- catch(const DbDeadlockException&)
- {
- if(_deadlockWarning)
- {
- Warning out(_communicator->getLogger());
- out << "Deadlock in Freeze::EvictorI::run while writing into Db \"" + _filename
- + "\"; retrying ...";
- }
-
- tryAgain = true;
- txSize = (txSize + 1)/2;
- }
- catch(const DbException& dx)
- {
- DatabaseException ex(__FILE__, __LINE__);
- ex.message = dx.what();
- throw ex;
- }
- }
- }
- while(tryAgain);
-
- {
- Lock sync(*this);
-
- //
- // Release usage count
- //
- for(deque<EvictorElementPtr>::iterator p = allObjects.begin();
- p != allObjects.end(); p++)
- {
- EvictorElementPtr& element = *p;
- element->usageCount--;
- }
- allObjects.clear();
-
- for(deque<EvictorElementPtr>::iterator q = deadObjects.begin();
- q != deadObjects.end(); q++)
- {
- EvictorElementPtr& element = *q;
- if(!element->stale)
- {
- //
- // Can be stale when there are duplicate elements on the
- // deadObjecst queue
- //
-
- if(!element->stale && element->usageCount == 0 && element->keepCount == 0)
- {
- //
- // Get rid of unused dead elements
- //
- IceUtil::Mutex::Lock lockElement(element->mutex);
- if(element->status == EvictorElement::dead)
- {
- evict(element);
- }
- }
- }
- }
- deadObjects.clear();
- evict();
-
- if(saveNowThreadsSize > 0)
- {
- _saveNowThreads.erase(_saveNowThreads.begin(), _saveNowThreads.begin() + saveNowThreadsSize);
- notifyAll();
- }
- }
- }
+ stats.lastSaveTime = diff;
+ stats.avgSaveTime = diff;
}
- catch(const IceUtil::Exception& ex)
- {
- Error out(_communicator->getLogger());
- out << "Saving thread killed by exception: " << ex;
- out.flush();
- handleFatalError(this, _communicator);
- }
- catch(const std::exception& ex)
- {
- Error out(_communicator->getLogger());
- out << "Saving thread killed by std::exception: " << ex.what();
- out.flush();
- handleFatalError(this, _communicator);
- }
- catch(...)
+ else
{
- Error out(_communicator->getLogger());
- out << "Saving thread killed by unknown exception";
- out.flush();
- handleFatalError(this, _communicator);
+ stats.lastSaveTime = time - stats.creationTime;
+ stats.avgSaveTime = static_cast<IceUtil::Int64>(stats.avgSaveTime * 0.95 + diff * 0.05);
}
}
const string&
-Freeze::EvictorI::filename() const
+Freeze::EvictorIBase::filename() const
{
return _filename;
}
-void
-Freeze::EvictorI::saveNow()
-{
- Lock sync(*this);
- saveNowNoSync();
-}
-
-void
-Freeze::EvictorI::saveNowNoSync()
-{
- IceUtil::ThreadControl myself;
-
- _saveNowThreads.push_back(myself);
- notifyAll();
- do
- {
- wait();
- }
- while(find(_saveNowThreads.begin(), _saveNowThreads.end(), myself) != _saveNowThreads.end());
-}
-
-void
-Freeze::EvictorI::evict()
-{
- //
- // Must be called with *this locked
- //
-
- assert(_currentEvictorSize == _evictorList.size());
-
- list<EvictorElementPtr>::reverse_iterator p = _evictorList.rbegin();
-
- while(_currentEvictorSize > _evictorSize)
- {
- //
- // Get the last unused element from the evictor queue.
- //
- while(p != _evictorList.rend())
- {
- if((*p)->usageCount == 0)
- {
- break; // Fine, servant is not in use (and not in the modifiedQueue)
- }
- ++p;
- }
- if(p == _evictorList.rend())
- {
- //
- // All servants are active, can't evict any further.
- //
- break;
- }
-
- EvictorElementPtr& element = *p;
- assert(!element->stale);
- assert(element->keepCount == 0);
-
- if(_trace >= 2 || (_trace >= 1 && _evictorList.size() % 50 == 0))
- {
- string facet = element->store.facet();
-
- Trace out(_communicator->getLogger(), "Freeze.Evictor");
- out << "evicting \"" << _communicator->identityToString(element->cachePosition->first) << "\" ";
- if(facet != "")
- {
- out << "-f \"" << facet << "\" ";
- }
- out << "from the queue\n"
- << "number of elements in the queue: " << _currentEvictorSize;
- }
-
- //
- // Remove last unused element from the evictor queue.
- //
- element->stale = true;
- element->store.unpin(element->cachePosition);
- p = list<EvictorElementPtr>::reverse_iterator(_evictorList.erase(element->evictPosition));
- _currentEvictorSize--;
- }
-}
-
-void
-Freeze::EvictorI::fixEvictPosition(const EvictorElementPtr& element)
-{
- assert(!element->stale);
-
- if(element->keepCount == 0)
- {
- if(element->usageCount < 0)
- {
- //
- // New object
- //
- element->usageCount = 0;
- _currentEvictorSize++;
- }
- else
- {
- _evictorList.erase(element->evictPosition);
- }
- _evictorList.push_front(element);
- element->evictPosition = _evictorList.begin();
- }
-}
-
-void
-Freeze::EvictorI::evict(const EvictorElementPtr& element)
-{
- assert(!element->stale);
- assert(element->keepCount == 0);
-
- _evictorList.erase(element->evictPosition);
- _currentEvictorSize--;
- element->stale = true;
- element->store.unpin(element->cachePosition);
-}
-
-
-void
-Freeze::EvictorI::addToModifiedQueue(const EvictorElementPtr& element)
-{
- element->usageCount++;
- _modifiedQueue.push_back(element);
-
- if(_saveSizeTrigger >= 0 && static_cast<Int>(_modifiedQueue.size()) >= _saveSizeTrigger)
- {
- notifyAll();
- }
-}
-
-
-void
-Freeze::EvictorI::stream(const EvictorElementPtr& element, Long streamStart, StreamedObject& obj)
-{
- assert(element->status != EvictorElement::dead);
-
- obj.status = element->status;
- obj.store = &element->store;
-
- const Identity& ident = element->cachePosition->first;
- ObjectStore::marshal(ident, obj.key, _communicator);
-
- if(element->status != EvictorElement::destroyed)
- {
- //
- // Update stats first
- //
- Statistics& stats = element->rec.stats;
- Long diff = streamStart - (stats.creationTime + stats.lastSaveTime);
- if(stats.lastSaveTime == 0)
- {
- stats.lastSaveTime = diff;
- stats.avgSaveTime = diff;
- }
- else
- {
- stats.lastSaveTime = streamStart - stats.creationTime;
- stats.avgSaveTime = static_cast<Long>(stats.avgSaveTime * 0.95 + diff * 0.05);
- }
- ObjectStore::marshal(element->rec, obj.value, _communicator);
- }
-}
-
-Freeze::ObjectStore*
-Freeze::EvictorI::findStore(const string& facet) const
-{
- Lock sync(*this);
-
- StoreMap::const_iterator p = _storeMap.find(facet);
- if(p == _storeMap.end())
- {
- return 0;
- }
- else
- {
- return (*p).second;
- }
-}
-
-
vector<string>
-Freeze::EvictorI::allDbs() const
+Freeze::EvictorIBase::allDbs() const
{
vector<string> result;
diff --git a/cpp/src/Freeze/EvictorI.h b/cpp/src/Freeze/EvictorI.h
index 187294cb8c6..b2f4b5111c5 100644
--- a/cpp/src/Freeze/EvictorI.h
+++ b/cpp/src/Freeze/EvictorI.h
@@ -14,6 +14,7 @@
#include <Ice/Ice.h>
#include <Freeze/Freeze.h>
#include <Freeze/ObjectStore.h>
+#include <Freeze/EvictorIteratorI.h>
#include <Freeze/SharedDbEnv.h>
#include <Freeze/Index.h>
#include <Freeze/DB.h>
@@ -22,15 +23,15 @@
#include <deque>
#include <IceUtil/DisableWarnings.h>
+class DbTxn;
namespace Freeze
{
-class EvictorI;
+class EvictorIBase;
//
-// Helper class to prevent deactivation while the Evictor is in use,
-// and to queue deactivate() calls.
+// Helper class to prevent deactivation while the Evictor is in use
//
class DeactivateController : private IceUtil::Monitor<IceUtil::Mutex>
{
@@ -50,7 +51,7 @@ public:
DeactivateController& _controller;
};
- DeactivateController(EvictorI*);
+ DeactivateController(EvictorIBase*);
//
// Used mostly in asserts
@@ -69,87 +70,29 @@ private:
friend class Guard;
- EvictorI* _evictor;
+ EvictorIBase* _evictor;
bool _deactivating;
bool _deactivated;
int _guardCount;
};
-class EvictorI;
-
-//
-// The WatchDogThread is used by the saving thread to ensure the
-// streaming of some object does not take more than timeout ms.
-// We only measure the time necessary to acquire the lock on the
-// object (servant), not the streaming itself.
-//
-
-class WatchDogThread : public IceUtil::Thread, private IceUtil::Monitor<IceUtil::Mutex>
+class EvictorIBase : public virtual Evictor, public IceUtil::Monitor<IceUtil::Mutex>
{
public:
-
- WatchDogThread(long, EvictorI&);
-
- void run();
-
- void activate();
- void deactivate();
- void terminate();
-
-private:
- const IceUtil::Time _timeout;
- EvictorI& _evictor;
- bool _done;
- bool _active;
-};
-typedef IceUtil::Handle<WatchDogThread> WatchDogThreadPtr;
-
-
-class EvictorI : public Evictor, public IceUtil::Monitor<IceUtil::Mutex>, public IceUtil::Thread
-{
-public:
-
- EvictorI(const Ice::ObjectAdapterPtr&, const std::string&, DbEnv*, const std::string&,
- const ServantInitializerPtr&, const std::vector<IndexPtr>&, bool);
-
- virtual ~EvictorI();
+ virtual DbTxn* beforeQuery() = 0;
virtual void setSize(Ice::Int);
virtual Ice::Int getSize();
virtual Ice::ObjectPrx add(const Ice::ObjectPtr&, const Ice::Identity&);
- virtual Ice::ObjectPrx addFacet(const Ice::ObjectPtr&, const Ice::Identity&, const std::string&);
-
virtual Ice::ObjectPtr remove(const Ice::Identity&);
- virtual Ice::ObjectPtr removeFacet(const Ice::Identity&, const std::string&);
-
- virtual void keep(const Ice::Identity&);
- virtual void keepFacet(const Ice::Identity&, const std::string&);
-
- virtual void release(const Ice::Identity&);
- virtual void releaseFacet(const Ice::Identity&, const std::string&);
virtual bool hasObject(const Ice::Identity&);
- virtual bool hasFacet(const Ice::Identity&, const std::string&);
-
- virtual EvictorIteratorPtr getIterator(const std::string&, Ice::Int);
virtual Ice::ObjectPtr locate(const Ice::Current&, Ice::LocalObjectPtr&);
- virtual void finished(const Ice::Current&, const Ice::ObjectPtr&, const Ice::LocalObjectPtr&);
- virtual void deactivate(const std::string&);
-
- //
- // Thread
- //
- virtual void run();
-
- //
- // Accessors for other classes
- //
- void saveNow();
-
+
DeactivateController& deactivateController();
const Ice::CommunicatorPtr& communicator() const;
const SharedDbEnvPtr& dbEnv() const;
@@ -159,62 +102,33 @@ public:
Ice::Int trace() const;
Ice::Int txTrace() const;
-
void initialize(const Ice::Identity&, const std::string&, const Ice::ObjectPtr&);
- struct StreamedObject
- {
- Key key;
- Value value;
- Ice::Byte status;
- ObjectStore* store;
- };
+ static void updateStats(Statistics&, IceUtil::Int64);
-
static std::string defaultDb;
static std::string indexPrefix;
-private:
-
- Ice::ObjectPtr locateImpl(const Ice::Current&, Ice::LocalObjectPtr&);
- bool hasFacetImpl(const Ice::Identity&, const std::string&);
- bool hasAnotherFacet(const Ice::Identity&, const std::string&);
-
- void evict();
- void evict(const EvictorElementPtr&);
- void addToModifiedQueue(const EvictorElementPtr&);
- void fixEvictPosition(const EvictorElementPtr&);
+protected:
+
+ EvictorIBase(const Ice::ObjectAdapterPtr&, const std::string&, DbEnv*, const std::string&,
+ const FacetTypeMap&, const ServantInitializerPtr&, bool);
- void stream(const EvictorElementPtr&, Ice::Long, StreamedObject&);
- void saveNowNoSync();
- ObjectStore* findStore(const std::string&) const;
+ virtual bool hasAnotherFacet(const Ice::Identity&, const std::string&) = 0;
+
+ virtual Ice::ObjectPtr locateImpl(const Ice::Current&, Ice::LocalObjectPtr&) = 0;
+
+ virtual void evict() = 0;
std::vector<std::string> allDbs() const;
-
- typedef std::map<std::string, ObjectStore*> StoreMap;
- StoreMap _storeMap;
+ size_t _evictorSize;
- //
- // The _evictorList contains a list of all objects we keep,
- // with the most recently used first.
- //
- std::list<EvictorElementPtr> _evictorList;
- std::list<EvictorElementPtr>::size_type _evictorSize;
- std::list<EvictorElementPtr>::size_type _currentEvictorSize;
-
- //
- // The _modifiedQueue contains a queue of all modified objects
- // Each element in the queue "owns" a usage count, to ensure the
- // element containing the pointed element remains in the cache.
- //
- std::deque<EvictorElementPtr> _modifiedQueue;
+ FacetTypeMap _facetTypes;
DeactivateController _deactivateController;
- bool _savingThreadDone;
- WatchDogThreadPtr _watchDogThread;
Ice::ObjectAdapterPtr _adapter;
Ice::CommunicatorPtr _communicator;
@@ -229,54 +143,195 @@ private:
Ice::Int _trace;
Ice::Int _txTrace;
- //
- // Threads that have requested a "saveNow" and are waiting for
- // its completion
- //
- std::deque<IceUtil::ThreadControl> _saveNowThreads;
-
- Ice::Int _saveSizeTrigger;
- Ice::Int _maxTxSize;
- IceUtil::Time _savePeriod;
-
bool _deadlockWarning;
bool _useNonmutating;
+private:
+
Ice::ObjectPtr _pingObject;
};
+typedef IceUtil::Handle<EvictorIBase> EvictorIBasePtr;
+
+
+template<class T>
+class EvictorI : public EvictorIBase
+{
+public:
+
+ virtual EvictorIteratorPtr
+ getIterator(const std::string& facet, Ice::Int batchSize)
+ {
+ DeactivateController::Guard deactivateGuard(_deactivateController);
+
+ DbTxn* tx = beforeQuery();
+ return new EvictorIteratorI(findStore(facet, false), tx, batchSize);
+ }
+
+protected:
+
+ EvictorI(const Ice::ObjectAdapterPtr& adapter, const std::string& envName, DbEnv* dbEnv,
+ const std::string& filename, const FacetTypeMap& facetTypes,
+ const ServantInitializerPtr& initializer, const std::vector<IndexPtr>& indices, bool createDb) :
+ EvictorIBase(adapter, envName, dbEnv, filename, facetTypes, initializer, createDb)
+ {
+ std::string propertyPrefix = std::string("Freeze.Evictor.") + envName + '.' + filename;
+ bool populateEmptyIndices =
+ (_communicator->getProperties()->
+ getPropertyAsIntWithDefault(propertyPrefix + ".PopulateEmptyIndices", 0) != 0);
+
+ //
+ // Instantiate all Dbs in 2 steps:
+ // (1) iterate over the indices and create ObjectStore with indices
+ // (2) open ObjectStores without indices
+ //
+ std::vector<std::string> dbs = allDbs();
+
+ //
+ // Add default db in case it's not there
+ //
+ dbs.push_back(defaultDb);
+
+ for(std::vector<IndexPtr>::const_iterator i = indices.begin(); i != indices.end(); ++i)
+ {
+ std::string facet = (*i)->facet();
+
+ typename StoreMap::iterator q = _storeMap.find(facet);
+ if(q == _storeMap.end())
+ {
+ //
+ // New db
+ //
+ std::vector<IndexPtr> storeIndices;
+
+ for(std::vector<IndexPtr>::const_iterator r = i; r != indices.end(); ++r)
+ {
+ if((*r)->facet() == facet)
+ {
+ storeIndices.push_back(*r);
+ }
+ }
+ std::string facetType;
+ FacetTypeMap::const_iterator ft = facetTypes.find(facet);
+ if(ft != facetTypes.end())
+ {
+ facetType = ft->second;
+ }
+ ObjectStore<T>* store = new ObjectStore<T>(facet, facetType,_createDb, this, storeIndices, populateEmptyIndices);
+ _storeMap.insert(typename StoreMap::value_type(facet, store));
+ }
+ }
+
+ for(std::vector<std::string>::iterator p = dbs.begin(); p != dbs.end(); ++p)
+ {
+ std::string facet = *p;
+ if(facet == defaultDb)
+ {
+ facet = "";
+ }
+
+ std::pair<typename StoreMap::iterator, bool> ir =
+ _storeMap.insert(typename StoreMap::value_type(facet, 0));
+
+ if(ir.second)
+ {
+ std::string facetType;
+ FacetTypeMap::const_iterator ft = facetTypes.find(facet);
+ if(ft != facetTypes.end())
+ {
+ facetType = ft->second;
+ }
+
+ ir.first->second = new ObjectStore<T>(facet, facetType, _createDb, this);
+ }
+ }
+ }
+
+ ObjectStore<T>*
+ findStore(const std::string& facet, bool createIt)
+ {
+ Lock sync(*this);
+ ObjectStore<T>* os = 0;
+
+ typename StoreMap::const_iterator p = _storeMap.find(facet);
+ if(p != _storeMap.end())
+ {
+ os = (*p).second;
+ }
+ else if(createIt)
+ {
+ std::string facetType;
+ typename FacetTypeMap::const_iterator q = _facetTypes.find(facet);
+ if(q != _facetTypes.end())
+ {
+ facetType = q->second;
+ }
+ os = new ObjectStore<T>(facet, facetType, true, this);
+ _storeMap.insert(typename StoreMap::value_type(facet, os));
+ }
+ return os;
+ }
+
+ void
+ closeDbEnv()
+ {
+ for(typename StoreMap::iterator p = _storeMap.begin(); p != _storeMap.end(); ++p)
+ {
+ delete (*p).second;
+ }
+
+ _dbEnv = 0;
+ _initializer = 0;
+ }
+
+ typedef std::map<std::string, ObjectStore<T>*> StoreMap;
+ StoreMap _storeMap;
+};
+
inline DeactivateController&
-EvictorI::deactivateController()
+EvictorIBase::deactivateController()
{
return _deactivateController;
}
inline const Ice::CommunicatorPtr&
-EvictorI::communicator() const
+EvictorIBase::communicator() const
{
return _communicator;
}
inline const SharedDbEnvPtr&
-EvictorI::dbEnv() const
+EvictorIBase::dbEnv() const
{
return _dbEnv;
}
inline bool
-EvictorI::deadlockWarning() const
+EvictorIBase::deadlockWarning() const
{
return _deadlockWarning;
}
inline Ice::Int
-EvictorI::trace() const
+EvictorIBase::trace() const
{
return _trace;
}
+//
+// Helper function
+//
+inline void
+checkIdentity(const Ice::Identity& ident)
+{
+ if(ident.name.size() == 0)
+ {
+ throw Ice::IllegalIdentityException(__FILE__, __LINE__, ident);
+ }
+}
+
}
#endif
diff --git a/cpp/src/Freeze/EvictorIteratorI.cpp b/cpp/src/Freeze/EvictorIteratorI.cpp
index 68feab953aa..be3fe251c9e 100644
--- a/cpp/src/Freeze/EvictorIteratorI.cpp
+++ b/cpp/src/Freeze/EvictorIteratorI.cpp
@@ -17,12 +17,13 @@ using namespace Freeze;
using namespace Ice;
-Freeze::EvictorIteratorI::EvictorIteratorI(ObjectStore* store, Int batchSize) :
+Freeze::EvictorIteratorI::EvictorIteratorI(ObjectStoreBase* store, DbTxn* tx, Int batchSize) :
_store(store),
_batchSize(static_cast<size_t>(batchSize)),
_key(1024),
_more(store != 0),
- _initialized(false)
+ _initialized(false),
+ _tx(tx)
{
_batchIterator = _batch.end();
}
@@ -68,9 +69,6 @@ Freeze::EvictorIteratorI::nextBatch()
{
return _batch.end();
}
-
- vector<EvictorElementPtr> evictorElements;
- evictorElements.reserve(_batchSize);
Key firstKey = _key;
@@ -81,7 +79,6 @@ Freeze::EvictorIteratorI::nextBatch()
for(;;)
{
_batch.clear();
- evictorElements.clear();
Dbt dbKey;
initializeOutDbt(_key, dbKey);
@@ -111,7 +108,7 @@ Freeze::EvictorIteratorI::nextBatch()
dbKey.set_size(static_cast<u_int32_t>(firstKey.size()));
}
- _store->db()->cursor(0, &dbc, 0);
+ _store->db()->cursor(_tx, &dbc, 0);
bool done = false;
do
@@ -135,7 +132,7 @@ Freeze::EvictorIteratorI::nextBatch()
flags = DB_NEXT;
Ice::Identity ident;
- ObjectStore::unmarshal(ident, _key, communicator);
+ ObjectStoreBase::unmarshal(ident, _key, communicator);
if(_batch.size() < _batchSize)
{
_batch.push_back(ident);
@@ -167,7 +164,7 @@ Freeze::EvictorIteratorI::nextBatch()
toClose->close();
break; // for (;;)
}
- catch(const DbDeadlockException&)
+ catch(const DbDeadlockException& dx)
{
if(dbc != 0)
{
@@ -177,15 +174,25 @@ Freeze::EvictorIteratorI::nextBatch()
}
catch(const DbDeadlockException&)
{
- //
- // Ignored
- //
+ if(_tx != 0)
+ {
+ throw;
+ }
+ // Else, ignored
}
}
- _key = firstKey;
- //
- // Retry
- //
+
+ if(_tx == 0)
+ {
+ _key = firstKey;
+ //
+ // Retry
+ //
+ }
+ else
+ {
+ throw;
+ }
}
catch(...)
{
@@ -197,15 +204,21 @@ Freeze::EvictorIteratorI::nextBatch()
}
catch(const DbDeadlockException&)
{
- //
- // Ignored
- //
+ if(_tx != 0)
+ {
+ throw;
+ }
+ // Else, ignored
}
}
throw;
}
}
}
+ catch(const DbDeadlockException& dx)
+ {
+ throw DeadlockException(__FILE__, __LINE__, dx.what());
+ }
catch(const DbException& dx)
{
handleDbException(dx, __FILE__, __LINE__);
diff --git a/cpp/src/Freeze/EvictorIteratorI.h b/cpp/src/Freeze/EvictorIteratorI.h
index c5f3bba091f..b69b5dc3d8f 100644
--- a/cpp/src/Freeze/EvictorIteratorI.h
+++ b/cpp/src/Freeze/EvictorIteratorI.h
@@ -17,13 +17,13 @@
namespace Freeze
{
-class ObjectStore;
+class ObjectStoreBase;
class EvictorIteratorI : public EvictorIterator
{
public:
- EvictorIteratorI(ObjectStore*, Ice::Int);
+ EvictorIteratorI(ObjectStoreBase*, DbTxn*, Ice::Int);
virtual bool hasNext();
virtual Ice::Identity next();
@@ -33,7 +33,7 @@ private:
std::vector<Ice::Identity>::const_iterator
nextBatch();
- ObjectStore* _store;
+ ObjectStoreBase* _store;
size_t _batchSize;
std::vector<Ice::Identity>::const_iterator _batchIterator;
@@ -41,6 +41,7 @@ private:
std::vector<Ice::Identity> _batch;
bool _more;
bool _initialized;
+ DbTxn* _tx;
};
}
diff --git a/cpp/src/Freeze/IndexI.cpp b/cpp/src/Freeze/IndexI.cpp
index ca9c21e095a..5679e93fa02 100644
--- a/cpp/src/Freeze/IndexI.cpp
+++ b/cpp/src/Freeze/IndexI.cpp
@@ -48,7 +48,6 @@ Freeze::IndexI::untypedFindFirst(const Key& bytes, Int firstN) const
//
dbKey.set_flags(DB_DBT_USERMEM | DB_DBT_PARTIAL);
-
Key pkey(1024);
Dbt pdbKey;
initializeOutDbt(pkey, pdbKey);
@@ -57,8 +56,9 @@ Freeze::IndexI::untypedFindFirst(const Key& bytes, Int firstN) const
dbValue.set_flags(DB_DBT_USERMEM | DB_DBT_PARTIAL);
Ice::CommunicatorPtr communicator = _store->communicator();
- _store->evictor()->saveNow();
+ DbTxn* tx = _store->evictor()->beforeQuery();
+
vector<Identity> identities;
try
@@ -73,7 +73,7 @@ Freeze::IndexI::untypedFindFirst(const Key& bytes, Int firstN) const
//
// Move to the first record
//
- _db->cursor(0, &dbc, 0);
+ _db->cursor(tx, &dbc, 0);
u_int32_t flags = DB_SET;
bool found;
@@ -96,7 +96,7 @@ Freeze::IndexI::untypedFindFirst(const Key& bytes, Int firstN) const
pkey.resize(pdbKey.get_size());
Ice::Identity ident;
- ObjectStore::unmarshal(ident, pkey, communicator);
+ ObjectStoreBase::unmarshal(ident, pkey, communicator);
identities.push_back(ident);
flags = DB_NEXT_DUP;
}
@@ -129,9 +129,11 @@ Freeze::IndexI::untypedFindFirst(const Key& bytes, Int firstN) const
}
catch(const DbDeadlockException&)
{
- //
- // Ignored
- //
+ if(tx != 0)
+ {
+ throw;
+ }
+ // Else ignored
}
}
@@ -142,9 +144,11 @@ Freeze::IndexI::untypedFindFirst(const Key& bytes, Int firstN) const
<< _store->evictor()->filename() + "/" + _dbName << "\"; retrying ...";
}
- //
- // Retry
- //
+ if(tx != 0)
+ {
+ throw;
+ }
+ // Else retry
}
catch(...)
{
@@ -156,15 +160,21 @@ Freeze::IndexI::untypedFindFirst(const Key& bytes, Int firstN) const
}
catch(const DbDeadlockException&)
{
- //
- // Ignored
- //
+ if(tx != 0)
+ {
+ throw;
+ }
+ // Else ignored
}
}
throw;
}
}
}
+ catch(const DbDeadlockException& dx)
+ {
+ throw DeadlockException(__FILE__, __LINE__, dx.what());
+ }
catch(const DbException& dx)
{
handleDbException(dx, __FILE__, __LINE__);
@@ -198,7 +208,7 @@ Freeze::IndexI::untypedCount(const Key& bytes) const
Dbt dbValue;
dbValue.set_flags(DB_DBT_USERMEM | DB_DBT_PARTIAL);
- _store->evictor()->saveNow();
+ DbTxn* tx = _store->evictor()->beforeQuery();
Int result = 0;
try
@@ -212,7 +222,7 @@ Freeze::IndexI::untypedCount(const Key& bytes) const
//
// Move to the first record
//
- _db->cursor(0, &dbc, 0);
+ _db->cursor(tx, &dbc, 0);
bool found = (dbc->get(&dbKey, &dbValue, DB_SET) == 0);
if(found)
@@ -237,9 +247,11 @@ Freeze::IndexI::untypedCount(const Key& bytes) const
}
catch(const DbDeadlockException&)
{
- //
- // Ignored
- //
+ if(tx != 0)
+ {
+ throw;
+ }
+ // Else ignored
}
}
@@ -250,9 +262,12 @@ Freeze::IndexI::untypedCount(const Key& bytes) const
<< _store->evictor()->filename() + "/" + _dbName << "\"; retrying ...";
}
- //
- // Retry
- //
+ if(tx != 0)
+ {
+ throw;
+ }
+ // Else retry
+
}
catch(...)
{
@@ -264,15 +279,21 @@ Freeze::IndexI::untypedCount(const Key& bytes) const
}
catch(const DbDeadlockException&)
{
- //
- // Ignored
- //
+ if(tx != 0)
+ {
+ throw;
+ }
+ // Else ignored
}
}
throw;
}
}
}
+ catch(const DbDeadlockException& dx)
+ {
+ throw DeadlockException(__FILE__, __LINE__, dx.what());
+ }
catch(const DbException& dx)
{
DatabaseException ex(__FILE__, __LINE__);
@@ -284,7 +305,7 @@ Freeze::IndexI::untypedCount(const Key& bytes) const
}
void
-Freeze::IndexI::associate(ObjectStore* store, DbTxn* txn,
+Freeze::IndexI::associate(ObjectStoreBase* store, DbTxn* txn,
bool createDb, bool populateIndex)
{
assert(txn != 0);
@@ -301,7 +322,7 @@ Freeze::IndexI::associate(ObjectStore* store, DbTxn* txn,
flags = DB_CREATE;
}
- _dbName = EvictorI::indexPrefix + store->dbName() + "." + _index.name();
+ _dbName = EvictorIBase::indexPrefix + store->dbName() + "." + _index.name();
_db->open(txn, store->evictor()->filename().c_str(), _dbName.c_str(), DB_BTREE, flags, FREEZE_DB_MODE);
@@ -322,7 +343,7 @@ Freeze::IndexI::secondaryKeyCreate(Db* secondary, const Dbt* dbKey,
ObjectRecord rec;
Byte* first = static_cast<Byte*>(dbValue->get_data());
Value value(first, first + dbValue->get_size());
- ObjectStore::unmarshal(rec, value, communicator);
+ ObjectStoreBase::unmarshal(rec, value, communicator);
Key bytes;
if(_index.marshalKey(rec.servant, bytes))
@@ -354,9 +375,7 @@ Freeze::IndexI::close()
}
catch(const DbException& dx)
{
- DatabaseException ex(__FILE__, __LINE__);
- ex.message = dx.what();
- throw ex;
+ throw DatabaseException(__FILE__, __LINE__, dx.what());
}
_db.reset(0);
}
diff --git a/cpp/src/Freeze/IndexI.h b/cpp/src/Freeze/IndexI.h
index c9e7a10f2d0..ce2636c6ae1 100644
--- a/cpp/src/Freeze/IndexI.h
+++ b/cpp/src/Freeze/IndexI.h
@@ -17,7 +17,7 @@
namespace Freeze
{
-class ObjectStore;
+class ObjectStoreBase;
class IndexI
{
@@ -32,7 +32,7 @@ public:
Ice::Int untypedCount(const Key&) const;
void
- associate(ObjectStore* store, DbTxn* txn, bool createDb, bool populateIndex);
+ associate(ObjectStoreBase*, DbTxn*, bool, bool);
int
secondaryKeyCreate(Db*, const Dbt*, const Dbt*, Dbt*);
@@ -42,12 +42,10 @@ public:
private:
-
-
Index& _index;
std::string _dbName;
std::auto_ptr<Db> _db;
- ObjectStore* _store;
+ ObjectStoreBase* _store;
};
}
diff --git a/cpp/src/Freeze/Makefile b/cpp/src/Freeze/Makefile
index 97b11fe2977..5383d96591d 100644
--- a/cpp/src/Freeze/Makefile
+++ b/cpp/src/Freeze/Makefile
@@ -16,15 +16,17 @@ LIBNAME = $(call mklibname,Freeze)
TARGETS = $(call mklibtargets,$(libdir)/$(LIBFILENAME),$(libdir)/$(SONAME),$(libdir)/$(LIBNAME))
-OBJS = CatalogData.o \
+OBJS = BackgroundSaveEvictor.o \
+ BackgroundSaveEvictorI.o \
+ CatalogData.o \
Catalog.o \
ConnectionI.o \
Connection.o \
DB.o \
EvictorI.o \
EvictorIteratorI.o \
+ EvictorStorage.o \
Evictor.o \
- EvictorStorage.o \
Exception.o \
IndexI.o \
Index.o \
@@ -33,6 +35,9 @@ OBJS = CatalogData.o \
PingObject.o \
SharedDbEnv.o \
SharedDb.o \
+ TransactionalEvictor.o \
+ TransactionalEvictorI.o \
+ TransactionalEvictorContextI.o \
TransactionHolder.o \
TransactionI.o \
Transaction.o \
@@ -40,7 +45,8 @@ OBJS = CatalogData.o \
SRCS = $(OBJS:.o=.cpp)
-SLICE_SRCS = $(SDIR)/DB.ice \
+SLICE_SRCS = $(SDIR)/BackgroundSaveEvictor.ice \
+ $(SDIR)/DB.ice \
$(SDIR)/CatalogData.ice \
$(SDIR)/Connection.ice \
$(SDIR)/ConnectionF.ice \
@@ -48,6 +54,7 @@ SLICE_SRCS = $(SDIR)/DB.ice \
$(SDIR)/EvictorF.ice \
$(SDIR)/EvictorStorage.ice \
$(SDIR)/Evictor.ice \
+ $(SDIR)/TransactionalEvictor.ice \
$(SDIR)/Transaction.ice \
../Freeze/PingObject.ice
diff --git a/cpp/src/Freeze/ObjectStore.cpp b/cpp/src/Freeze/ObjectStore.cpp
index 24ab9ba484f..77556081f22 100644
--- a/cpp/src/Freeze/ObjectStore.cpp
+++ b/cpp/src/Freeze/ObjectStore.cpp
@@ -9,20 +9,20 @@
#include <Freeze/ObjectStore.h>
#include <Freeze/EvictorI.h>
+#include <Freeze/BackgroundSaveEvictorI.h>
#include <Freeze/Util.h>
-#include <Freeze/IndexI.h>
#include <Freeze/Catalog.h>
#include <Freeze/TransactionI.h>
+#include <Freeze/IndexI.h>
using namespace std;
using namespace Ice;
using namespace Freeze;
-
-Freeze::ObjectStore::ObjectStore(const string& facet,
- bool createDb, EvictorI* evictor,
- const vector<IndexPtr>& indices,
- bool populateEmptyIndices) :
+Freeze::ObjectStoreBase::ObjectStoreBase(const string& facet, const string& facetType,
+ bool createDb, EvictorIBase* evictor,
+ const vector<IndexPtr>& indices,
+ bool populateEmptyIndices) :
_facet(facet),
_evictor(evictor),
_indices(indices),
@@ -30,13 +30,27 @@ Freeze::ObjectStore::ObjectStore(const string& facet,
{
if(facet == "")
{
- _dbName = EvictorI::defaultDb;
+ _dbName = EvictorIBase::defaultDb;
}
else
{
_dbName = facet;
}
+ if(!facetType.empty())
+ {
+ //
+ // Create a sample servant with this type
+ //
+ ObjectFactoryPtr factory = _communicator->findObjectFactory(facetType);
+ if(factory == 0)
+ {
+ throw DatabaseException(__FILE__, __LINE__, "No object factory registered for type-id '" + facetType + "'");
+ }
+
+ _sampleServant = factory->create(facetType);
+ }
+
ConnectionPtr catalogConnection = createConnection(_communicator, evictor->dbEnv()->getEnvName());
Catalog catalog(catalogConnection, catalogName());
@@ -125,16 +139,7 @@ Freeze::ObjectStore::ObjectStore(const string& facet,
}
}
-Freeze::ObjectStore::~ObjectStore()
-{
- if(_db.get() != 0)
- {
- close();
- }
-}
-
-void
-Freeze::ObjectStore::close()
+Freeze::ObjectStoreBase::~ObjectStoreBase()
{
try
{
@@ -152,11 +157,10 @@ Freeze::ObjectStore::close()
ex.message = dx.what();
throw ex;
}
- _db.reset();
}
bool
-Freeze::ObjectStore::dbHasObject(const Identity& ident) const
+Freeze::ObjectStoreBase::dbHasObject(const Identity& ident, DbTxn* tx) const
{
Key key;
marshal(ident, key, _communicator);
@@ -173,7 +177,7 @@ Freeze::ObjectStore::dbHasObject(const Identity& ident) const
{
try
{
- int err = _db->get(0, &dbKey, &dbValue, 0);
+ int err = _db->get(tx, &dbKey, &dbValue, 0);
if(err == 0)
{
@@ -189,18 +193,20 @@ Freeze::ObjectStore::dbHasObject(const Identity& ident) const
throw DatabaseException(__FILE__, __LINE__);
}
}
- catch(const DbDeadlockException&)
+ catch(const DbDeadlockException& dx)
{
if(_evictor->deadlockWarning())
{
Warning out(_communicator->getLogger());
- out << "Deadlock in Freeze::ObjectStore::dbHasObject while searching \""
+ out << "Deadlock in Freeze::ObjectStoreBase::dbHasObject while searching \""
<< _evictor->filename() + "/" + _dbName << "\"; retrying ...";
}
- //
- // Ignored, try again
- //
+ if(tx != 0)
+ {
+ throw DeadlockException(__FILE__, __LINE__, dx.what());
+ }
+ // Else, try again
}
catch(const DbException& dx)
{
@@ -213,18 +219,18 @@ Freeze::ObjectStore::dbHasObject(const Identity& ident) const
}
void
-Freeze::ObjectStore::save(Key& key, Value& value, Byte status, DbTxn* tx)
+Freeze::ObjectStoreBase::save(Key& key, Value& value, Byte status, DbTxn* tx)
{
switch(status)
{
- case EvictorElement::created:
- case EvictorElement::modified:
+ case created:
+ case modified:
{
Dbt dbKey;
Dbt dbValue;
initializeInDbt(key, dbKey);
initializeInDbt(value, dbValue);
- u_int32_t flags = (status == EvictorElement::created) ? DB_NOOVERWRITE : 0;
+ u_int32_t flags = (status == created) ? DB_NOOVERWRITE : 0;
int err = _db->put(tx, &dbKey, &dbValue, flags);
if(err != 0)
{
@@ -233,7 +239,7 @@ Freeze::ObjectStore::save(Key& key, Value& value, Byte status, DbTxn* tx)
break;
}
- case EvictorElement::destroyed:
+ case destroyed:
{
Dbt dbKey;
initializeInDbt(key, dbKey);
@@ -252,7 +258,7 @@ Freeze::ObjectStore::save(Key& key, Value& value, Byte status, DbTxn* tx)
}
void
-Freeze::ObjectStore::marshal(const Identity& ident, Key& bytes, const CommunicatorPtr& communicator)
+Freeze::ObjectStoreBase::marshal(const Identity& ident, Key& bytes, const CommunicatorPtr& communicator)
{
IceInternal::InstancePtr instance = IceInternal::getInstance(communicator);
IceInternal::BasicStream stream(instance.get());
@@ -261,7 +267,7 @@ Freeze::ObjectStore::marshal(const Identity& ident, Key& bytes, const Communicat
}
void
-Freeze::ObjectStore::unmarshal(Identity& ident, const Key& bytes, const CommunicatorPtr& communicator)
+Freeze::ObjectStoreBase::unmarshal(Identity& ident, const Key& bytes, const CommunicatorPtr& communicator)
{
IceInternal::InstancePtr instance = IceInternal::getInstance(communicator);
IceInternal::BasicStream stream(instance.get());
@@ -272,7 +278,7 @@ Freeze::ObjectStore::unmarshal(Identity& ident, const Key& bytes, const Communic
}
void
-Freeze::ObjectStore::marshal(const ObjectRecord& v, Value& bytes, const CommunicatorPtr& communicator)
+Freeze::ObjectStoreBase::marshal(const ObjectRecord& v, Value& bytes, const CommunicatorPtr& communicator)
{
IceInternal::InstancePtr instance = IceInternal::getInstance(communicator);
IceInternal::BasicStream stream(instance.get());
@@ -284,7 +290,7 @@ Freeze::ObjectStore::marshal(const ObjectRecord& v, Value& bytes, const Communic
}
void
-Freeze::ObjectStore::unmarshal(ObjectRecord& v, const Value& bytes, const CommunicatorPtr& communicator)
+Freeze::ObjectStoreBase::unmarshal(ObjectRecord& v, const Value& bytes, const CommunicatorPtr& communicator)
{
IceInternal::InstancePtr instance = IceInternal::getInstance(communicator);
IceInternal::BasicStream stream(instance.get());
@@ -298,16 +304,16 @@ Freeze::ObjectStore::unmarshal(ObjectRecord& v, const Value& bytes, const Commun
stream.endReadEncaps();
}
-const string&
-Freeze::ObjectStore::dbName() const
+bool
+Freeze::ObjectStoreBase::load(const Identity& ident, const TransactionIPtr& tx, ObjectRecord& rec)
{
- return _dbName;
-}
-
+ DbTxn* txn = tx->dbTxn();
+
+ if(txn == 0)
+ {
+ throw DatabaseException(__FILE__, __LINE__, "invalid TransactionalEvictorContext");
+ }
-Freeze::EvictorElementPtr
-Freeze::ObjectStore::load(const Identity& ident)
-{
Key key;
marshal(ident, key, _communicator);
@@ -324,10 +330,10 @@ Freeze::ObjectStore::load(const Identity& ident)
{
try
{
- int rs = _db->get(0, &dbKey, &dbValue, 0);
+ int rs =_db->get(txn, &dbKey, &dbValue, 0);
if(rs == DB_NOTFOUND)
{
- return 0;
+ return false;
}
else if(rs != 0)
{
@@ -336,17 +342,15 @@ Freeze::ObjectStore::load(const Identity& ident)
}
break; // for(;;)
}
- catch(const DbDeadlockException&)
+ catch(const DbDeadlockException& dx)
{
if(_evictor->deadlockWarning())
{
Warning out(_communicator->getLogger());
- out << "Deadlock in Freeze::ObjectStore::load while searching \""
- << _evictor->filename() + "/" + _dbName << "\"; retrying ...";
+ out << "Deadlock in Freeze::ObjectStoreBase::load while searching \""
+ << _evictor->filename() + "/" + _dbName << "\"";
}
- //
- // Ignored, try again
- //
+ throw DeadlockException(__FILE__, __LINE__, dx.what());
}
catch(const DbException& dx)
{
@@ -354,34 +358,199 @@ Freeze::ObjectStore::load(const Identity& ident)
}
}
- EvictorElementPtr result = new EvictorElement(*this);
- unmarshal(result->rec, value, _communicator);
-
- _evictor->initialize(ident, _facet, result->rec.servant);
- return result;
+ unmarshal(rec, value, _communicator);
+ _evictor->initialize(ident, _facet, rec.servant);
+ return true;
}
void
-Freeze::ObjectStore::pinned(const EvictorElementPtr& element, Cache::Position p)
+Freeze::ObjectStoreBase::update(const Identity& ident, const ObjectRecord& rec, const TransactionIPtr& tx)
{
- element->cachePosition = p;
- element->stale = false;
+ DbTxn* txn = tx->dbTxn();
+
+ if(txn == 0)
+ {
+ throw DatabaseException(__FILE__, __LINE__, "invalid TransactionalEvictorContext");
+ }
+
+ Key key;
+ marshal(ident, key, _communicator);
+
+ Value value;
+ marshal(rec, value, _communicator);
+
+ Dbt dbKey;
+ Dbt dbValue;
+ initializeInDbt(key, dbKey);
+ initializeInDbt(value, dbValue);
+ u_int32_t flags = 0;
+
+ try
+ {
+ _db->put(txn, &dbKey, &dbValue, flags);
+ }
+ catch(const DbDeadlockException& dx)
+ {
+ if(_evictor->deadlockWarning())
+ {
+ Warning out(_communicator->getLogger());
+ out << "Deadlock in Freeze::ObjectStoreBase::update while updating \""
+ << _evictor->filename() + "/" + _dbName << "\"";
+ }
+ throw DeadlockException(__FILE__, __LINE__, dx.what());
+ }
+ catch(const DbException& dx)
+ {
+ handleDbException(dx, __FILE__, __LINE__);
+ }
}
+bool
+Freeze::ObjectStoreBase::insert(const Identity& ident, const ObjectRecord& rec, DbTxn* tx)
+{
+ Key key;
+ marshal(ident, key, _communicator);
+
+ Value value;
+ marshal(rec, value, _communicator);
+ Dbt dbKey;
+ Dbt dbValue;
+ initializeInDbt(key, dbKey);
+ initializeInDbt(value, dbValue);
+ u_int32_t flags = DB_NOOVERWRITE;
+ if(tx == 0)
+ {
+ flags |= DB_AUTO_COMMIT;
+ }
-Freeze::EvictorElement::EvictorElement(ObjectStore& s) :
- store(s),
- usageCount(-1),
- keepCount(0),
- stale(true),
- status(clean)
+ for(;;)
+ {
+ try
+ {
+ return _db->put(tx, &dbKey, &dbValue, flags) == 0;
+ }
+ catch(const DbDeadlockException& dx)
+ {
+ if(_evictor->deadlockWarning())
+ {
+ Warning out(_communicator->getLogger());
+ out << "Deadlock in Freeze::ObjectStoreBase::insert while updating \""
+ << _evictor->filename() + "/" + _dbName << "\"";
+ }
+ if(tx != 0)
+ {
+ throw DeadlockException(__FILE__, __LINE__, dx.what());
+ }
+ //
+ // Otherwise, try again
+ //
+ }
+ catch(const DbException& dx)
+ {
+ handleDbException(dx, __FILE__, __LINE__);
+ }
+ }
+}
+
+bool
+Freeze::ObjectStoreBase::remove(const Identity& ident, DbTxn* tx)
{
+ Key key;
+ marshal(ident, key, _communicator);
+
+ Dbt dbKey;
+ initializeInDbt(key, dbKey);
+
+ for(;;)
+ {
+ try
+ {
+ return _db->del(tx, &dbKey, tx != 0 ? 0 : DB_AUTO_COMMIT) == 0;
+ }
+ catch(const DbDeadlockException& dx)
+ {
+ if(_evictor->deadlockWarning())
+ {
+ Warning out(_communicator->getLogger());
+ out << "Deadlock in Freeze::ObjectStoreBase::remove while updating \""
+ << _evictor->filename() + "/" + _dbName << "\"";
+ }
+ if(tx != 0)
+ {
+ throw DeadlockException(__FILE__, __LINE__, dx.what());
+ }
+ //
+ // Otherwise, try again
+ //
+ }
+ catch(const DbException& dx)
+ {
+ handleDbException(dx, __FILE__, __LINE__);
+ }
+ }
}
-Freeze::EvictorElement::~EvictorElement()
+
+const string&
+Freeze::ObjectStoreBase::dbName() const
{
+ return _dbName;
}
+//
+// Non transactional load
+//
+bool
+Freeze::ObjectStoreBase::loadImpl(const Identity& ident, ObjectRecord& rec)
+{
+ Key key;
+ marshal(ident, key, _communicator);
+ Dbt dbKey;
+ initializeInDbt(key, dbKey);
+
+ const size_t defaultValueSize = 4096;
+ Value value(defaultValueSize);
+ Dbt dbValue;
+ initializeOutDbt(value, dbValue);
+
+ for(;;)
+ {
+ try
+ {
+ int rs = _db->get(0, &dbKey, &dbValue, 0);
+ if(rs == DB_NOTFOUND)
+ {
+ return false;
+ }
+ else if(rs != 0)
+ {
+ assert(0);
+ throw DatabaseException(__FILE__, __LINE__);
+ }
+ break; // for(;;)
+ }
+ catch(const DbDeadlockException&)
+ {
+ if(_evictor->deadlockWarning())
+ {
+ Warning out(_communicator->getLogger());
+ out << "Deadlock in Freeze::ObjectStoreBase::load while searching \""
+ << _evictor->filename() + "/" + _dbName << "\"; retrying ...";
+ }
+ //
+ // Ignored, try again
+ //
+ }
+ catch(const DbException& dx)
+ {
+ handleDbException(dx, value, dbValue, __FILE__, __LINE__);
+ }
+ }
+
+ unmarshal(rec, value, _communicator);
+ _evictor->initialize(ident, _facet, rec.servant);
+ return true;
+}
diff --git a/cpp/src/Freeze/ObjectStore.h b/cpp/src/Freeze/ObjectStore.h
index 94db579a64d..23a5ab8f734 100644
--- a/cpp/src/Freeze/ObjectStore.h
+++ b/cpp/src/Freeze/ObjectStore.h
@@ -15,6 +15,7 @@
#include <Freeze/DB.h>
#include <Freeze/EvictorStorage.h>
#include <Freeze/Index.h>
+#include <Freeze/TransactionI.h>
#include <IceUtil/Cache.h>
#include <vector>
@@ -24,25 +25,22 @@
namespace Freeze
{
-class EvictorI;
+template<class T> class EvictorI;
-struct EvictorElement;
-typedef IceUtil::Handle<EvictorElement> EvictorElementPtr;
+class EvictorIBase;
-typedef IceUtil::Cache<Ice::Identity, EvictorElement> Cache;
-
-class ObjectStore : public Cache
+class ObjectStoreBase
{
public:
- ObjectStore(const std::string&, bool, EvictorI*,
- const std::vector<IndexPtr>& = std::vector<IndexPtr>(), bool = false);
+ ObjectStoreBase(const std::string&, const std::string&, bool, EvictorIBase*,
+ const std::vector<IndexPtr>&, bool);
- virtual ~ObjectStore();
+ virtual ~ObjectStoreBase();
- void close();
+ const Ice::ObjectPtr& sampleServant() const;
- bool dbHasObject(const Ice::Identity&) const;
+ bool dbHasObject(const Ice::Identity&, DbTxn*) const;
void save(Key& key, Value& value, Ice::Byte status, DbTxn* tx);
static void marshal(const Ice::Identity&, Key&, const Ice::CommunicatorPtr&);
@@ -50,6 +48,14 @@ public:
static void marshal(const ObjectRecord&, Value&, const Ice::CommunicatorPtr&);
static void unmarshal(ObjectRecord&, const Value&, const Ice::CommunicatorPtr&);
+ bool load(const Ice::Identity&, const TransactionIPtr&, ObjectRecord&);
+ void update(const Ice::Identity&, const ObjectRecord&, const TransactionIPtr&);
+
+ bool insert(const Ice::Identity&, const ObjectRecord&, DbTxn*);
+ bool remove(const Ice::Identity&, DbTxn*);
+
+ EvictorIBase* evictor() const;
+
//
// For IndexI and Iterator
//
@@ -57,127 +63,98 @@ public:
const std::string& dbName() const;
const Ice::CommunicatorPtr& communicator() const;
- EvictorI* evictor() const;
const std::string& facet() const;
protected:
- virtual EvictorElementPtr load(const Ice::Identity&);
- virtual void pinned(const EvictorElementPtr&, Position p);
+ bool loadImpl(const Ice::Identity&, ObjectRecord&);
private:
std::auto_ptr<Db> _db;
std::string _facet;
std::string _dbName;
- EvictorI* _evictor;
+ EvictorIBase* _evictor;
std::vector<IndexPtr> _indices;
Ice::CommunicatorPtr _communicator;
+ Ice::ObjectPtr _sampleServant;
};
-struct EvictorElement : public Ice::LocalObject
+template<class T>
+class ObjectStore : public ObjectStoreBase, public IceUtil::Cache<Ice::Identity, T>
{
+ public:
-#if defined(_MSC_VER) && (_MSC_VER <= 1200) || defined(__IBMCPP__)
-
- enum
- {
- clean = 0,
- created = 1,
- modified = 2,
- destroyed = 3,
- dead = 4
- };
-
-#else
- //
- // Clean object; can become modified or destroyed
- //
- static const Ice::Byte clean = 0;
-
- //
- // New object; can become clean, dead or destroyed
- //
- static const Ice::Byte created = 1;
+ ObjectStore(const std::string& facet, const std::string facetType,
+ bool createDb, EvictorIBase* evictor,
+ const std::vector<IndexPtr>& indices = std::vector<IndexPtr>(),
+ bool populateEmptyIndices = false) :
+ ObjectStoreBase(facet, facetType, createDb, evictor, indices, populateEmptyIndices)
+ {
+ }
- //
- // Modified object; can become clean or destroyed
- //
- static const Ice::Byte modified = 2;
+ using ObjectStoreBase::load;
- //
- // Being saved. Can become dead or created
- //
- static const Ice::Byte destroyed = 3;
-
- //
- // Exists only in the Evictor; for example the object was created
- // and later destroyed (without a save in between), or it was
- // destroyed on disk but is still in use. Can become created.
- //
- static const Ice::Byte dead = 4;
+ typedef IceUtil::Cache<Ice::Identity, T> Cache;
-#endif
-
- EvictorElement(ObjectStore&);
- ~EvictorElement();
-
- //
- // Immutable
- //
- ObjectStore& store;
-
- //
- // Immutable once set
- //
- Cache::Position cachePosition;
+protected:
- //
- // Protected by EvictorI
- //
- std::list<EvictorElementPtr>::iterator evictPosition;
- int usageCount;
- int keepCount;
- bool stale;
-
- //
- // Protected by mutex
- //
- IceUtil::Mutex mutex;
- ObjectRecord rec;
- Ice::Byte status;
+ virtual IceUtil::Handle<T>
+ load(const Ice::Identity& ident)
+ {
+ ObjectRecord rec;
+ if(loadImpl(ident, rec))
+ {
+ return new T(rec, *this);
+ }
+ else
+ {
+ return 0;
+ }
+ }
+
+ virtual void
+ pinned(const IceUtil::Handle<T>& element, typename Cache::Position p)
+ {
+ element->init(p);
+ }
};
-
//
// Inline member function definitions
//
inline Db*
-ObjectStore::db() const
+ObjectStoreBase::db() const
{
return _db.get();
}
inline const Ice::CommunicatorPtr&
-ObjectStore::communicator() const
+ObjectStoreBase::communicator() const
{
return _communicator;
}
-inline EvictorI*
-ObjectStore::evictor() const
+inline EvictorIBase*
+ObjectStoreBase::evictor() const
{
return _evictor;
}
inline const std::string&
-ObjectStore::facet() const
+ObjectStoreBase::facet() const
{
return _facet;
}
+inline const Ice::ObjectPtr&
+ObjectStoreBase::sampleServant() const
+{
+ return _sampleServant;
+}
+
}
#endif
diff --git a/cpp/src/Freeze/SharedDbEnv.cpp b/cpp/src/Freeze/SharedDbEnv.cpp
index 3c03af446d2..ecf6bc09d04 100644
--- a/cpp/src/Freeze/SharedDbEnv.cpp
+++ b/cpp/src/Freeze/SharedDbEnv.cpp
@@ -8,11 +8,12 @@
// **********************************************************************
#include <Freeze/SharedDbEnv.h>
-#include <IceUtil/StaticMutex.h>
-#include <IceUtil/Thread.h>
#include <Freeze/Exception.h>
#include <Freeze/Util.h>
#include <Freeze/SharedDb.h>
+#include <Freeze/TransactionalEvictorContextI.h>
+
+#include <IceUtil/IceUtil.h>
#include <cstdlib>
#include <map>
@@ -209,13 +210,88 @@ void Freeze::SharedDbEnv::__decRef()
}
//
- // Keep lock to prevent somebody else to re-open this DbEnv
+ // Keep lock to prevent somebody else from reopening this DbEnv
// before it's closed.
//
delete this;
}
}
+
+Freeze::TransactionalEvictorContextIPtr
+Freeze::SharedDbEnv::getOrCreateCurrent(bool& created)
+{
+ created = false;
+
+ Freeze::TransactionalEvictorContextIPtr ctx = getCurrent();
+ if(ctx == 0)
+ {
+ ctx = new TransactionalEvictorContextI(this);
+#ifdef _WIN32
+ if(TlsSetValue(_tsdKey, ctx.get()) == 0)
+ {
+ IceUtil::ThreadSyscallException(__FILE__, __LINE__, GetLastError());
+ }
+#else
+ if(int err = pthread_setspecific(_tsdKey, ctx.get()))
+ {
+ throw IceUtil::ThreadSyscallException(__FILE__, __LINE__, err);
+ }
+#endif
+ created = true;
+
+ //
+ // Give one refcount to this thread!
+ //
+ ctx->__incRef();
+ }
+ return ctx;
+}
+
+
+Freeze::TransactionalEvictorContextIPtr
+Freeze::SharedDbEnv::getCurrent()
+{
+#ifdef _WIN32
+ void* val = TlsGetValue(_tsdKey);
+#else
+ void* val = pthread_getspecific(_tsdKey);
+#endif
+
+ if(val != 0)
+ {
+ return static_cast<Freeze::TransactionalEvictorContextI*>(val);
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+void
+Freeze::SharedDbEnv::clearCurrent(const Freeze::TransactionalEvictorContextIPtr& oldCtx)
+{
+ if(getCurrent() == oldCtx)
+ {
+#ifdef _WIN32
+ if(TlsSetValue(_tsdKey, 0) == 0)
+ {
+ IceUtil::ThreadSyscallException(__FILE__, __LINE__, GetLastError());
+ }
+#else
+ if(int err = pthread_setspecific(_tsdKey, 0))
+ {
+ throw IceUtil::ThreadSyscallException(__FILE__, __LINE__, err);
+ }
+#endif
+
+ //
+ // Release thread's refcount
+ //
+ oldCtx->__decRef();
+ }
+}
+
Freeze::SharedDbEnv::SharedDbEnv(const std::string& envName,
const Ice::CommunicatorPtr& communicator, DbEnv* env) :
_env(env),
@@ -225,6 +301,20 @@ Freeze::SharedDbEnv::SharedDbEnv(const std::string& envName,
{
Ice::PropertiesPtr properties = _communicator->getProperties();
+#ifdef _WIN32
+ _tsdKey = TlsAlloc();
+ if(_tsdKey == TLS_OUT_OF_INDEXES)
+ {
+ throw IceUtil::ThreadSyscallException(__FILE__, __LINE__, GetLastError());
+ }
+#else
+ int err = pthread_key_create(&_tsdKey, 0);
+ if(err != 0)
+ {
+ throw IceUtil::ThreadSyscallException(__FILE__, __LINE__, err);
+ }
+#endif
+
_trace = properties->getPropertyAsInt("Freeze.Trace.DbEnv");
if(_env == 0)
@@ -274,31 +364,9 @@ Freeze::SharedDbEnv::SharedDbEnv(const std::string& envName,
flags |= DB_PRIVATE;
}
- /*
-
- //
- // Does not seem to work reliably in 4.1.25
- //
-
- time_t timeStamp = properties->getPropertyAsIntWithDefault(propertyPrefix + ".TxTimestamp", 0);
-
- if(timeStamp != 0)
- {
- try
- {
- set_tx_timestamp(&timeStamp);
- }
- catch(const ::DbException& dx)
- {
- DatabaseException ex(__FILE__, __LINE__);
- ex.message = dx.what();
- throw ex;
- }
- }
- */
//
- // Maybe we can deprecate this property since it can be set in the DB_CONFIG file
+ // Auto delete
//
bool autoDelete = (properties->getPropertyAsIntWithDefault(
propertyPrefix + ".OldLogsAutoDelete", 1) != 0);
@@ -341,7 +409,6 @@ Freeze::SharedDbEnv::SharedDbEnv(const std::string& envName,
//
// Get catalog
//
-
_catalog = SharedDb::openCatalog(*this);
}
diff --git a/cpp/src/Freeze/SharedDbEnv.h b/cpp/src/Freeze/SharedDbEnv.h
index 202241eefa8..20ea19191c7 100644
--- a/cpp/src/Freeze/SharedDbEnv.h
+++ b/cpp/src/Freeze/SharedDbEnv.h
@@ -27,6 +27,9 @@ typedef IceUtil::Handle<SharedDbEnv> SharedDbEnvPtr;
class SharedDb;
typedef IceUtil::Handle<SharedDb> SharedDbPtr;
+class TransactionalEvictorContextI;
+typedef IceUtil::Handle<TransactionalEvictorContextI> TransactionalEvictorContextIPtr;
+
class SharedDbEnv
{
public:
@@ -38,6 +41,13 @@ public:
void __incRef();
void __decRef();
+ //
+ // EvictorContext factory/manager
+ //
+ TransactionalEvictorContextIPtr getOrCreateCurrent(bool&);
+ TransactionalEvictorContextIPtr getCurrent();
+ void clearCurrent(const TransactionalEvictorContextIPtr&);
+
DbEnv* getEnv() const;
const std::string& getEnvName() const;
const Ice::CommunicatorPtr& getCommunicator() const;
@@ -55,6 +65,13 @@ private:
int _refCount;
int _trace;
CheckpointThreadPtr _thread;
+
+#ifdef _WIN32
+ DWORD _tsdKey;
+#else
+ pthread_key_t _tsdKey;
+#endif
+
};
inline DbEnv*
diff --git a/cpp/src/Freeze/TransactionI.h b/cpp/src/Freeze/TransactionI.h
index 72cfc852d16..04c44dc68c3 100644
--- a/cpp/src/Freeze/TransactionI.h
+++ b/cpp/src/Freeze/TransactionI.h
@@ -30,7 +30,6 @@ public:
rollback();
TransactionI(ConnectionI*);
-
~TransactionI();
DbTxn*
diff --git a/cpp/src/Freeze/TransactionalEvictorContextI.cpp b/cpp/src/Freeze/TransactionalEvictorContextI.cpp
new file mode 100644
index 00000000000..891f6cb7630
--- /dev/null
+++ b/cpp/src/Freeze/TransactionalEvictorContextI.cpp
@@ -0,0 +1,298 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#include <Freeze/TransactionalEvictorContextI.h>
+#include <Freeze/TransactionalEvictorI.h>
+#include <Freeze/Initialize.h>
+#include <Freeze/Util.h>
+#include <Freeze/ConnectionI.h>
+#include <IceUtil/IceUtil.h>
+#include <typeinfo>
+
+using namespace std;
+using namespace Freeze;
+using namespace Ice;
+
+
+Freeze::TransactionalEvictorContextI::TransactionalEvictorContextI(const SharedDbEnvPtr& dbEnv) :
+ _tx((new ConnectionI(dbEnv))->beginTransactionI()),
+ _rollbackOnly(false),
+ _dbEnv(dbEnv),
+ _deadlockExceptionDetected(false)
+{
+}
+
+Freeze::TransactionalEvictorContextI::~TransactionalEvictorContextI()
+{
+ for_each(_invalidateList.begin(), _invalidateList.end(), ToInvalidate::destroy);
+}
+
+void
+Freeze::TransactionalEvictorContextI::rollbackOnly()
+{
+ _rollbackOnly = true;
+}
+
+bool
+Freeze::TransactionalEvictorContextI::isRollbackOnly() const
+{
+ return _rollbackOnly;
+}
+
+void
+Freeze::TransactionalEvictorContextI::complete()
+{
+ try
+ {
+ if(_rollbackOnly)
+ {
+ _tx->rollback();
+ }
+ else
+ {
+ if(!_stack.empty())
+ {
+ Warning out(_dbEnv->getCommunicator()->getLogger());
+ out << "Committing TransactionalEvictorContext on DbEnv '" <<
+ _dbEnv->getEnvName() << "' with " << _stack.size() << " unsaved objects.";
+ }
+
+ _tx->commit();
+
+ //
+ // Finally, remove updated & removed objects from cache
+ //
+
+ for_each(_invalidateList.begin(), _invalidateList.end(), ToInvalidate::invalidate);
+ _invalidateList.clear();
+ }
+ }
+ catch(const DeadlockException&)
+ {
+ deadlockException();
+ finalize();
+ throw;
+ }
+ catch(...)
+ {
+ finalize();
+ throw;
+ }
+ finalize();
+}
+
+Freeze::TransactionalEvictorContextI::ServantHolder*
+Freeze::TransactionalEvictorContextI::findServantHolder(const Identity& ident, ObjectStore<TransactionalEvictorElement>* store) const
+{
+ for(Stack::const_iterator p = _stack.begin(); p != _stack.end(); ++p)
+ {
+ ServantHolder* sh = *p;
+ if(sh->matches(ident, store))
+ {
+ return sh;
+ }
+ }
+ return 0;
+}
+
+void
+Freeze::TransactionalEvictorContextI::finalize()
+{
+ if(_dbEnv != 0)
+ {
+ _dbEnv->clearCurrent(this);
+
+ Lock sync(*this);
+ _dbEnv = 0;
+ notifyAll();
+ }
+}
+
+void
+Freeze::TransactionalEvictorContextI::checkDeadlockException()
+{
+ if(_deadlockException.get() != 0)
+ {
+ _deadlockException->ice_throw();
+ }
+}
+
+bool
+Freeze::TransactionalEvictorContextI::response(bool)
+{
+ if(_owner == IceUtil::ThreadControl())
+ {
+ return true;
+ }
+ else
+ {
+ Lock sync(*this);
+ while(_deadlockExceptionDetected == false && _dbEnv != 0)
+ {
+ wait();
+ }
+ return !_deadlockExceptionDetected;
+ }
+}
+
+bool
+Freeze::TransactionalEvictorContextI::exception(const std::exception& ex)
+{
+ const DeadlockException* dx = dynamic_cast<const DeadlockException*>(&ex);
+
+ if(dx != 0 && _owner == IceUtil::ThreadControl())
+ {
+ _deadlockException.reset(dynamic_cast<DeadlockException*>(dx->ice_clone()));
+ return false;
+ }
+ return true;
+}
+
+bool
+Freeze::TransactionalEvictorContextI::exception()
+{
+ return true;
+}
+
+Ice::ObjectPtr
+Freeze::TransactionalEvictorContextI::servantRemoved(const Identity& ident,
+ ObjectStore<TransactionalEvictorElement>* store)
+{
+ if(!_rollbackOnly)
+ {
+ //
+ // Lookup servant holder on stack
+ //
+ ServantHolder* sh = findServantHolder(ident, store);
+ if(sh != 0)
+ {
+ sh->removed();
+ return sh->servant();
+ }
+ else
+ {
+ _invalidateList.push_back(new ToInvalidate(ident, store));
+ return 0;
+ }
+ }
+ return 0;
+
+}
+
+void
+Freeze::TransactionalEvictorContextI::deadlockException()
+{
+ _rollbackOnly = true;
+
+ Lock sync(*this);
+ _deadlockExceptionDetected = true;
+ notifyAll();
+}
+
+
+//
+// ServantHolder
+//
+
+Freeze::TransactionalEvictorContextI::ServantHolder::ServantHolder(const TransactionalEvictorContextIPtr& ctx,
+ const Current& current,
+ ObjectStore<TransactionalEvictorElement>* store,
+ bool useNonmutating) :
+ _readOnly(false),
+ _ownServant(false),
+ _removed(false),
+ _ctx(ctx),
+ _current(current),
+ _store(store)
+{
+ ServantHolder* sh = ctx->findServantHolder(_current.id, _store);
+
+ if(sh != 0)
+ {
+ if(!sh->_removed)
+ {
+ _rec = sh->_rec;
+ }
+ }
+ else
+ {
+ //
+ // Let's load this servant
+ //
+ if(store->load(current.id, ctx->_tx, _rec))
+ {
+ _ctx->_stack.push_front(this);
+ _ownServant = true;
+
+ //
+ // Compute readonly properly
+ //
+ _readOnly = (useNonmutating && current.mode == Nonmutating) ||
+ (!useNonmutating && (_rec.servant->ice_operationAttributes(current.operation) & 0x1) == 0);
+ }
+ }
+}
+
+
+Freeze::TransactionalEvictorContextI::ServantHolder::~ServantHolder()
+{
+ if(_ownServant)
+ {
+ if(!_ctx->isRollbackOnly())
+ {
+ if(!_readOnly && !_removed)
+ {
+ EvictorIBase::updateStats(_rec.stats, IceUtil::Time::now().toMilliSeconds());
+ _store->update(_current.id, _rec, _ctx->_tx);
+ }
+
+ if(!_readOnly || _removed)
+ {
+ _ctx->_invalidateList.push_back(new ToInvalidate(_current.id, _store));
+ }
+ }
+ _ctx->_stack.pop_front();
+ }
+}
+
+void
+Freeze::TransactionalEvictorContextI::ServantHolder::removed()
+{
+ _removed = true;
+}
+
+//
+// ToInvalidate
+//
+
+//
+// When constructed in the servant holder destructor, it's protected by the dispatch()
+// deactivate controller guard
+//
+Freeze::TransactionalEvictorContextI::ToInvalidate::ToInvalidate(const Identity& ident,
+ ObjectStore<TransactionalEvictorElement>* store) :
+ _ident(ident),
+ _store(store),
+ _evictor(store->evictor()),
+ _guard(_evictor->deactivateController())
+{
+}
+
+void
+Freeze::TransactionalEvictorContextI::ToInvalidate::invalidate(ToInvalidate* obj)
+{
+ dynamic_cast<TransactionalEvictorI*>(obj->_store->evictor())->evict(obj->_ident, obj->_store);
+ delete obj;
+}
+
+void
+Freeze::TransactionalEvictorContextI::ToInvalidate::destroy(ToInvalidate* obj)
+{
+ delete obj;
+}
diff --git a/cpp/src/Freeze/TransactionalEvictorContextI.h b/cpp/src/Freeze/TransactionalEvictorContextI.h
new file mode 100644
index 00000000000..3686c21ffac
--- /dev/null
+++ b/cpp/src/Freeze/TransactionalEvictorContextI.h
@@ -0,0 +1,143 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#ifndef FREEZE_TRANSACTIONAL_EVICTOR_CONTEXT_I_H
+#define FREEZE_TRANSACTIONAL_EVICTOR_CONTEXT_I_H
+
+#include <Ice/Ice.h>
+#include <Freeze/TransactionalEvictor.h>
+#include <Freeze/EvictorStorage.h>
+#include <Freeze/EvictorI.h>
+#include <IceUtil/IceUtil.h>
+
+namespace Freeze
+{
+
+template<class T> class ObjectStore;
+
+class TransactionalEvictorElement;
+
+class TransactionalEvictorContextI : public TransactionalEvictorContext, public Ice::DispatchInterceptorAsyncCallback,
+ public IceUtil::Monitor<IceUtil::Mutex>
+{
+public:
+
+ class ServantHolder
+ {
+ public:
+
+ ServantHolder(const TransactionalEvictorContextIPtr&, const Ice::Current&, ObjectStore<TransactionalEvictorElement>*, bool);
+ ~ServantHolder();
+
+ void removed();
+
+ const Ice::ObjectPtr& servant() const
+ {
+ return _rec.servant;
+ }
+
+ bool matches(const Ice::Identity& ident, ObjectStore<TransactionalEvictorElement>* store)
+ {
+ return _current.id == ident && _store == store;
+ }
+
+ private:
+
+ bool _readOnly;
+ bool _ownServant;
+ bool _removed;
+
+ const TransactionalEvictorContextIPtr& _ctx;
+ const Ice::Current& _current;
+ ObjectStore<TransactionalEvictorElement>* _store;
+ ObjectRecord _rec;
+ };
+
+
+ class ToInvalidate
+ {
+ public:
+
+ ToInvalidate(const Ice::Identity&, ObjectStore<TransactionalEvictorElement>*);
+
+ static void invalidate(ToInvalidate*);
+ static void destroy(ToInvalidate*);
+
+ private:
+
+ const Ice::Identity _ident;
+ ObjectStore<TransactionalEvictorElement>* _store;
+ EvictorIBasePtr _evictor; // for _guard
+ DeactivateController::Guard _guard; // ensures store is not dangling
+ };
+
+
+ TransactionalEvictorContextI(const SharedDbEnvPtr&);
+ virtual ~TransactionalEvictorContextI();
+
+ virtual void rollbackOnly();
+ virtual bool isRollbackOnly() const;
+ virtual void complete();
+
+ virtual bool response(bool);
+ virtual bool exception(const std::exception&);
+ virtual bool exception();
+
+ Ice::ObjectPtr servantRemoved(const Ice::Identity&, ObjectStore<TransactionalEvictorElement>*);
+
+ void deadlockException();
+
+ void checkDeadlockException();
+
+ const TransactionIPtr& transaction() const
+ {
+ return _tx;
+ }
+
+private:
+
+ friend class ServantHolder;
+
+ ServantHolder* findServantHolder(const Ice::Identity&, ObjectStore<TransactionalEvictorElement>*) const;
+
+ void finalize();
+
+ //
+ // Stack of ServantHolder*
+ //
+ typedef std::deque<ServantHolder*> Stack;
+ Stack _stack;
+
+ //
+ // List of objects to invalidate from the caches upon commit
+ //
+ std::list<ToInvalidate*> _invalidateList;
+
+ TransactionIPtr _tx;
+ IceUtil::ThreadControl _owner;
+
+ bool _rollbackOnly;
+
+ std::auto_ptr<DeadlockException> _deadlockException;
+
+ SharedDbEnvPtr _dbEnv;
+
+ //
+ // Protected by this
+ //
+ bool _deadlockExceptionDetected;
+
+};
+
+typedef IceUtil::Handle<TransactionalEvictorContextI> TransactionalEvictorContextIPtr;
+
+}
+
+
+#endif
diff --git a/cpp/src/Freeze/TransactionalEvictorI.cpp b/cpp/src/Freeze/TransactionalEvictorI.cpp
new file mode 100644
index 00000000000..a28ee8a718e
--- /dev/null
+++ b/cpp/src/Freeze/TransactionalEvictorI.cpp
@@ -0,0 +1,782 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#include <Freeze/TransactionalEvictorI.h>
+#include <Freeze/Initialize.h>
+#include <Freeze/Util.h>
+#include <Freeze/TransactionalEvictorContextI.h>
+
+#include <IceUtil/IceUtil.h>
+
+#include <typeinfo>
+
+using namespace std;
+using namespace Freeze;
+using namespace Ice;
+
+
+//
+// createEvictor functions
+//
+
+Freeze::TransactionalEvictorPtr
+Freeze::createTransactionalEvictor(const ObjectAdapterPtr& adapter,
+ const string& envName,
+ const string& filename,
+ const FacetTypeMap& facetTypes,
+ const ServantInitializerPtr& initializer,
+ const vector<IndexPtr>& indices,
+ bool createDb)
+{
+ return new TransactionalEvictorI(adapter, envName, 0, filename, facetTypes, initializer, indices, createDb);
+}
+
+TransactionalEvictorPtr
+Freeze::createTransactionalEvictor(const ObjectAdapterPtr& adapter,
+ const string& envName,
+ DbEnv& dbEnv,
+ const string& filename,
+ const FacetTypeMap& facetTypes,
+ const ServantInitializerPtr& initializer,
+ const vector<IndexPtr>& indices,
+ bool createDb)
+{
+ return new TransactionalEvictorI(adapter, envName, &dbEnv, filename, facetTypes, initializer, indices, createDb);
+}
+
+
+//
+// TransactionalEvictorI
+//
+
+Freeze::TransactionalEvictorI::TransactionalEvictorI(const ObjectAdapterPtr& adapter,
+ const string& envName,
+ DbEnv* dbEnv,
+ const string& filename,
+ const FacetTypeMap& facetTypes,
+ const ServantInitializerPtr& initializer,
+ const vector<IndexPtr>& indices,
+ bool createDb) :
+ EvictorI<TransactionalEvictorElement>(adapter, envName, dbEnv, filename, facetTypes, initializer, indices, createDb),
+ _currentEvictorSize(0),
+ _rollbackOnUserException(false)
+{
+
+ class DipatchInterceptorAdapter : public Ice::DispatchInterceptor
+ {
+ public:
+
+ DipatchInterceptorAdapter(const TransactionalEvictorIPtr& evictor) :
+ _evictor(evictor)
+ {
+ }
+
+ virtual Ice::DispatchStatus dispatch(Ice::Request& request)
+ {
+ return _evictor->dispatch(request);
+ }
+
+ private:
+
+ TransactionalEvictorIPtr _evictor;
+ };
+
+ _interceptor = new DipatchInterceptorAdapter(this);
+}
+
+
+TransactionalEvictorContextPtr
+Freeze::TransactionalEvictorI::getCurrentContext()
+{
+ DeactivateController::Guard deactivateGuard(_deactivateController);
+ return _dbEnv->getCurrent();
+}
+
+TransactionalEvictorContextPtr
+Freeze::TransactionalEvictorI::createCurrentContext()
+{
+ DeactivateController::Guard deactivateGuard(_deactivateController);
+
+ bool created = false;
+ TransactionalEvictorContextPtr ctx = _dbEnv->getOrCreateCurrent(created);
+ if(!created)
+ {
+ throw DatabaseException(__FILE__, __LINE__, "createCurrentContext: there is already a current context");
+ }
+ return ctx;
+}
+
+
+Ice::ObjectPrx
+Freeze::TransactionalEvictorI::addFacet(const ObjectPtr& servant, const Identity& ident, const string& facet)
+{
+ checkIdentity(ident);
+ DeactivateController::Guard deactivateGuard(_deactivateController);
+
+ Ice::Long currentTime = IceUtil::Time::now().toMilliSeconds();
+
+ Statistics stats = { currentTime };
+ ObjectRecord rec;
+ rec.servant = servant;
+ rec.stats = stats;
+
+ ObjectStore<TransactionalEvictorElement>* store = findStore(facet, _createDb);
+
+ if(store == 0)
+ {
+ throw NotFoundException(__FILE__, __LINE__, "addFacet: could not open database for facet '"
+ + facet + "'");
+ }
+
+ DbTxn* tx = beforeQuery();
+
+ updateStats(rec.stats, currentTime);
+
+ if(!store->insert(ident, rec, tx))
+ {
+ Ice::AlreadyRegisteredException ex(__FILE__, __LINE__);
+ ex.kindOfObject = "servant";
+ ex.id = _communicator->identityToString(ident);
+ if(!facet.empty())
+ {
+ ex.id += " -f " + IceUtil::escapeString(facet, "");
+ }
+ throw ex;
+ }
+
+ ObjectPrx obj = _adapter->createProxy(ident);
+ if(!facet.empty())
+ {
+ obj = obj->ice_facet(facet);
+ }
+ return obj;
+}
+
+Ice::ObjectPtr
+Freeze::TransactionalEvictorI::removeFacet(const Identity& ident, const string& facet)
+{
+ checkIdentity(ident);
+ DeactivateController::Guard deactivateGuard(_deactivateController);
+
+ ObjectPtr servant = 0;
+ bool removed = false;
+ ObjectStore<TransactionalEvictorElement>* store = findStore(facet, false);
+
+ if(store != 0)
+ {
+ TransactionalEvictorContextIPtr ctx = _dbEnv->getCurrent();
+ DbTxn* tx = 0;
+ if(ctx != 0)
+ {
+ tx = ctx->transaction()->dbTxn();
+ if(tx == 0)
+ {
+ throw DatabaseException(__FILE__, __LINE__, "invalid TransactionalEvictorContext");
+ }
+ }
+
+ removed = store->remove(ident, tx);
+
+ if(removed)
+ {
+ if(ctx != 0)
+ {
+ //
+ // Remove from cache when transaction commits
+ //
+ servant = ctx->servantRemoved(ident, store);
+ }
+ else
+ {
+ //
+ // Remove from cache immediately
+ //
+ servant = evict(ident, store);
+ }
+ }
+ }
+
+ if(!removed)
+ {
+ NotRegisteredException ex(__FILE__, __LINE__);
+ ex.kindOfObject = "servant";
+ ex.id = _communicator->identityToString(ident);
+ if(!facet.empty())
+ {
+ ex.id += " -f " + IceUtil::escapeString(facet, "");
+ }
+ throw ex;
+ }
+
+ if(_trace >= 1)
+ {
+ Trace out(_communicator->getLogger(), "Freeze.Evictor");
+ out << "removed object \"" << _communicator->identityToString(ident) << "\"";
+ if(!facet.empty())
+ {
+ out << " with facet \"" << facet << "\"";
+ }
+ out << " from Db \"" << _filename << "\"";
+ }
+ return servant;
+}
+
+bool
+Freeze::TransactionalEvictorI::hasFacet(const Identity& ident, const string& facet)
+{
+ DeactivateController::Guard deactivateGuard(_deactivateController);
+ checkIdentity(ident);
+ ObjectStore<TransactionalEvictorElement>* store = findStore(facet, false);
+
+ if(store == 0)
+ {
+ return false;
+ }
+
+ DbTxn* tx = beforeQuery();
+
+ if(tx == 0)
+ {
+ TransactionalEvictorElementPtr element = store->getIfPinned(ident);
+ if(element != 0)
+ {
+ return true;
+ }
+ return store->dbHasObject(ident, 0);
+ }
+ else
+ {
+ return store->dbHasObject(ident, tx);
+ }
+}
+
+bool
+Freeze::TransactionalEvictorI::hasAnotherFacet(const Identity& ident, const string& facet)
+{
+ DeactivateController::Guard deactivateGuard(_deactivateController);
+
+ //
+ // If the object exists in another store, throw FacetNotExistException
+ // instead of returning 0 (== ObjectNotExistException)
+ //
+ StoreMap storeMapCopy;
+ {
+ Lock sync(*this);
+ storeMapCopy = _storeMap;
+ }
+
+ DbTxn* tx = beforeQuery();
+
+ for(StoreMap::iterator p = storeMapCopy.begin(); p != storeMapCopy.end(); ++p)
+ {
+ //
+ // Do not check again the given facet
+ //
+ if((*p).first != facet)
+ {
+ ObjectStore<TransactionalEvictorElement>* store = (*p).second;
+
+ if(tx == 0 && store->getIfPinned(ident) != 0)
+ {
+ return true;
+ }
+
+ if(store->dbHasObject(ident, tx))
+ {
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
+
+ObjectPtr
+Freeze::TransactionalEvictorI::locateImpl(const Current&, LocalObjectPtr&)
+{
+ return _interceptor;
+}
+
+void
+Freeze::TransactionalEvictorI::finished(const Current&, const ObjectPtr&, const LocalObjectPtr&)
+{
+ //
+ // Nothing to do
+ //
+}
+
+Ice::DispatchStatus
+Freeze::TransactionalEvictorI::dispatch(Ice::Request& request)
+{
+ class CtxHolder
+ {
+ public:
+
+ CtxHolder(const TransactionalEvictorContextIPtr& ctx) :
+ _ctx(ctx)
+ {
+ }
+
+ ~CtxHolder()
+ {
+ bool isRollbackOnly = _ctx->isRollbackOnly();
+
+ try
+ {
+ _ctx->complete();
+ }
+ catch(...)
+ {
+ if(!isRollbackOnly)
+ {
+ throw;
+ }
+ //
+ // Otherwise ignored, we could be unwinding the stack
+ //
+ }
+ }
+
+ private:
+ TransactionalEvictorContextIPtr _ctx;
+
+ };
+
+
+ DeactivateController::Guard deactivateGuard(_deactivateController);
+
+ const Current& current = request.getCurrent();
+
+ ObjectStore<TransactionalEvictorElement>* store = findStore(current.facet, false);
+ if(store == 0)
+ {
+ servantNotFound(__FILE__, __LINE__, current);
+ }
+
+ //
+ // Is there an existing context?
+ //
+ TransactionalEvictorContextIPtr ctx = _dbEnv->getCurrent();
+
+ if(ctx != 0)
+ {
+ try
+ {
+ //
+ // If yes, use this context; there is no retrying
+ //
+ TransactionalEvictorContextI::ServantHolder servantHolder(ctx, current, store, _useNonmutating);
+
+ if(servantHolder.servant() == 0)
+ {
+ servantNotFound(__FILE__, __LINE__, current);
+ }
+
+ try
+ {
+ DispatchStatus dispatchStatus = servantHolder.servant()->ice_dispatch(request, ctx);
+
+ if(dispatchStatus == DispatchUserException && _rollbackOnUserException)
+ {
+ ctx->rollbackOnly();
+ }
+
+ if(dispatchStatus == DispatchAsync)
+ {
+ //
+ // May throw DeadlockException
+ //
+ ctx->checkDeadlockException();
+ }
+ return dispatchStatus;
+ }
+ catch(...)
+ {
+ //
+ // Important: this rollbackOnly() ensures that servant holder destructor won't perform
+ // any database operation, and hence will not throw.
+ //
+ ctx->rollbackOnly();
+ throw;
+ }
+ //
+ // servantHolder destructor runs here and may throw (if !rollback only)
+ //
+ }
+ catch(const DeadlockException&)
+ {
+ ctx->deadlockException();
+ throw;
+ }
+ catch(...)
+ {
+ ctx->rollbackOnly();
+ throw;
+ }
+ }
+ else
+ {
+ ObjectPtr servant = 0;
+
+ //
+ // Otherwise, first figure out if it's a read or write operation
+ //
+ bool readOnly = true;
+
+ if(_useNonmutating)
+ {
+ readOnly = (current.mode == Ice::Nonmutating);
+ }
+ else
+ {
+ //
+ // Is there a sample-servant associated with this store?
+ //
+
+ ObjectPtr sample = store->sampleServant();
+ if(sample != 0)
+ {
+ readOnly = (sample->ice_operationAttributes(current.operation) & 0x1) == 0;
+ }
+ else
+ {
+ //
+ // Otherwise find / load read-only servant
+ //
+ servant = loadCachedServant(current.id, store);
+ if(servant == 0)
+ {
+ servantNotFound(__FILE__, __LINE__, current);
+ }
+ else
+ {
+ readOnly = (servant->ice_operationAttributes(current.operation) & 0x1) == 0;
+ }
+ }
+ }
+
+ //
+ // readOnly is now set properly
+ //
+ if(readOnly)
+ {
+ if(servant == 0)
+ {
+ servant = loadCachedServant(current.id, store);
+ if(servant == 0)
+ {
+ servantNotFound(__FILE__, __LINE__, current);
+ }
+ }
+ // otherwise reuse servant loaded above
+
+ //
+ // Non-transactional, read-only dispatch
+ //
+ return servant->ice_dispatch(request);
+ }
+ else
+ {
+ //
+ // Create a new transaction; retry on DeadlockException
+ //
+
+ bool tryAgain = false;
+
+ do
+ {
+ try
+ {
+ bool created = false;
+ ctx = _dbEnv->getOrCreateCurrent(created);
+ CtxHolder ctxHolder(ctx);
+ assert(created);
+
+ try
+ {
+ TransactionalEvictorContextI::ServantHolder servantHolder(ctx, current, store, _useNonmutating);
+
+ if(servantHolder.servant() == 0)
+ {
+ servantNotFound(__FILE__, __LINE__, current);
+ }
+
+ try
+ {
+ DispatchStatus dispatchStatus = servantHolder.servant()->ice_dispatch(request, ctx);
+ if(dispatchStatus == DispatchUserException && _rollbackOnUserException)
+ {
+ ctx->rollbackOnly();
+ }
+ if(dispatchStatus == DispatchAsync)
+ {
+ //
+ // May throw DeadlockException
+ //
+ ctx->checkDeadlockException();
+ }
+
+ return dispatchStatus;
+ }
+ catch(...)
+ {
+ //
+ // Important: this rollbackOnly() ensures that servant holder destructor won't perform
+ // any database operation, and hence will not throw.
+ //
+ ctx->rollbackOnly();
+ throw;
+ }
+ //
+ // servant holder destructor runs here and may throw (if !rollback only)
+ //
+ }
+ catch(const DeadlockException&)
+ {
+ ctx->deadlockException();
+ throw;
+ }
+ catch(...)
+ {
+ ctx->rollbackOnly();
+ throw;
+ }
+
+ //
+ // complete occurs here!
+ //
+ }
+ catch(const DeadlockException&)
+ {
+ tryAgain = true;
+ }
+
+ } while(tryAgain);
+ }
+ }
+
+ //
+ // Can be reached
+ //
+ assert(0);
+ throw OperationNotExistException(__FILE__, __LINE__);
+}
+
+
+void
+Freeze::TransactionalEvictorI::deactivate(const string&)
+{
+ if(_deactivateController.deactivate())
+ {
+ //
+ // Break cycle
+ //
+ _interceptor = 0;
+
+ try
+ {
+ closeDbEnv();
+ }
+ catch(...)
+ {
+ _deactivateController.deactivationComplete();
+ throw;
+ }
+ _deactivateController.deactivationComplete();
+ }
+}
+
+Freeze::TransactionalEvictorI::~TransactionalEvictorI()
+{
+ //
+ // Because of the cycle with _interceptor, this can only run if deactivated()
+ //
+}
+
+DbTxn*
+Freeze::TransactionalEvictorI::beforeQuery()
+{
+ TransactionalEvictorContextIPtr ctx = _dbEnv->getCurrent();
+ DbTxn* tx = 0;
+ if(ctx != 0)
+ {
+ tx = ctx->transaction()->dbTxn();
+ if(tx == 0)
+ {
+ throw DatabaseException(__FILE__, __LINE__,"invalid TransactionalEvictorContext");
+ }
+ }
+
+ return tx;
+}
+
+void
+Freeze::TransactionalEvictorI::evict()
+{
+ //
+ // Must be called with this locked
+ //
+
+ while(_currentEvictorSize > _evictorSize)
+ {
+ //
+ // Evict, no matter what!
+ //
+ evict(*_evictorList.rbegin(), true);
+ }
+}
+
+
+Ice::ObjectPtr
+Freeze::TransactionalEvictorI::loadCachedServant(const Identity& ident, ObjectStore<TransactionalEvictorElement>* store)
+{
+ for(;;)
+ {
+ TransactionalEvictorElementPtr element = store->pin(ident);
+
+ if(element == 0)
+ {
+ return 0;
+ }
+
+ Lock sync(*this);
+ if(element->stale())
+ {
+ //
+ // try again
+ //
+ continue;
+ }
+
+ fixEvictPosition(element);
+
+ //
+ // if _evictorSize is 0, I may evict myself ... no big deal
+ //
+ evict();
+ return element->servant();
+ }
+}
+
+Ice::ObjectPtr
+Freeze::TransactionalEvictorI::evict(const Identity& ident, ObjectStore<TransactionalEvictorElement>* store)
+{
+ Lock sync(*this);
+ TransactionalEvictorElementPtr element = store->unpin(ident);
+
+ if(element != 0)
+ {
+ evict(element, false);
+ return element->servant();
+ }
+ return 0;
+}
+
+void
+Freeze::TransactionalEvictorI::evict(const TransactionalEvictorElementPtr& element, bool unpin)
+{
+ //
+ // Must be called with this locked!
+ //
+ assert(!element->_stale);
+ element->_stale = true;
+
+ if(unpin)
+ {
+ element->_store.unpin(element->_cachePosition);
+ }
+
+ if(element->_inEvictor)
+ {
+ element->_inEvictor = false;
+ _evictorList.erase(element->_evictPosition);
+ _currentEvictorSize--;
+ }
+ else
+ {
+ //
+ // This object was removed before it had time to make it into
+ // the evictor
+ //
+ assert(!unpin);
+ }
+}
+
+void
+Freeze::TransactionalEvictorI::fixEvictPosition(const TransactionalEvictorElementPtr& element)
+{
+ //
+ // Must be called with this locked!
+ //
+
+ assert(!element->_stale);
+
+ if(element->_inEvictor)
+ {
+ _evictorList.erase(element->_evictPosition);
+ }
+ else
+ {
+ //
+ // New object
+ //
+ _currentEvictorSize++;
+ element->_inEvictor = true;
+ }
+ _evictorList.push_front(element);
+ element->_evictPosition = _evictorList.begin();
+}
+
+
+void
+Freeze::TransactionalEvictorI::servantNotFound(const char* file, int line, const Current& current)
+{
+ if(_trace >= 2)
+ {
+ Trace out(_communicator->getLogger(), "Freeze.Evictor");
+ out << "could not find \"" << _communicator->identityToString(current.id)
+ << "\" with facet \"" << current.facet + "\"";
+ }
+
+ if(hasAnotherFacet(current.id, current.facet))
+ {
+ throw FacetNotExistException(file, line, current.id, current.facet, current.operation);
+ }
+ else
+ {
+ throw ObjectNotExistException(file, line, current.id, current.facet, current.operation);
+ }
+}
+
+
+
+Freeze::TransactionalEvictorElement::TransactionalEvictorElement(ObjectRecord& r,
+ ObjectStore<TransactionalEvictorElement>& s) :
+ _servant(r.servant),
+ _store(s),
+ _stale(true),
+ _inEvictor(false)
+{
+}
+
+
+Freeze::TransactionalEvictorElement::~TransactionalEvictorElement()
+{
+}
+
+void
+Freeze::TransactionalEvictorElement::init(ObjectStore<TransactionalEvictorElement>::Position p)
+{
+ _stale = false;
+ _cachePosition = p;
+}
+
+
+
diff --git a/cpp/src/Freeze/TransactionalEvictorI.h b/cpp/src/Freeze/TransactionalEvictorI.h
new file mode 100644
index 00000000000..04f3d9499d8
--- /dev/null
+++ b/cpp/src/Freeze/TransactionalEvictorI.h
@@ -0,0 +1,128 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#ifndef FREEZE_TRANSACTIONAL_EVICTOR_I_H
+#define FREEZE_TRANSACTIONAL_EVICTOR_I_H
+
+#include <Freeze/EvictorI.h>
+#include <Freeze/TransactionalEvictor.h>
+#include <Ice/DispatchInterceptor.h>
+
+namespace Freeze
+{
+
+class TransactionalEvictorI;
+
+struct TransactionalEvictorElement;
+typedef IceUtil::Handle<TransactionalEvictorElement> TransactionalEvictorElementPtr;
+
+class TransactionalEvictorElement : public Ice::LocalObject
+{
+public:
+
+ TransactionalEvictorElement(ObjectRecord&, ObjectStore<TransactionalEvictorElement>&);
+ ~TransactionalEvictorElement();
+
+ void init(ObjectStore<TransactionalEvictorElement>::Position);
+
+ const Ice::ObjectPtr& servant() const
+ {
+ return _servant;
+ }
+
+ bool stale() const
+ {
+ return _stale;
+ }
+
+private:
+
+ friend class TransactionalEvictorI;
+
+ const Ice::ObjectPtr _servant;
+
+ //
+ // Immutable
+ //
+ ObjectStore<TransactionalEvictorElement>& _store;
+
+ //
+ // Immutable once set
+ //
+ ObjectStore<TransactionalEvictorElement>::Position _cachePosition;
+
+ //
+ // Protected by TransactionalEvictorI
+ //
+ std::list<TransactionalEvictorElementPtr>::iterator _evictPosition;
+ bool _stale;
+ bool _inEvictor;
+};
+
+
+class TransactionalEvictorI : public TransactionalEvictor, public EvictorI<TransactionalEvictorElement>
+{
+public:
+
+ TransactionalEvictorI(const Ice::ObjectAdapterPtr&, const std::string&, DbEnv*, const std::string&,
+ const FacetTypeMap&, const ServantInitializerPtr&, const std::vector<IndexPtr>&, bool);
+
+ virtual ~TransactionalEvictorI();
+
+ virtual TransactionalEvictorContextPtr getCurrentContext();
+ virtual TransactionalEvictorContextPtr createCurrentContext();
+
+ virtual Ice::ObjectPrx addFacet(const Ice::ObjectPtr&, const Ice::Identity&, const std::string&);
+ virtual Ice::ObjectPtr removeFacet(const Ice::Identity&, const std::string&);
+
+ virtual bool hasFacet(const Ice::Identity&, const std::string&);
+
+ virtual void finished(const Ice::Current&, const Ice::ObjectPtr&, const Ice::LocalObjectPtr&);
+ virtual void deactivate(const std::string&);
+
+ virtual DbTxn* beforeQuery();
+
+ Ice::DispatchStatus dispatch(Ice::Request&);
+
+ Ice::ObjectPtr evict(const Ice::Identity&, ObjectStore<TransactionalEvictorElement>*);
+
+protected:
+
+ virtual bool hasAnotherFacet(const Ice::Identity&, const std::string&);
+
+ virtual Ice::ObjectPtr locateImpl(const Ice::Current&, Ice::LocalObjectPtr&);
+
+ virtual void evict();
+
+private:
+
+ Ice::ObjectPtr loadCachedServant(const Ice::Identity&, ObjectStore<TransactionalEvictorElement>*);
+
+ void evict(const TransactionalEvictorElementPtr&, bool);
+ void fixEvictPosition(const TransactionalEvictorElementPtr&);
+
+ void servantNotFound(const char*, int, const Ice::Current&);
+
+ //
+ // The _evictorList contains a list of all objects we keep,
+ // with the most recently used first.
+ //
+ std::list<TransactionalEvictorElementPtr> _evictorList;
+ std::list<TransactionalEvictorElementPtr>::size_type _currentEvictorSize;
+
+ bool _rollbackOnUserException;
+
+ Ice::DispatchInterceptorPtr _interceptor;
+};
+
+typedef IceUtil::Handle<TransactionalEvictorI> TransactionalEvictorIPtr;
+
+}
+
+#endif
diff --git a/cpp/test/Freeze/evictor/Client.cpp b/cpp/test/Freeze/evictor/Client.cpp
index cfafd704ef7..e77fdff9d72 100644
--- a/cpp/test/Freeze/evictor/Client.cpp
+++ b/cpp/test/Freeze/evictor/Client.cpp
@@ -342,6 +342,11 @@ public:
}
}
}
+ catch(const std::exception& ex)
+ {
+ cout << "Caught unexpected : " << ex.what() << endl;
+ test(false);
+ }
catch(...)
{
//
@@ -357,19 +362,26 @@ private:
};
int
-run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
+run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator, bool transactional, bool shutdown)
{
string ref = "factory:default -p 12010 -t 30000";
Ice::ObjectPrx base = communicator->stringToProxy(ref);
test(base);
Test::RemoteEvictorFactoryPrx factory = Test::RemoteEvictorFactoryPrx::checkedCast(base);
- cout << "testing Freeze Evictor... " << flush;
+ if(transactional)
+ {
+ cout << "testing transactional Freeze Evictor... " << flush;
+ }
+ else
+ {
+ cout << "testing background-save Freeze Evictor... " << flush;
+ }
const Ice::Int size = 5;
Ice::Int i;
- Test::RemoteEvictorPrx evictor = factory->createEvictor("Test");
+ Test::RemoteEvictorPrx evictor = factory->createEvictor("Test", transactional);
evictor->setSize(size);
@@ -453,30 +465,34 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
test(facet2);
test(facet2->getValue() == 100 * i + 100);
}
- //
- // Test saving while busy
- //
- Test::AMI_Servant_setValueAsyncPtr setCB = new AMI_Servant_setValueAsyncI;
- for(i = 0; i < size; i++)
- {
- //
- // Start a mutating operation so that the object is not idle.
- //
- servants[i]->setValueAsync_async(setCB, i + 300);
-
- test(servants[i]->getValue() == i + 100);
- //
- // This operation modifies the object state but is not saved
- // because the setValueAsync operation is still pending.
- //
- servants[i]->setValue(i + 200);
- test(servants[i]->getValue() == i + 200);
+ if(!transactional)
+ {
+ //
+ // Test saving while busy
//
- // Force the response to setValueAsync
- //
- servants[i]->releaseAsync();
- test(servants[i]->getValue() == i + 300);
+ Test::AMI_Servant_setValueAsyncPtr setCB = new AMI_Servant_setValueAsyncI;
+ for(i = 0; i < size; i++)
+ {
+ //
+ // Start a mutating operation so that the object is not idle.
+ //
+ servants[i]->setValueAsync_async(setCB, i + 300);
+
+ test(servants[i]->getValue() == i + 100);
+ //
+ // This operation modifies the object state but is not saved
+ // because the setValueAsync operation is still pending.
+ //
+ servants[i]->setValue(i + 200);
+ test(servants[i]->getValue() == i + 200);
+
+ //
+ // Force the response to setValueAsync
+ //
+ servants[i]->releaseAsync();
+ test(servants[i]->getValue() == i + 300);
+ }
}
//
@@ -530,14 +546,6 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
evictor->setSize(0);
evictor->setSize(size);
- for(i = 0; i < size; i++)
- {
- test(servants[i]->getValue() == i + 300);
-
- Test::FacetPrx facet1 = Test::FacetPrx::checkedCast(servants[i], "facet1");
- test(facet1 == 0);
- }
-
//
// Destroy servants and verify ObjectNotExistException.
//
@@ -592,83 +600,87 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
{
test(servants[i]->getTransientValue() == -1);
}
-
- //
- // Now with keep
- //
- for(i = 0; i < size; i++)
+
+ if(!transactional)
{
- servants[i]->keepInCache();
- servants[i]->keepInCache();
- servants[i]->setTransientValue(i);
- }
- evictor->saveNow();
- evictor->setSize(0);
- evictor->setSize(size);
+
+ //
+ // Now with keep
+ //
+ for(i = 0; i < size; i++)
+ {
+ servants[i]->keepInCache();
+ servants[i]->keepInCache();
+ servants[i]->setTransientValue(i);
+ }
+ evictor->saveNow();
+ evictor->setSize(0);
+ evictor->setSize(size);
- //
- // Check the transient value
- //
- for(i = 0; i < size; i++)
- {
- test(servants[i]->getTransientValue() == i);
- }
-
- //
- // Again, after one release
- //
- for(i = 0; i < size; i++)
- {
- servants[i]->release();
- }
- evictor->saveNow();
- evictor->setSize(0);
- evictor->setSize(size);
- for(i = 0; i < size; i++)
- {
- test(servants[i]->getTransientValue() == i);
- }
-
- //
- // Again, after a second release
- //
- for(i = 0; i < size; i++)
- {
- servants[i]->release();
- }
- evictor->saveNow();
- evictor->setSize(0);
- evictor->setSize(size);
- for(i = 0; i < size; i++)
- {
- test(servants[i]->getTransientValue() == -1);
- }
+ //
+ // Check the transient value
+ //
+ for(i = 0; i < size; i++)
+ {
+ test(servants[i]->getTransientValue() == i);
+ }
+ //
+ // Again, after one release
+ //
+ for(i = 0; i < size; i++)
+ {
+ servants[i]->release();
+ }
+ evictor->saveNow();
+ evictor->setSize(0);
+ evictor->setSize(size);
+ for(i = 0; i < size; i++)
+ {
+ test(servants[i]->getTransientValue() == i);
+ }
- //
- // Release one more time
- //
- for(i = 0; i < size; i++)
- {
- try
+ //
+ // Again, after a second release
+ //
+ for(i = 0; i < size; i++)
{
servants[i]->release();
- test(false);
}
- catch(const Test::NotRegisteredException&)
+ evictor->saveNow();
+ evictor->setSize(0);
+ evictor->setSize(size);
+ for(i = 0; i < size; i++)
{
- // Expected
+ test(servants[i]->getTransientValue() == -1);
}
- }
+ //
+ // Release one more time
+ //
+ for(i = 0; i < size; i++)
+ {
+ try
+ {
+ servants[i]->release();
+ test(false);
+ }
+ catch(const Test::NotRegisteredException&)
+ {
+ // Expected
+ }
+ }
+ }
+
+ //
// Deactivate and recreate evictor, to ensure that servants
// are restored properly after database close and reopen.
//
evictor->deactivate();
- evictor = factory->createEvictor("Test");
+ evictor = factory->createEvictor("Test", transactional);
evictor->setSize(size);
for(i = 0; i < size; i++)
@@ -792,7 +804,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
//
// Resurrect
//
- evictor = factory->createEvictor("Test");
+ evictor = factory->createEvictor("Test", transactional);
evictor->destroyAllServants("");
//
@@ -829,13 +841,16 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
//
// Clean up.
//
- evictor = factory->createEvictor("Test");
+ evictor = factory->createEvictor("Test", transactional);
evictor->destroyAllServants("");
evictor->deactivate();
cout << "ok" << endl;
- factory->shutdown();
+ if(shutdown)
+ {
+ factory->shutdown();
+ }
return EXIT_SUCCESS;
}
@@ -849,7 +864,11 @@ main(int argc, char* argv[])
try
{
communicator = Ice::initialize(argc, argv);
- status = run(argc, argv, communicator);
+ status = run(argc, argv, communicator, false, false);
+ if(status == 0)
+ {
+ status = run(argc, argv, communicator, true, true);
+ }
}
catch(const Ice::Exception& ex)
{
diff --git a/cpp/test/Freeze/evictor/Test.ice b/cpp/test/Freeze/evictor/Test.ice
index e51e4b39a18..d9286816015 100644
--- a/cpp/test/Freeze/evictor/Test.ice
+++ b/cpp/test/Freeze/evictor/Test.ice
@@ -73,7 +73,7 @@ interface RemoteEvictor
interface RemoteEvictorFactory
{
- RemoteEvictor* createEvictor(string name);
+ RemoteEvictor* createEvictor(string name, bool transactional);
void shutdown();
};
diff --git a/cpp/test/Freeze/evictor/TestI.cpp b/cpp/test/Freeze/evictor/TestI.cpp
index 490d23083ac..cce502c047c 100644
--- a/cpp/test/Freeze/evictor/TestI.cpp
+++ b/cpp/test/Freeze/evictor/TestI.cpp
@@ -162,7 +162,7 @@ Test::ServantI::setTransientValue(Ice::Int val, const Current& current)
void
Test::ServantI::keepInCache(const Current& current)
{
- _evictor->keep(current.id);
+ Freeze::BackgroundSaveEvictorPtr::dynamicCast(_evictor)->keep(current.id);
}
void
@@ -170,7 +170,7 @@ Test::ServantI::release(const Current& current)
{
try
{
- _evictor->release(current.id);
+ Freeze::BackgroundSaveEvictorPtr::dynamicCast(_evictor)->release(current.id);
}
catch(const Ice::NotRegisteredException&)
{
@@ -243,7 +243,7 @@ private:
Test::RemoteEvictorI::RemoteEvictorI(const ObjectAdapterPtr& adapter, const string& envName,
- const string& category) :
+ const string& category, bool transactional) :
_adapter(adapter),
_category(category)
{
@@ -252,7 +252,14 @@ Test::RemoteEvictorI::RemoteEvictorI(const ObjectAdapterPtr& adapter, const stri
Initializer* initializer = new Initializer;
- _evictor = Freeze::createEvictor(_evictorAdapter, envName, category, initializer);
+ if(transactional)
+ {
+ _evictor = Freeze::createTransactionalEvictor(_evictorAdapter, envName, category, Freeze::FacetTypeMap(), initializer);
+ }
+ else
+ {
+ _evictor = Freeze::createBackgroundSaveEvictor(_evictorAdapter, envName, category, initializer);
+ }
initializer->init(this, _evictor);
_evictorAdapter->addServantLocator(_evictor, category);
@@ -340,9 +347,9 @@ Test::RemoteEvictorFactoryI::RemoteEvictorFactoryI(const ObjectAdapterPtr& adapt
}
::Test::RemoteEvictorPrx
-Test::RemoteEvictorFactoryI::createEvictor(const string& name, const Current& current)
+Test::RemoteEvictorFactoryI::createEvictor(const string& name, bool transactional, const Current& current)
{
- RemoteEvictorIPtr remoteEvictor = new RemoteEvictorI(_adapter, _envName, name);
+ RemoteEvictorIPtr remoteEvictor = new RemoteEvictorI(_adapter, _envName, name, transactional);
return RemoteEvictorPrx::uncheckedCast(_adapter->add(remoteEvictor,
_adapter->getCommunicator()->stringToIdentity(name)));
}
diff --git a/cpp/test/Freeze/evictor/TestI.h b/cpp/test/Freeze/evictor/TestI.h
index 458cf023702..2129af65632 100644
--- a/cpp/test/Freeze/evictor/TestI.h
+++ b/cpp/test/Freeze/evictor/TestI.h
@@ -10,7 +10,7 @@
#ifndef TEST_I_H
#define TEST_I_H
-#include <Freeze/EvictorF.h>
+#include <Freeze/Evictor.h>
#include <IceUtil/IceUtil.h>
#include <Test.h>
@@ -90,7 +90,7 @@ class RemoteEvictorI : virtual public RemoteEvictor
{
public:
- RemoteEvictorI(const Ice::ObjectAdapterPtr&, const std::string&, const std::string&);
+ RemoteEvictorI(const Ice::ObjectAdapterPtr&, const std::string&, const std::string&, bool);
virtual void setSize(::Ice::Int, const Ice::Current&);
@@ -118,7 +118,7 @@ public:
RemoteEvictorFactoryI(const Ice::ObjectAdapterPtr&, const std::string&);
- virtual ::Test::RemoteEvictorPrx createEvictor(const ::std::string&, const Ice::Current&);
+ virtual ::Test::RemoteEvictorPrx createEvictor(const ::std::string&, bool, const Ice::Current&);
virtual void shutdown(const Ice::Current&);
diff --git a/cpp/test/Freeze/oldevictor/TestI.cpp b/cpp/test/Freeze/oldevictor/TestI.cpp
index 2e88f875e28..9cb280a0cde 100644
--- a/cpp/test/Freeze/oldevictor/TestI.cpp
+++ b/cpp/test/Freeze/oldevictor/TestI.cpp
@@ -161,7 +161,7 @@ Test::ServantI::setTransientValue(Ice::Int val, const Current& current)
void
Test::ServantI::keepInCache(const Current& current)
{
- _evictor->keep(current.id);
+ Freeze::BackgroundSaveEvictorPtr::dynamicCast(_evictor)->keep(current.id);
}
void
@@ -169,7 +169,7 @@ Test::ServantI::release(const Current& current)
{
try
{
- _evictor->release(current.id);
+ Freeze::BackgroundSaveEvictorPtr::dynamicCast(_evictor)->release(current.id);
}
catch(const Ice::NotRegisteredException&)
{
@@ -251,7 +251,7 @@ Test::RemoteEvictorI::RemoteEvictorI(const ObjectAdapterPtr& adapter, const stri
Initializer* initializer = new Initializer;
- _evictor = Freeze::createEvictor(_evictorAdapter, envName, category, initializer);
+ _evictor = Freeze::createBackgroundSaveEvictor(_evictorAdapter, envName, category, initializer);
initializer->init(this, _evictor);
_evictorAdapter->addServantLocator(_evictor, category);
diff --git a/cpp/test/Freeze/oldevictor/TestI.h b/cpp/test/Freeze/oldevictor/TestI.h
index cef09c3d6ad..d160aa21b68 100644
--- a/cpp/test/Freeze/oldevictor/TestI.h
+++ b/cpp/test/Freeze/oldevictor/TestI.h
@@ -10,7 +10,7 @@
#ifndef TEST_I_H
#define TEST_I_H
-#include <Freeze/EvictorF.h>
+#include <Freeze/Evictor.h>
#include <Test.h>
#include <IceUtil/IceUtil.h>
diff --git a/cpp/test/FreezeScript/evictor/makedb.cpp b/cpp/test/FreezeScript/evictor/makedb.cpp
index 2a765c03322..56b630f65b4 100644
--- a/cpp/test/FreezeScript/evictor/makedb.cpp
+++ b/cpp/test/FreezeScript/evictor/makedb.cpp
@@ -70,7 +70,7 @@ run(const Ice::CommunicatorPtr& communicator, const string& envName, const strin
communicator->addObjectFactory(factory, "");
Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("");
- Freeze::EvictorPtr evictor = Freeze::createEvictor(adapter, envName, dbName);
+ Freeze::EvictorPtr evictor = Freeze::createBackgroundSaveEvictor(adapter, envName, dbName);
for(int i = 0; i < 10; ++i)
{