01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */package org.apache.geronimo.timer;
17:
18: import java.util.Date;
19: import java.util.Collection;
20:
21: import javax.transaction.RollbackException;
22: import javax.transaction.SystemException;
23:
24: import org.apache.geronimo.timer.PersistenceException;
25:
26: /**
27: *
28: *
29: * @version $Rev: 476049 $ $Date: 2006-11-16 20:35:17 -0800 (Thu, 16 Nov 2006) $
30: *
31: * */
32: public interface PersistentTimer {
33: WorkInfo schedule(UserTaskFactory userTaskFactory, String key,
34: Object userId, Object userInfo, long delay)
35: throws PersistenceException, RollbackException,
36: SystemException;
37:
38: WorkInfo schedule(String key, UserTaskFactory userTaskFactory,
39: Object userId, Object userInfo, Date time)
40: throws PersistenceException, RollbackException,
41: SystemException;
42:
43: WorkInfo schedule(String key, UserTaskFactory userTaskFactory,
44: Object userInfo, long delay, long period, Object userId)
45: throws PersistenceException, RollbackException,
46: SystemException;
47:
48: WorkInfo schedule(String key, UserTaskFactory userTaskFactory,
49: Object userId, Object userInfo, Date firstTime, long period)
50: throws PersistenceException, RollbackException,
51: SystemException;
52:
53: WorkInfo scheduleAtFixedRate(String key,
54: UserTaskFactory userTaskFactory, Object userId,
55: Object userInfo, long delay, long period)
56: throws PersistenceException, RollbackException,
57: SystemException;
58:
59: WorkInfo scheduleAtFixedRate(String key,
60: UserTaskFactory userTaskFactory, Object userId,
61: Object userInfo, Date firstTime, long period)
62: throws PersistenceException, RollbackException,
63: SystemException;
64:
65: Collection playback(String key, UserTaskFactory userTaskFactory)
66: throws PersistenceException;
67:
68: Collection getIdsByKey(String key, Object userId)
69: throws PersistenceException;
70:
71: WorkInfo getWorkInfo(Long id);
72:
73: void cancelTimerTasks(Collection ids);
74: }
|