public boolean isHostnameBasedDatastore() {
   try {
     return _datastore.getClass().getDeclaredMethod("getHostname") != null;
   } catch (Exception e) {
     logger.debug("Failed to get method 'getHostname'", e);
     return false;
   }
 }
 public String getHostname() {
   try {
     Method hostnameMethod = _datastore.getClass().getDeclaredMethod("getHostname");
     if (hostnameMethod != null) {
       hostnameMethod.setAccessible(true);
       Object result = hostnameMethod.invoke(_datastore);
       if (result != null && result instanceof String) {
         return (String) result;
       }
     }
     return null;
   } catch (Exception e) {
     logger.debug("Failed to invoke method 'getHostname'", e);
     return null;
   }
 }
 public String getSimpleClassName() {
   return _datastore.getClass().getSimpleName();
 }