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,7 +16,7 @@ class NEOStorageConflictError(NEOStorageError): ...@@ -16,7 +16,7 @@ class NEOStorageConflictError(NEOStorageError):
class NEOStorageNotFoundError(NEOStorageError): class NEOStorageNotFoundError(NEOStorageError):
pass pass
class NEOStorage(BaseStorage.BaseStorage, class Storage(BaseStorage.BaseStorage,
ConflictResolution.ConflictResolvingStorage): ConflictResolution.ConflictResolvingStorage):
"""Wrapper class for neoclient.""" """Wrapper class for neoclient."""
...@@ -53,7 +53,7 @@ class NEOStorage(BaseStorage.BaseStorage, ...@@ -53,7 +53,7 @@ class NEOStorage(BaseStorage.BaseStorage,
raise POSException.POSKeyError(oid) raise POSException.POSKeyError(oid)
def close(self): def close(self):
return self.appclose() return self.app.close()
def cleanup(self): def cleanup(self):
raise NotImplementedError raise NotImplementedError
......
from ZODB.config import BaseConfig from ZODB.config import BaseConfig
class NEOStorage(BaseConfig): class NeoStorage(BaseConfig):
def open(self): def open(self):
from NEOStorage import NEOStorage from Storage import Storage
return NEOStorage(master_nodes = self.config.master_nodes, name = self.config.name) return Storage(master_nodes = self.config.master_nodes, name = self.config.name)
<component prefix="neo.client.config"> <component prefix="neo.client.config">
<sectiontype name="NEOStorage" datatype=".NEOStorage" <sectiontype name="NeoStorage" datatype=".NeoStorage"
implements="ZODB.storage"> implements="ZODB.storage">
<description> <description>
A scalable storage for Zope A scalable storage for Zope
......
...@@ -16,6 +16,12 @@ class BaseConnection(object): ...@@ -16,6 +16,12 @@ class BaseConnection(object):
if s is not None: if s is not None:
event_manager.register(self) event_manager.register(self)
def lock(self):
return 1
def unlock(self):
return None
def getSocket(self): def getSocket(self):
return self.s return self.s
...@@ -47,12 +53,6 @@ class BaseConnection(object): ...@@ -47,12 +53,6 @@ class BaseConnection(object):
def getUUID(self): def getUUID(self):
return None return None
def acquire(self, block = 1):
return 1
def release(self):
pass
class ListeningConnection(BaseConnection): class ListeningConnection(BaseConnection):
"""A listen connection.""" """A listen connection."""
def __init__(self, event_manager, handler, addr = None, **kw): def __init__(self, event_manager, handler, addr = None, **kw):
......
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