avail.setBaseline(true),
new NumberColumn("AvailableCount","Active Count").setComparisonColumn(avail),
new NumberColumn("MaxUsedCount","Max Used").setComparisonColumn(avail)
};
poolSampler = new PlainColumnView(title, addressCallback)
.setColumns(cols)
.setWidth(100, Style.Unit.PCT);
// ----
DefaultPager pager = new DefaultPager();
pager.setDisplay(table);
VerticalPanel tablePanel = new VerticalPanel();
tablePanel.setStyleName("fill-layout-width");
tablePanel.add(table);
tablePanel.add(pager);
// ----
String title2 = "Pool Usage";
final HelpSystem.AddressCallback addressCallback2 = new HelpSystem.AddressCallback() {
@Override
public ModelNode getAddress() {
ModelNode address = new ModelNode();
address.get(ModelDescriptionConstants.ADDRESS).set(RuntimeBaseAddress.get());
address.get(ModelDescriptionConstants.ADDRESS).add("subsystem", "datasources");
address.get(ModelDescriptionConstants.ADDRESS).add(subaddress, getCurrentSelection().getName());
address.get(ModelDescriptionConstants.ADDRESS).add("statistics", "jdbc");
System.out.println(address);
return address;
}
};
// ----
NumberColumn avail2 = new NumberColumn("PreparedStatementCacheCurrentSize", "Current Size");
Column[] cols2 = new Column[] {
avail2.setBaseline(true),
new NumberColumn("PreparedStatementCacheHitCount","Hit Count").setComparisonColumn(avail),
new NumberColumn("PreparedStatementCacheMissCount","Miss Used").setComparisonColumn(avail)
};
cacheSampler = new PlainColumnView(title2, addressCallback2)
.setColumns(cols2)
.setWidth(100, Style.Unit.PCT);
OneToOneLayout layout = new OneToOneLayout()