@@ -90,7 +90,9 @@ def __init__(self, *args, **kwargs):
9090
9191 #{ Edit Interface
9292 def set_ostream (self , stream ):
93- """Adjusts the stream to which all data should be sent when storing new objects
93+ """
94+ Adjusts the stream to which all data should be sent when storing new objects
95+
9496 :param stream: if not None, the stream to use, if None the default stream
9597 will be used.
9698 :return: previously installed stream, or None if there was no override
@@ -100,30 +102,36 @@ def set_ostream(self, stream):
100102 return cstream
101103
102104 def ostream (self ):
103- """:return: overridden output stream this instance will write to, or None
105+ """
106+ :return: overridden output stream this instance will write to, or None
104107 if it will write to the default stream"""
105108 return self ._ostream
106109
107110 def store (self , istream ):
108- """Create a new object in the database
111+ """
112+ Create a new object in the database
109113 :return: the input istream object with its sha set to its corresponding value
114+
110115 :param istream: IStream compatible instance. If its sha is already set
111116 to a value, the object will just be stored in the our database format,
112117 in which case the input stream is expected to be in object format ( header + contents ).
113118 :raise IOError: if data could not be written"""
114119 raise NotImplementedError ("To be implemented in subclass" )
115120
116121 def store_async (self , reader ):
117- """Create multiple new objects in the database asynchronously. The method will
122+ """
123+ Create multiple new objects in the database asynchronously. The method will
118124 return right away, returning an output channel which receives the results as
119125 they are computed.
120126
121127 :return: Channel yielding your IStream which served as input, in any order.
122128 The IStreams sha will be set to the sha it received during the process,
123129 or its error attribute will be set to the exception informing about the error.
130+
124131 :param reader: async.Reader yielding IStream instances.
125132 The same instances will be used in the output channel as were received
126133 in by the Reader.
134+
127135 :note:As some ODB implementations implement this operation atomic, they might
128136 abort the whole operation if one item could not be processed. Hence check how
129137 many items have actually been produced."""
@@ -167,8 +175,10 @@ class CachingDB(object):
167175
168176 #{ Interface
169177 def update_cache (self , force = False ):
170- """Call this method if the underlying data changed to trigger an update
178+ """
179+ Call this method if the underlying data changed to trigger an update
171180 of the internal caching structures.
181+
172182 :param force: if True, the update must be performed. Otherwise the implementation
173183 may decide not to perform an update if it thinks nothing has changed.
174184 :return: True if an update was performed as something change indeed"""
0 commit comments