32 |
32 |
import org.eclipse.swt.widgets.Text;
|
33 |
33 |
import org.eclipse.wb.swt.SWTResourceManager;
|
34 |
34 |
|
35 |
|
import eu.etaxonomy.cdm.api.cache.CdmCacherBase;
|
|
35 |
import eu.etaxonomy.cdm.api.cache.CdmPermanentCacheBase;
|
36 |
36 |
import eu.etaxonomy.cdm.cache.CdmRemoteCacheManager;
|
37 |
37 |
import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
|
38 |
38 |
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager;
|
... | ... | |
58 |
58 |
private final ICdmEntitySessionManager cdmEntitySessionManager;
|
59 |
59 |
private Text txtNoOfSessions;
|
60 |
60 |
private Text txtNoOfCaches;
|
61 |
|
private Text txtDefaultInMemory;
|
|
61 |
private Text txtPermanentInMemory;
|
62 |
62 |
private Text txtCdmModelInMemory;
|
63 |
63 |
private Text txtCdmModelOnDisk;
|
64 |
|
private Text txtDefaultOnDisk;
|
|
64 |
private Text txtPermanentOnDisk;
|
65 |
65 |
|
66 |
66 |
@Inject
|
67 |
67 |
private ECommandService commandService;
|
... | ... | |
81 |
81 |
* Create contents of the view part.
|
82 |
82 |
* @param parent
|
83 |
83 |
*/
|
|
84 |
@SuppressWarnings("unused")
|
84 |
85 |
@PostConstruct
|
85 |
86 |
public void createPartControl(Composite parent) {
|
86 |
87 |
Composite container = new Composite(parent, SWT.NONE);
|
... | ... | |
127 |
128 |
new Label(container, SWT.NONE);
|
128 |
129 |
|
129 |
130 |
{
|
130 |
|
Label lblDefaultCache = new Label(container, SWT.CENTER);
|
131 |
|
lblDefaultCache.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
|
132 |
|
lblDefaultCache.setText("Default Cache, ");
|
133 |
|
lblDefaultCache.setFont(SWTResourceManager.getFont("Ubuntu", 10, SWT.NORMAL));
|
134 |
|
lblDefaultCache.setAlignment(SWT.RIGHT);
|
|
131 |
Label lblPermanentCache = new Label(container, SWT.CENTER);
|
|
132 |
lblPermanentCache.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
|
|
133 |
lblPermanentCache.setText("Permanent Cache, ");
|
|
134 |
lblPermanentCache.setFont(SWTResourceManager.getFont("Ubuntu", 10, SWT.NORMAL));
|
|
135 |
lblPermanentCache.setAlignment(SWT.RIGHT);
|
135 |
136 |
}
|
136 |
137 |
{
|
137 |
|
Label lblDefaultInMemory = new Label(container, SWT.CENTER);
|
138 |
|
lblDefaultInMemory.setText("in Memory : ");
|
139 |
|
lblDefaultInMemory.setFont(SWTResourceManager.getFont("Ubuntu", 10, SWT.NORMAL));
|
140 |
|
lblDefaultInMemory.setAlignment(SWT.RIGHT);
|
141 |
|
lblDefaultInMemory.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
|
|
138 |
Label lblPermanentInMemory = new Label(container, SWT.CENTER);
|
|
139 |
lblPermanentInMemory.setText("in Memory : ");
|
|
140 |
lblPermanentInMemory.setFont(SWTResourceManager.getFont("Ubuntu", 10, SWT.NORMAL));
|
|
141 |
lblPermanentInMemory.setAlignment(SWT.RIGHT);
|
|
142 |
lblPermanentInMemory.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
|
142 |
143 |
}
|
143 |
144 |
{
|
144 |
|
txtDefaultInMemory = new Text(container, SWT.BORDER);
|
145 |
|
txtDefaultInMemory.setEditable(false);
|
146 |
|
GridData gd_txtDefaultInMemory = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
|
147 |
|
gd_txtDefaultInMemory.widthHint = 130;
|
148 |
|
txtDefaultInMemory.setLayoutData(gd_txtDefaultInMemory);
|
|
145 |
txtPermanentInMemory = new Text(container, SWT.BORDER);
|
|
146 |
txtPermanentInMemory.setEditable(false);
|
|
147 |
GridData gd_txtPermanentInMemory = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
|
|
148 |
gd_txtPermanentInMemory.widthHint = 130;
|
|
149 |
txtPermanentInMemory.setLayoutData(gd_txtPermanentInMemory);
|
149 |
150 |
}
|
150 |
151 |
{
|
151 |
|
Label lblDefaultOnDisk = new Label(container, SWT.CENTER);
|
152 |
|
lblDefaultOnDisk.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
|
153 |
|
lblDefaultOnDisk.setText("on Disk : ");
|
154 |
|
lblDefaultOnDisk.setFont(SWTResourceManager.getFont("Ubuntu", 10, SWT.NORMAL));
|
155 |
|
lblDefaultOnDisk.setAlignment(SWT.RIGHT);
|
|
152 |
Label lblPermanentOnDisk = new Label(container, SWT.CENTER);
|
|
153 |
lblPermanentOnDisk.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
|
|
154 |
lblPermanentOnDisk.setText("on Disk : ");
|
|
155 |
lblPermanentOnDisk.setFont(SWTResourceManager.getFont("Ubuntu", 10, SWT.NORMAL));
|
|
156 |
lblPermanentOnDisk.setAlignment(SWT.RIGHT);
|
156 |
157 |
}
|
157 |
158 |
{
|
158 |
|
txtDefaultOnDisk = new Text(container, SWT.BORDER);
|
159 |
|
txtDefaultOnDisk.setEditable(false);
|
160 |
|
txtDefaultOnDisk.setText("");
|
161 |
|
GridData gd_txtDefaultOnDisk = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
|
162 |
|
gd_txtDefaultOnDisk.widthHint = 130;
|
163 |
|
txtDefaultOnDisk.setLayoutData(gd_txtDefaultOnDisk);
|
|
159 |
txtPermanentOnDisk = new Text(container, SWT.BORDER);
|
|
160 |
txtPermanentOnDisk.setEditable(false);
|
|
161 |
txtPermanentOnDisk.setText("");
|
|
162 |
GridData gd_txtPermanentOnDisk = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
|
|
163 |
gd_txtPermanentOnDisk.widthHint = 130;
|
|
164 |
txtPermanentOnDisk.setLayoutData(gd_txtPermanentOnDisk);
|
164 |
165 |
}
|
165 |
166 |
{
|
166 |
167 |
Label lblCdmModelCache = new Label(container, SWT.CENTER);
|
... | ... | |
278 |
279 |
int cdmEnityCacheSize = CacheManager.create().getCacheNames().length;
|
279 |
280 |
txtNoOfCaches.setText(String.valueOf(cdmEnityCacheSize));
|
280 |
281 |
|
281 |
|
Cache defaultCache = CacheManager.create().getCache(CdmCacherBase.DEFAULT_CACHE_NAME);
|
282 |
|
txtDefaultInMemory.setText("");
|
283 |
|
txtDefaultOnDisk.setText("");
|
284 |
|
if(defaultCache != null) {
|
285 |
|
FlatStatistics liveCacheStatistics = defaultCache.getStatistics();
|
286 |
|
txtDefaultInMemory.setText(getInMemoryStats(liveCacheStatistics));
|
287 |
|
txtDefaultOnDisk.setText(getOnDiskStats(liveCacheStatistics));
|
|
282 |
Cache permanentCache = CacheManager.create().getCache(CdmPermanentCacheBase.PERMANENT_CACHE_NAME);
|
|
283 |
txtPermanentInMemory.setText("");
|
|
284 |
txtPermanentOnDisk.setText("");
|
|
285 |
if(permanentCache != null) {
|
|
286 |
FlatStatistics liveCacheStatistics = permanentCache.getStatistics();
|
|
287 |
txtPermanentInMemory.setText(getInMemoryStats(liveCacheStatistics));
|
|
288 |
txtPermanentOnDisk.setText(getOnDiskStats(liveCacheStatistics));
|
288 |
289 |
}
|
289 |
290 |
|
290 |
291 |
Cache cdmModelGetMethodsCache = instance.getCdmModelGetMethodsCache();
|
ref #10214 rename CdmCacheBase to CdmPermanentCacheBase in TaxEditor