KickJava   Java API By Example, From Geeks To Geeks.

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


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 import java.util.Date JavaDoc;
16
17 /**
18  * Info on the status of a JdoGeniePersistenceManagerFactory.
19  * @see com.versant.core.jdo.VersantPersistenceManagerFactory#getPmfStatus
20  */

21 public class PmfStatus implements Serializable JavaDoc {
22
23     private String JavaDoc server;
24     private Date JavaDoc date;
25     private int freeK;
26     private int totalK;
27
28     public PmfStatus() {
29         date = new Date JavaDoc();
30         freeK = (int)(Runtime.getRuntime().freeMemory() >> 10);
31         totalK = (int)(Runtime.getRuntime().totalMemory() >> 10);
32     }
33
34     public String JavaDoc getServer() {
35         return server;
36     }
37
38     public void setServer(String JavaDoc server) {
39         this.server = server;
40     }
41
42     public Date JavaDoc getDate() {
43         return date;
44     }
45
46     public int getFreeK() {
47         return freeK;
48     }
49
50     public int getTotalK() {
51         return totalK;
52     }
53
54 }
55
Popular Tags