KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > web > tomcat > tc6 > session > JBossCacheManagerMBean


1 package org.jboss.web.tomcat.tc6.session;
2
3 public interface JBossCacheManagerMBean extends JBossManagerMBean
4 {
5    /**
6     * Gets the value of the attribute with the given key from the given
7     * session. If the session is in the distributed store but hasn't been
8     * loaded on this node, invoking this method will cause it to be loaded.
9     *
10     * @param sessionId the id of the session
11     * @param key the attribute key
12     * @return the value, or <code>null</code> if the session or
13     * key does not exist.
14     */

15    Object JavaDoc getSessionAttribute(String JavaDoc sessionId, String JavaDoc key);
16    
17    /**
18     * Same as <code>getSessionAttribute(sessionId, key).toString()</code>.
19     *
20     */

21    String JavaDoc getSessionAttributeString(String JavaDoc sessionId, String JavaDoc key);
22    
23    /**
24     * Expires the given session. If the session is in the distributed store
25     * but hasn't been loaded on this node, invoking this method will cause it
26     * to be loaded.
27     *
28     * @param sessionId the id of the session
29     */

30    void expireSession(String JavaDoc sessionId);
31    
32    /**
33     * Gets the last time the given session was accessed on this node.
34     * Information about sessions stored in the distributed store but never
35     * accessed on this node will not be made available.
36     *
37     * @param sessionId
38     * @return the last accessed time, or <code>null</code> if the session
39     * has expired or has never been accessed on this node.
40     */

41    String JavaDoc getLastAccessedTime(String JavaDoc sessionId);
42    
43    /**
44     * Gets the JMX ObjectName of the distributed session cache as a string.
45     */

46    String JavaDoc getCacheObjectNameString();
47    
48    /**
49     * Gets the replication granularity.
50     *
51     * @return SESSION, ATTRIBUTE or FIELD, or <code>null</code> if this
52     * has not yet been configured.
53     */

54    String JavaDoc getReplicationGranularityString();
55
56    /**
57     * Gets the replication trigger.
58     *
59     * @return SET, SET_AND_GET, SET_AND_NON_PRIMITIVE_GET or <code>null</code>
60     * if this has not yet been configured.
61     */

62    String JavaDoc getReplicationTriggerString();
63    
64    /**
65     * Gets whether batching of field granularity changes will be done. Only
66     * relevant with replication granularity FIELD.
67     *
68     * @return <code>true</code> if per-request batching will be done,
69     * <code>false</code> if not, <code>null</code> if not configured
70     */

71    Boolean JavaDoc isReplicationFieldBatchMode();
72    
73    /**
74     * Gets whether JK is being used and special handling of a jvmRoute
75     * portion of session ids is needed.
76     */

77    boolean getUseJK();
78    
79    /**
80     * Gets the snapshot mode.
81     *
82     * @return "instant" or "interval"
83     */

84    String JavaDoc getSnapshotMode();
85    
86    /**
87     * Gets the number of milliseconds between replications if "interval" mode
88     * is used.
89     */

90    int getSnapshotInterval();
91    
92    /**
93     * Lists all session ids known to this manager, including those in the
94     * distributed store that have not been accessed on this node.
95     *
96     * @return a comma-separated list of session ids
97     */

98    String JavaDoc listSessionIds();
99    
100    /**
101     * Lists all session ids known to this manager, excluding those in the
102     * distributed store that have not been accessed on this node.
103     *
104     * @return a comma-separated list of session ids
105     */

106    String JavaDoc listLocalSessionIds();
107 }
108
Popular Tags