@Override
public void writeResponse(ManagementCenterService mcs, ObjectDataOutput dos) throws Exception {
IMap map = mcs.getHazelcastInstance().getMap(mapName);
EntryView entry = null;
if (type.equals("string")) {
entry = map.getEntryView(key);
} else if (type.equals("long")) {
entry = map.getEntryView(Long.valueOf(key));
} else if (type.equals("integer")) {
entry = map.getEntryView(Integer.valueOf(key));
}
TreeMap<String, String> result = new TreeMap<String, String>();
if (entry == null) {
result.put("No Value Found!", " ");
} else {
Object value = entry.getValue();
result.put("browse_value", value != null ? value.toString() : "null");
result.put("browse_class", value != null ? value.getClass().getName() : "null");
result.put("memory_cost", Long.toString(entry.getCost()));
result.put("date_creation_time", Long.toString(entry.getCreationTime()));
result.put("date_expiration_time", Long.toString(entry.getExpirationTime()));
result.put("browse_hits", Long.toString(entry.getHits()));
result.put("date_access_time", Long.toString(entry.getLastAccessTime()));
result.put("date_update_time", Long.toString(entry.getLastUpdateTime()));
result.put("browse_version", Long.toString(entry.getVersion()));
}
dos.writeInt(result.size());
for (Map.Entry<String,String> propertyEntry : result.entrySet()) {