Commit 2aafe8ad authored by Jim Fulton's avatar Jim Fulton

Renamed blob_cache_writable to shared_blob_dir.

parent 7948f050
......@@ -115,7 +115,7 @@ class ClientStorage(object):
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 @@ class ClientStorage(object):
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 @@ class ClientStorage(object):
# 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 @@ class ClientStorage(object):
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 @@ class ClientStorage(object):
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)
......
......@@ -139,7 +139,7 @@ class GenericTests(
"""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 @@ class GenericTests(
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 @@ class BlobWritableCacheTests(GenericTests, CommonBlobTests):
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()
......
......@@ -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
......
......@@ -152,7 +152,7 @@ class ZEOClient(BaseConfig):
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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment