Commit 70fb83f7 authored by Aurel's avatar Aurel

rename NEOStorage to Storage


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@158 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent ea1f2b70
......@@ -16,8 +16,8 @@ class NEOStorageConflictError(NEOStorageError):
class NEOStorageNotFoundError(NEOStorageError):
pass
class NEOStorage(BaseStorage.BaseStorage,
ConflictResolution.ConflictResolvingStorage):
class Storage(BaseStorage.BaseStorage,
ConflictResolution.ConflictResolvingStorage):
"""Wrapper class for neoclient."""
__name__ = 'NEOStorage'
......@@ -53,7 +53,7 @@ class NEOStorage(BaseStorage.BaseStorage,
raise POSException.POSKeyError(oid)
def close(self):
return self.appclose()
return self.app.close()
def cleanup(self):
raise NotImplementedError
......
from ZODB.config import BaseConfig
class NEOStorage(BaseConfig):
class NeoStorage(BaseConfig):
def open(self):
from NEOStorage import NEOStorage
return NEOStorage(master_nodes = self.config.master_nodes, name = self.config.name)
from Storage import Storage
return Storage(master_nodes = self.config.master_nodes, name = self.config.name)
<component prefix="neo.client.config">
<sectiontype name="NEOStorage" datatype=".NEOStorage"
<sectiontype name="NeoStorage" datatype=".NeoStorage"
implements="ZODB.storage">
<description>
A scalable storage for Zope
......
......@@ -16,6 +16,12 @@ class BaseConnection(object):
if s is not None:
event_manager.register(self)
def lock(self):
return 1
def unlock(self):
return None
def getSocket(self):
return self.s
......@@ -47,12 +53,6 @@ class BaseConnection(object):
def getUUID(self):
return None
def acquire(self, block = 1):
return 1
def release(self):
pass
class ListeningConnection(BaseConnection):
"""A listen connection."""
def __init__(self, event_manager, handler, addr = None, **kw):
......@@ -246,7 +246,7 @@ class Connection(BaseConnection):
def expectMessage(self, msg_id = None, timeout = 5, additional_timeout = 30):
"""Expect a message for a reply to a given message ID or any message.
The purpose of this method is to define how much amount of time is
acceptable to wait for a message, thus to detect a down or broken
peer. This is important, because one error may halt a whole cluster
......@@ -257,10 +257,10 @@ class Connection(BaseConnection):
The message ID specifies what ID is expected. Usually, this should
be identical with an ID for a request message. If it is None, any
message is acceptable, so it can be used to check idle time.
The timeout is the amount of time to wait until keep-alive messages start.
Once the timeout is expired, the connection starts to ping the peer.
The additional timeout defines the amount of time after the timeout
to invoke a timeoutExpired callback. If it is zero, no ping is sent, and
the callback is executed immediately."""
......
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