~divmod-dev/divmod.org/multiple-to-1940

« back to all changes in this revision

Viewing changes to Axiom/axiom/iaxiom.py

  • Committer: exarkun
  • Date: 2009-07-07 20:35:43 UTC
  • Revision ID: svn-v4:866e43f7-fbfc-0310-8f2a-ec88d1da2979:trunk:17723
Merge scheduler-nonitem-1408-2

Author: exarkun
Reviewer: glyph
Fixes: #1408

Introduce an in-memory-only `IScheduler` adapter for `Store` which supercedes
the `Scheduler` and `SubScheduler` item classes.  `Scheduler` and `SubScheduler`
still exist, but they will be deprecated shortly, and then upgraded out of
existence.  The correct way to get the scheduler for a store is to adapt the
store to `IScheduler`.  This will succeed without any particular database
state being created to support it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
        @type interface: L{zope.interface.Interface}
95
95
        """
96
96
 
 
97
 
 
98
 
97
99
class IScheduler(Interface):
98
100
    """
99
101
    An interface for scheduling tasks.  Quite often the store will be adaptable
101
103
    assume that it is if your application needs to schedule timed events or
102
104
    queue tasks.
103
105
    """
104
 
    def schedule(self, runnable, when):
 
106
    def schedule(runnable, when):
105
107
        """
106
108
        @param runnable: any Item with a 'run' method.
107
109
 
111
113
        """
112
114
 
113
115
 
 
116
 
114
117
class IQuery(Interface):
115
118
    """
116
119
    An object that represents a query that can be performed against a database.