01: /*
02: * Copyright (c) 1998 - 2005 Versant Corporation
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * Versant Corporation - initial API and implementation
10: */
11: package com.versant.core.jdo;
12:
13: import java.io.Serializable;
14: import java.util.Date;
15:
16: /**
17: * Info on the status of a JdoGeniePersistenceManagerFactory.
18: * @see com.versant.core.jdo.VersantPersistenceManagerFactory#getPmfStatus
19: */
20: public class PmfStatus implements Serializable {
21:
22: private String server;
23: private Date date;
24: private int freeK;
25: private int totalK;
26:
27: public PmfStatus() {
28: date = new Date();
29: freeK = (int) (Runtime.getRuntime().freeMemory() >> 10);
30: totalK = (int) (Runtime.getRuntime().totalMemory() >> 10);
31: }
32:
33: public String getServer() {
34: return server;
35: }
36:
37: public void setServer(String server) {
38: this .server = server;
39: }
40:
41: public Date getDate() {
42: return date;
43: }
44:
45: public int getFreeK() {
46: return freeK;
47: }
48:
49: public int getTotalK() {
50: return totalK;
51: }
52:
53: }
|