[Zodb-checkins] SVN: ZODB/trunk/src/Z Renamed blob_cache_writable
to shared_blob_dir.
Jim Fulton
jim at zope.com
Sun Jun 10 17:56:55 EDT 2007
Log message for revision 76603:
Renamed blob_cache_writable to shared_blob_dir.
Changed:
U ZODB/trunk/src/ZEO/ClientStorage.py
U ZODB/trunk/src/ZEO/tests/testZEO.py
U ZODB/trunk/src/ZODB/component.xml
U ZODB/trunk/src/ZODB/config.py
-=-
Modified: ZODB/trunk/src/ZEO/ClientStorage.py
===================================================================
--- ZODB/trunk/src/ZEO/ClientStorage.py 2007-06-10 21:54:27 UTC (rev 76602)
+++ ZODB/trunk/src/ZEO/ClientStorage.py 2007-06-10 21:56:54 UTC (rev 76603)
@@ -115,7 +115,7 @@
wait=None, wait_timeout=None,
read_only=0, read_only_fallback=0,
username='', password='', realm=None,
- blob_dir=None, blob_cache_writable=False):
+ blob_dir=None, shared_blob_dir=False):
"""ClientStorage constructor.
This is typically invoked from a custom_zodb.py file.
@@ -191,7 +191,7 @@
blob_dir -- directory path for blob data. 'blob data' is data that
is retrieved via the loadBlob API.
- blob_cache_writable -- Flag whether the blob_dir is a writable shared
+ shared_blob_dir -- Flag whether the blob_dir is a server-shared
filesystem that should be used instead of transferring blob data over
zrpc.
@@ -322,7 +322,7 @@
# XXX need to check for POSIX-ness here
self.blob_dir = blob_dir
- self.blob_cache_writable = blob_cache_writable
+ self.shared_blob_dir = shared_blob_dir
if blob_dir is not None:
# Avoid doing this import unless we need it, as it
# currently requires pywin32 on Windows.
@@ -895,7 +895,7 @@
def storeBlob(self, oid, serial, data, blobfilename, version, txn):
"""Storage API: store a blob object."""
serials = self.store(oid, serial, data, version, txn)
- if self.blob_cache_writable:
+ if self.shared_blob_dir:
self._storeBlob_shared(
oid, serial, data, blobfilename, version, txn)
else:
@@ -970,7 +970,7 @@
if self._have_blob(blob_filename, oid, serial):
return blob_filename
- if self.blob_cache_writable:
+ if self.shared_blob_dir:
# We're using a server shared cache. If the file isn't
# here, it's not anywhere.
raise POSKeyError("No blob file", oid, serial)
Modified: ZODB/trunk/src/ZEO/tests/testZEO.py
===================================================================
--- ZODB/trunk/src/ZEO/tests/testZEO.py 2007-06-10 21:54:27 UTC (rev 76602)
+++ ZODB/trunk/src/ZEO/tests/testZEO.py 2007-06-10 21:56:54 UTC (rev 76603)
@@ -139,7 +139,7 @@
"""Combine tests from various origins in one class."""
- blob_cache_writable = False
+ shared_blob_dir = False
blob_cache_dir = None
def setUp(self):
@@ -158,7 +158,7 @@
zport, '1', cache_size=20000000,
min_disconnect_poll=0.5, wait=1,
wait_timeout=60, blob_dir=self.blob_cache_dir,
- blob_cache_writable=self.blob_cache_writable)
+ shared_blob_dir=self.shared_blob_dir)
self._storage.registerDB(DummyDB())
def tearDown(self):
@@ -636,7 +636,7 @@
def setUp(self):
self.blobdir = self.blob_cache_dir = tempfile.mkdtemp()
self.filestorage = tempfile.mktemp()
- self.blob_cache_writable = True
+ self.shared_blob_dir = True
super(BlobWritableCacheTests, self).setUp()
Modified: ZODB/trunk/src/ZODB/component.xml
===================================================================
--- ZODB/trunk/src/ZODB/component.xml 2007-06-10 21:54:27 UTC (rev 76602)
+++ ZODB/trunk/src/ZODB/component.xml 2007-06-10 21:56:54 UTC (rev 76603)
@@ -70,7 +70,7 @@
Path name to the blob cache directory.
</description>
</key>
- <key name="blob-cache-writable" required="no" default="no"
+ <key name="shared-blob-dir" required="no" default="no"
datatype="boolean">
<description>
Tells whether the cache is a shared writable directory
Modified: ZODB/trunk/src/ZODB/config.py
===================================================================
--- ZODB/trunk/src/ZODB/config.py 2007-06-10 21:54:27 UTC (rev 76602)
+++ ZODB/trunk/src/ZODB/config.py 2007-06-10 21:56:54 UTC (rev 76603)
@@ -152,7 +152,7 @@
return ClientStorage(
L,
blob_dir=self.config.blob_dir,
- blob_cache_writable=self.config.blob_cache_writable,
+ shared_blob_dir=self.config.shared_blob_dir,
storage=self.config.storage,
cache_size=self.config.cache_size,
name=self.config.name,
More information about the Zodb-checkins
mailing list