.getILoggerFactory();
if (lc != null) {
for (ch.qos.logback.classic.Logger l : lc.getLoggerList()) {
- if (loggerName == null || l.getName().startsWith(loggerName)) {
+ if ((loggerName == null) || l.getName().startsWith(loggerName)) {
ci.println(retrieveLogLevel(l));
}
}
}
}
+ @SuppressWarnings("deprecation") //IGetUpdates intentionally deprecated
public void _unlisten(CommandInterpreter ci) {
if (this.icluster == null) {
ci.println("\nNo Clustering services available");
ci.println("\nNo Clustering services available");
return;
}
- String containerName = ci.nextArgument();
+ String containerName = ci.nextArgument().toLowerCase();
if (containerName == null) {
ci.println("containerName not supplied");
return;
}
public void _dumper(CommandInterpreter ci) {
- ConcurrentMap c;
- String containerName = ci.nextArgument();
+ ConcurrentMap<Object, Object> c;
+ String containerName = ci.nextArgument().toLowerCase();
if (containerName == null) {
ci.println("containerName not supplied");
return;
ci.println("Cache not supplied");
return;
}
- c = (ConcurrentMap) this.icluster.getCache(containerName, cacheName);
+ int count = 0;
+ c = (ConcurrentMap<Object, Object>) this.icluster.getCache(containerName, cacheName);
if (c != null) {
- for (Object e : c.entrySet()) {
- Map.Entry entry = (Map.Entry) e;
+ for (Map.Entry<Object, Object> e : c.entrySet()) {
+ Map.Entry<Object, Object> entry = e;
Object v = entry.getValue();
String res = "<NOT KNOWN>";
if (v != null) {
ci.println("Element " + entry.getKey() + "(hashCode="
+ entry.getKey().hashCode() + ") has value = (" + res
+ ")");
+ count++;
}
+ ci.println("Dumped " + count + " records");
} else {
ci.println("Cache " + cacheName + " on container " + containerName
+ " not existant!");
}
}
+ @SuppressWarnings("deprecation") //TODO: remove call to deprecated amIStandby
public void _getRole(CommandInterpreter ci) {
if (this.icluster == null) {
ci.println("\nNo Clustering services available");
ci.println("My role is: " + role);
}
+ @SuppressWarnings("deprecation") //TODO: remove call to deprecated getActiveAddres
public void _getActive(CommandInterpreter ci) {
if (this.icluster == null) {
ci.println("\nNo Clustering services available");
+ this.icluster.getActiveAddress());
}
+ @SuppressWarnings("deprecation") //TODO: remove use of deprecated listenRoleChange
public void _listenActive(CommandInterpreter ci) {
if (this.icluster == null) {
ci.println("\nNo Clustering services available");
ci.println("Register listenRoleChanges");
}
+ @SuppressWarnings("deprecation") //TODO: remove deprecated call to unlistenRoleChange
public void _unlistenActive(CommandInterpreter ci) {
if (this.icluster == null) {
ci.println("\nNo Clustering services available");
}
class DoListenRoleChanged implements IListenRoleChange {
+ @Override
public void newActiveAvailable() {
logger.debug("New Active is available");
}