KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > ejb > containers > TimerLocalHome


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 package com.sun.ejb.containers;
25
26 import java.io.Serializable JavaDoc;
27 import java.util.Date JavaDoc;
28 import java.util.Collection JavaDoc;
29 import java.util.Set JavaDoc;
30
31 import javax.ejb.EJBLocalHome JavaDoc;
32 import javax.ejb.EJBLocalObject JavaDoc;
33 import javax.ejb.CreateException JavaDoc;
34 import javax.ejb.FinderException JavaDoc;
35
36 /**
37  *
38  * @author Kenneth Saks
39  */

40 public interface TimerLocalHome extends EJBLocalHome JavaDoc {
41
42     TimerLocal create(String JavaDoc timerId,
43                       long containerId, String JavaDoc ownerId,
44                       Object JavaDoc timedObjectPrimaryKey,
45                       Date JavaDoc initialExpiration, long intervalDuration,
46                       Serializable JavaDoc info) throws CreateException JavaDoc;
47
48     TimerLocal findByPrimaryKey(TimerPrimaryKey timerId) throws FinderException JavaDoc;
49
50     //
51
// Queries returning Timer Ids (TimerPrimaryKey)
52
//
53

54     Set JavaDoc selectTimerIdsByContainer(long containerId)
55         throws FinderException JavaDoc;
56     Set JavaDoc selectActiveTimerIdsByContainer(long containerId)
57         throws FinderException JavaDoc;
58     Set JavaDoc selectCancelledTimerIdsByContainer(long containerId)
59         throws FinderException JavaDoc;
60
61     Set JavaDoc selectTimerIdsOwnedByThisServerByContainer(long containerId)
62         throws FinderException JavaDoc;
63     Set JavaDoc selectActiveTimerIdsOwnedByThisServerByContainer(long containerId)
64         throws FinderException JavaDoc;
65     Set JavaDoc selectCancelledTimerIdsOwnedByThisServerByContainer(long containerId)
66         throws FinderException JavaDoc;
67
68     Set JavaDoc selectAllTimerIdsOwnedByThisServer() throws FinderException JavaDoc;
69     Set JavaDoc selectAllActiveTimerIdsOwnedByThisServer() throws FinderException JavaDoc;
70     Set JavaDoc selectAllCancelledTimerIdsOwnedByThisServer() throws FinderException JavaDoc;
71
72     Set JavaDoc selectAllTimerIdsOwnedBy(String JavaDoc owner) throws FinderException JavaDoc;
73     Set JavaDoc selectAllActiveTimerIdsOwnedBy(String JavaDoc owner) throws FinderException JavaDoc;
74     Set JavaDoc selectAllCancelledTimerIdsOwnedBy(String JavaDoc owner) throws FinderException JavaDoc;
75
76
77     //
78
// Queries returning Timer local objects
79
//
80

81     Set JavaDoc selectTimersByContainer(long containerId)
82         throws FinderException JavaDoc;
83     Set JavaDoc selectActiveTimersByContainer(long containerId)
84         throws FinderException JavaDoc;
85     Set JavaDoc selectCancelledTimersByContainer(long containerId)
86         throws FinderException JavaDoc;
87
88     Set JavaDoc selectTimersOwnedByThisServerByContainer(long containerId)
89         throws FinderException JavaDoc;
90     Set JavaDoc selectActiveTimersOwnedByThisServerByContainer(long containerId)
91         throws FinderException JavaDoc;
92     Set JavaDoc selectCancelledTimersOwnedByThisServerByContainer(long containerId)
93         throws FinderException JavaDoc;
94
95     Set JavaDoc selectAllTimersOwnedByThisServer() throws FinderException JavaDoc;
96     Set JavaDoc selectAllActiveTimersOwnedByThisServer() throws FinderException JavaDoc;
97     Set JavaDoc selectAllCancelledTimersOwnedByThisServer() throws FinderException JavaDoc;
98
99     Set JavaDoc selectAllTimersOwnedBy(String JavaDoc owner) throws FinderException JavaDoc;
100     Set JavaDoc selectAllActiveTimersOwnedBy(String JavaDoc owner) throws FinderException JavaDoc;
101     Set JavaDoc selectAllCancelledTimersOwnedBy(String JavaDoc owner) throws FinderException JavaDoc;
102
103
104     //
105
// Queries returning counts
106
//
107

108     int selectCountTimersByContainer(long containerId)
109         throws FinderException JavaDoc;
110     int selectCountActiveTimersByContainer(long containerId)
111         throws FinderException JavaDoc;
112     int selectCountCancelledTimersByContainer(long containerId)
113         throws FinderException JavaDoc;
114
115     int selectCountTimersOwnedByThisServerByContainer(long containerId)
116         throws FinderException JavaDoc;
117     int selectCountActiveTimersOwnedByThisServerByContainer(long containerId)
118         throws FinderException JavaDoc;
119     int selectCountCancelledTimersOwnedByThisServerByContainer(long containerId)
120         throws FinderException JavaDoc;
121
122     int selectCountAllTimersOwnedByThisServer()
123         throws FinderException JavaDoc;
124     int selectCountAllActiveTimersOwnedByThisServer()
125         throws FinderException JavaDoc;
126     int selectCountAllCancelledTimersOwnedByThisServer()
127         throws FinderException JavaDoc;
128
129     int selectCountAllTimersOwnedBy(String JavaDoc owner)
130         throws FinderException JavaDoc;
131     int selectCountAllActiveTimersOwnedBy(String JavaDoc owner)
132         throws FinderException JavaDoc;
133     int selectCountAllCancelledTimersOwnedBy(String JavaDoc owner)
134         throws FinderException JavaDoc;
135
136
137
138     // Perform health check on timer database
139
boolean checkStatus(String JavaDoc resourceJndiName, boolean checkDatabase);
140
141 }
142
Popular Tags