com.alachisoft.ncache.jsr107.NCacheManagementMXBean Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ncache-professional-client Show documentation
Show all versions of ncache-professional-client Show documentation
NCache Professional client for java.
package com.alachisoft.ncache.jsr107;
import javax.cache.configuration.CompleteConfiguration;
import javax.cache.management.CacheMXBean;
public class NCacheManagementMXBean extends NCacheMXBean implements CacheMXBean {
/**
* @param jCache
*/
public NCacheManagementMXBean(final NCacheCache jCache) {
super(jCache, "Configuration");
}
/**
* Determines the required type of keys for this Cache, if any.
*
* @return
*/
@Override
public String getKeyType() {
//throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
return jCache.getConfiguration(CompleteConfiguration.class).getKeyType().getName();
}
/**
* Determines the required type of values for this Cache, if any.
*
* @return
*/
@Override
public String getValueType() {
//throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
return jCache.getConfiguration(CompleteConfiguration.class).getValueType().getName();
}
/**
* Determines if a Cache should operate in read-through mode.
*
* @return
*/
@Override
public boolean isReadThrough() {
//throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
return ((CompleteConfiguration) jCache.getConfiguration(CompleteConfiguration.class)).isReadThrough();
}
/**
* Determines if a Cache should operate in "write-through" mode.
*
* @return
*/
@Override
public boolean isWriteThrough() {
//throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
return ((CompleteConfiguration) jCache.getConfiguration(CompleteConfiguration.class)).isWriteThrough();
}
/**
* Whether storeByValue (true) or storeByReference (false). When true, both keys and values are stored by value.
*
* @return
*/
@Override
public boolean isStoreByValue() {
//throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
return jCache.getConfiguration(CompleteConfiguration.class).isStoreByValue();
}
/**
* Checks whether statistics collection is enabled in this cache.
*
* @return
*/
@Override
public boolean isStatisticsEnabled() {
//throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
return ((CompleteConfiguration) jCache.getConfiguration(CompleteConfiguration.class)).isStatisticsEnabled();
}
/**
* Checks whether management is enabled on this cache.
*
* @return
*/
@Override
public boolean isManagementEnabled() {
//throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
return ((CompleteConfiguration) jCache.getConfiguration(CompleteConfiguration.class)).isManagementEnabled();
}
}