Commit 7875e65b authored by Jim Fulton's avatar Jim Fulton

Moved prefetch methods to separate interfaces

Cus there's no such thing as an optional method in interfaces.
parent 9b1121e1
......@@ -567,15 +567,6 @@ class IStorage(Interface):
If the object id isn't in the storage, then POSKeyError is raised.
"""
def prefetch(oids, tid):
"""Prefetch data for the given object ids before the given tid
The oids argument is an iterable that should be iterated no
more than once.
This method is optional. It is an optimization
"""
def loadSerial(oid, serial):
"""Load the object record for the give transaction id
......@@ -763,6 +754,16 @@ class IStorage(Interface):
"""
class IPrefetchStorage(IStorage):
def prefetch(oids, tid):
"""Prefetch data for the given object ids before the given tid
The oids argument is an iterable that should be iterated no
more than once.
"""
class IMultiCommitStorage(IStorage):
"""A multi-commit storage can commit multiple transactions at once.
......@@ -1121,16 +1122,15 @@ class IMVCCStorage(IStorage):
A POSKeyError is raised if there is no record for the object id.
"""
class IMVCCPrefetchStorage(IMVCCStorage):
def prefetch(oids):
"""Prefetch data for the given object ids
The oids argument is an iterable that should be iterated no
more than once.
This method is optional. It is an optimization
"""
class IStorageCurrentRecordIteration(IStorage):
def record_iternext(next=None):
......
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