summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
3259e8d)
Change-Id: I8cfe05dacbdc3a6e7875a0661b9e1cdb5a18f67e
Signed-off-by: Colin Dixon <ckd@us.ibm.com>
.getLogger(ClusterManager.class);
private DefaultCacheManager cm;
GossipRouter gossiper;
.getLogger(ClusterManager.class);
private DefaultCacheManager cm;
GossipRouter gossiper;
- private HashSet roleChangeListeners;
+ private HashSet<IListenRoleChange> roleChangeListeners;
private ViewChangedListener cacheManagerListener;
private static String loopbackAddress = "127.0.0.1";
private ViewChangedListener cacheManagerListener;
private static String loopbackAddress = "127.0.0.1";
if (supernodes.hasMoreTokens()) {
// Populate the list of my addresses
try {
if (supernodes.hasMoreTokens()) {
// Populate the list of my addresses
try {
- Enumeration e = NetworkInterface.getNetworkInterfaces();
+ Enumeration<NetworkInterface> e = NetworkInterface.getNetworkInterfaces();
while (e.hasMoreElements()) {
NetworkInterface n = (NetworkInterface) e.nextElement();
while (e.hasMoreElements()) {
NetworkInterface n = (NetworkInterface) e.nextElement();
- Enumeration ee = n.getInetAddresses();
+ Enumeration<InetAddress> ee = n.getInetAddresses();
while (ee.hasMoreElements()) {
InetAddress i = (InetAddress) ee.nextElement();
myAddresses.add(i);
while (ee.hasMoreElements()) {
InetAddress i = (InetAddress) ee.nextElement();
myAddresses.add(i);
String cacheName, Set<cacheMode> cMode) throws CacheExistException,
CacheConfigException {
EmbeddedCacheManager manager = this.cm;
String cacheName, Set<cacheMode> cMode) throws CacheExistException,
CacheConfigException {
EmbeddedCacheManager manager = this.cm;
+ Cache<Object,Object> c;
String realCacheName = "{" + containerName + "}_{" + cacheName + "}";
if (manager == null) {
return null;
String realCacheName = "{" + containerName + "}_{" + cacheName + "}";
if (manager == null) {
return null;
@Override
public ConcurrentMap<?, ?> getCache(String containerName, String cacheName) {
EmbeddedCacheManager manager = this.cm;
@Override
public ConcurrentMap<?, ?> getCache(String containerName, String cacheName) {
EmbeddedCacheManager manager = this.cm;
+ Cache<Object,Object> c;
String realCacheName = "{" + containerName + "}_{" + cacheName + "}";
if (manager == null) {
return null;
String realCacheName = "{" + containerName + "}_{" + cacheName + "}";
if (manager == null) {
return null;
@Override
public Set<String> getCacheList(String containerName) {
@Override
public Set<String> getCacheList(String containerName) {
- Set<String> perContainerCaches = new HashSet();
+ Set<String> perContainerCaches = new HashSet<String>();
EmbeddedCacheManager manager = this.cm;
if (manager == null) {
return null;
EmbeddedCacheManager manager = this.cm;
if (manager == null) {
return null;
public void addListener(String containerName, String cacheName,
IGetUpdates<?, ?> u) throws CacheListenerAddException {
EmbeddedCacheManager manager = this.cm;
public void addListener(String containerName, String cacheName,
IGetUpdates<?, ?> u) throws CacheListenerAddException {
EmbeddedCacheManager manager = this.cm;
+ Cache<Object,Object> c;
String realCacheName = "{" + containerName + "}_{" + cacheName + "}";
if (manager == null) {
return;
String realCacheName = "{" + containerName + "}_{" + cacheName + "}";
if (manager == null) {
return;
public Set<IGetUpdates<?, ?>> getListeners(String containerName,
String cacheName) {
EmbeddedCacheManager manager = this.cm;
public Set<IGetUpdates<?, ?>> getListeners(String containerName,
String cacheName) {
EmbeddedCacheManager manager = this.cm;
+ Cache<Object,Object> c;
String realCacheName = "{" + containerName + "}_{" + cacheName + "}";
if (manager == null) {
return null;
String realCacheName = "{" + containerName + "}_{" + cacheName + "}";
if (manager == null) {
return null;
}
c = manager.getCache(realCacheName);
}
c = manager.getCache(realCacheName);
- Set<IGetUpdates<?, ?>> res = new HashSet();
+ Set<IGetUpdates<?, ?>> res = new HashSet<IGetUpdates<?, ?>>();
Set<Object> listeners = c.getListeners();
for (Object listener : listeners) {
if (listener instanceof CacheListenerContainer) {
Set<Object> listeners = c.getListeners();
for (Object listener : listeners) {
if (listener instanceof CacheListenerContainer) {
public void removeListener(String containerName, String cacheName,
IGetUpdates<?, ?> u) {
EmbeddedCacheManager manager = this.cm;
public void removeListener(String containerName, String cacheName,
IGetUpdates<?, ?> u) {
EmbeddedCacheManager manager = this.cm;
+ Cache<Object,Object> c;
String realCacheName = "{" + containerName + "}_{" + cacheName + "}";
if (manager == null) {
return;
String realCacheName = "{" + containerName + "}_{" + cacheName + "}";
if (manager == null) {
return;
EmbeddedCacheManager manager = this.cm;
if (manager == null) {
// In case we cannot fetch the information, lets assume we
EmbeddedCacheManager manager = this.cm;
if (manager == null) {
// In case we cannot fetch the information, lets assume we
- // are standby, so to have less responsability.
+ // are standby, so to have less responsibility.
return true;
}
return (!manager.isCoordinator());
return true;
}
return (!manager.isCoordinator());
EmbeddedCacheManager manager = this.cm;
if ((manager == null) || (a == null)) {
// In case we cannot fetch the information, lets assume we
EmbeddedCacheManager manager = this.cm;
if ((manager == null) || (a == null)) {
// In case we cannot fetch the information, lets assume we
- // are standby, so to have less responsability.
+ // are standby, so to have less responsibility.
return null;
}
Transport t = manager.getTransport();
return null;
}
Transport t = manager.getTransport();
EmbeddedCacheManager manager = this.cm;
if (manager == null) {
// In case we cannot fetch the information, lets assume we
EmbeddedCacheManager manager = this.cm;
if (manager == null) {
// In case we cannot fetch the information, lets assume we
- // are standby, so to have less responsability.
+ // are standby, so to have less responsibility.
EmbeddedCacheManager manager = this.cm;
if (manager == null) {
// In case we cannot fetch the information, lets assume we
EmbeddedCacheManager manager = this.cm;
if (manager == null) {
// In case we cannot fetch the information, lets assume we
- // are standby, so to have less responsability.
+ // are standby, so to have less responsibility.
throw new ListenRoleChangeAddException();
}
if (this.roleChangeListeners == null) {
throw new ListenRoleChangeAddException();
}
if (this.roleChangeListeners == null) {
- this.roleChangeListeners = new HashSet();
+ this.roleChangeListeners = new HashSet<IListenRoleChange>();
this.cacheManagerListener = new ViewChangedListener(
this.roleChangeListeners);
manager.addListener(this.cacheManagerListener);
this.cacheManagerListener = new ViewChangedListener(
this.roleChangeListeners);
manager.addListener(this.cacheManagerListener);
EmbeddedCacheManager manager = this.cm;
if (manager == null) {
// In case we cannot fetch the information, lets assume we
EmbeddedCacheManager manager = this.cm;
if (manager == null) {
// In case we cannot fetch the information, lets assume we
- // are standby, so to have less responsability.
+ // are standby, so to have less responsibility.