Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
[BZ 1108095] fix compiler errors
Browse files Browse the repository at this point in the history
  • Loading branch information
John Sanda committed Sep 26, 2014
1 parent e893216 commit 6958d62
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
Expand Up @@ -179,7 +179,6 @@ public synchronized boolean init() {
session = new StorageSession(wrappedSession);

storageClusterMonitor = new StorageClusterMonitor(session);
storageClusterMonitor.updateRequestLimit();
session.addStorageStateListener(storageClusterMonitor);

metricsConfiguration = new MetricsConfiguration();
Expand Down
@@ -1,15 +1,12 @@
package org.rhq.enterprise.server.storage;

import static org.rhq.server.metrics.StorageClientConstants.REQUEST_LIMIT;

import java.net.InetAddress;

import com.datastax.driver.core.exceptions.NoHostAvailableException;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.rhq.enterprise.server.util.LookupUtil;
import org.rhq.server.metrics.StorageSession;
import org.rhq.server.metrics.StorageStateListener;

Expand All @@ -36,19 +33,16 @@ public boolean isClusterAvailable() {
public void onStorageNodeUp(InetAddress address) {
log.info("Storage node at " + address.getHostAddress() + " is up");
isClusterAvailable = true;
updateRequestLimit();
}

@Override
public void onStorageNodeDown(InetAddress address) {
log.info("Storage node at " + address.getHostAddress() + " is down");
updateRequestLimit();
}

@Override
public void onStorageNodeRemoved(InetAddress address) {
log.info("Storage node at " + address.getHostAddress() + " has been removed from the cluster");
updateRequestLimit();
}

@Override
Expand All @@ -65,12 +59,7 @@ public void onStorageClusterDown(NoHostAvailableException e) {

@Override
public void onClientTimeout(NoHostAvailableException e) {
updateRequestLimit();
}

public void updateRequestLimit() {
StorageClientManager storageClientManager = LookupUtil.getStorageClientManager();
storageClientManager.persistStorageProperty(REQUEST_LIMIT, Double.toString(session.getRequestLimit()));
}

}

0 comments on commit 6958d62

Please sign in to comment.