View Javadoc

1   package org.sourceforge.jemm.database.persistent.berkeley.proxy;
2   
3   import com.sleepycat.persist.model.Entity;
4   import com.sleepycat.persist.model.PrimaryKey;
5   
6   import org.sourceforge.jemm.database.components.GCStatus;
7   import org.sourceforge.jemm.database.components.types.GCInfo;
8   import org.sourceforge.jemm.types.ID;
9   
10  @Entity()
11  public class GCInfoProxy {
12  	@PrimaryKey
13  	long id;
14  	GCStatus gcStatus;
15  	int rootCount;
16  	int clientRefCount;
17  
18  	public GCInfoProxy() {}
19  	
20  	public GCInfoProxy(ID id,GCStatus gcStatus,int rootCount,int clientRefCount) {
21  		this.id = id.getIDValue();
22  		this.gcStatus = gcStatus;
23  		this.rootCount = rootCount;
24  		this.clientRefCount = clientRefCount;
25  	}
26  
27  	public GCInfoProxy(GCInfo gcInfo) {
28  		this(gcInfo.getId(),gcInfo.getGCStatus(),gcInfo.getRootCount(),gcInfo.getClientRefCount());
29  	}
30  
31  	public GCInfo getGCInfo() {
32  		return new GCInfo(new ID(id),gcStatus,rootCount,clientRefCount);
33  	}
34  }