KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > ha > hasessionstate > interfaces > PackagedSession


1 /*
2   * JBoss, Home of Professional Open Source
3   * Copyright 2005, JBoss Inc., and individual contributors as indicated
4   * by the @authors tag. See the copyright.txt in the distribution for a
5   * full listing of individual contributors.
6   *
7   * This is free software; you can redistribute it and/or modify it
8   * under the terms of the GNU Lesser General Public License as
9   * published by the Free Software Foundation; either version 2.1 of
10   * the License, or (at your option) any later version.
11   *
12   * This software is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15   * Lesser General Public License for more details.
16   *
17   * You should have received a copy of the GNU Lesser General Public
18   * License along with this software; if not, write to the Free
19   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21   */

22 package org.jboss.ha.hasessionstate.interfaces;
23
24
25 import java.io.Serializable JavaDoc;
26
27 /**
28  * Information about a session that is shared by nodes in a same sub-partition
29  *
30  * @see HASessionState, PackagedSessionImpl
31  * @author sacha.labourey@cogito-info.ch
32  * @version $Revision: 37459 $
33  *
34  * <p><b>Revisions:</b><br>
35  */

36
37 public interface PackagedSession extends Serializable JavaDoc
38 {
39    /** The serialVersionUID
40     * @since 1.2
41     */

42    static final long serialVersionUID = 689622988452110553L;
43    /*
44     * Stored state
45     */

46    public byte[] getState ();
47    public boolean setState (byte[] state);
48    
49    /*
50     * Stored state
51     */

52    public boolean isStateIdentical (byte[] state);
53    
54    /*
55     * Update the state and content of this PackagedSession from the content of another
56     * PackagedSession.
57     */

58    public void update (PackagedSession clone);
59    
60    /*
61     * Owner node of the state
62     */

63    public String JavaDoc getOwner ();
64    public void setOwner (String JavaDoc owner);
65    
66    /*
67     * Version number of this state
68     */

69    public long getVersion ();
70    
71    /*
72     * Key identifier associated with this state
73     */

74    public Serializable JavaDoc getKey ();
75    public void setKey (Serializable JavaDoc key);
76    
77    /*
78     * Number of miliseconds since when this state has not been modified in this VM
79     */

80    public long unmodifiedExistenceInVM ();
81 }
82
Popular Tags