| Home | Trees | Indices | Help |
|---|
|
|
object --+
|
PersistentConsumedSeq
I generate [0, 1, ...], like count, but I can also save
my state to disk. Similar to PersistentSeq, but instead of committing on each call to
next, require manual explicit calls to commit. I'm useful for generating unique IDs.
Why not simply use PersistentSeq instead of me? You usually can. However, some applications use me for efficiency. For instance, consider an application that generates a lot of network packets (with sequence numbers), but only sends a small fraction of them out onto the network. If we only want to guarantee the uniqueness of sequence numbers that are exposed to the world, we need only commit when upon sending a packet, and not on generating a packet (next). This could avoid excessive writes.
|
|||
|
|||
| int |
|
||
| int |
|
||
|
|||
|
Inherited from |
|||
|
|||
| int |
seqno The next sequence number to be generated. |
||
|
|||
|
Inherited from |
|||
|
|||
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
|
|
|
Closes the log file. No more operations can be performed. |
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Sat Apr 17 20:45:14 2010 | http://epydoc.sourceforge.net |