KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > versant > core > jdo > PersistenceManagerStatus


1
2 /*
3  * Copyright (c) 1998 - 2005 Versant Corporation
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  * Versant Corporation - initial API and implementation
11  */

12 package com.versant.core.jdo;
13
14 import java.io.Serializable JavaDoc;
15
16 /**
17  * This is a read only value object to report the status of an jdo client
18  * connection i.e. a PersistenceManager (local or remote).
19  */

20 public final class PersistenceManagerStatus implements Serializable JavaDoc {
21
22     private final int id;
23     private final long timeCreated;
24     private final boolean txActive;
25     private final long lastTxStarted;
26     private final long timeLastTxEnded;
27     private final Object JavaDoc userObject;
28     private final String JavaDoc remoteClient;
29     private final boolean optimistic;
30     private final boolean open;
31
32     public PersistenceManagerStatus(int id, long timeCreated, boolean txActive,
33             long lastTxStarted, long timeLastTxEnded,
34             Object JavaDoc userObject, String JavaDoc remoteClient,
35             boolean optimistic, boolean open) {
36         this.id = id;
37         this.timeCreated = timeCreated;
38         this.txActive = txActive;
39         this.lastTxStarted = lastTxStarted;
40         this.timeLastTxEnded = timeLastTxEnded;
41         this.userObject = userObject;
42         this.remoteClient = remoteClient;
43         this.optimistic = optimistic;
44         this.open = open;
45     }
46
47     public int getId() {
48         return id;
49     }
50
51     public long getTimeCreated() {
52         return timeCreated;
53     }
54
55     public boolean getTxActive() {
56         return txActive;
57     }
58
59     public long getLastTxStarted() {
60         return lastTxStarted;
61     }
62
63     public long getTimeLastTxEnded() {
64         return timeLastTxEnded;
65     }
66
67     public Object JavaDoc getUserObject() {
68         return userObject;
69     }
70
71     public String JavaDoc getRemoteClient() {
72         return remoteClient;
73     }
74
75     public boolean getOptimistic() {
76         return optimistic;
77     }
78
79     public boolean isRemote() {
80         return remoteClient != null;
81     }
82
83     public boolean isOpen() {
84         return open;
85     }
86
87 }
88
Popular Tags