use of info.xiancloud.core.message.UnitResponse in project xian by happyyangyuan.
the class MonitorTest method main.
public static void main(String[] args) {
UnitResponse unitResponseObject = Xian.call("diyMonitor", "jedisMonitor", new HashMap());
System.out.println(unitResponseObject);
}
use of info.xiancloud.core.message.UnitResponse in project xian by happyyangyuan.
the class CacheListUtil method remove.
public static boolean remove(CacheConfigBean cacheConfigBean, String cacheKey, Object value) {
UnitResponse unitResponseObject = SyncXian.call(CacheService.CACHE_SERVICE, "cacheListRemove", new JSONObject() {
{
put("cacheConfig", cacheConfigBean);
put("key", cacheKey);
put("valueObj", value);
}
});
unitResponseObject.throwExceptionIfNotSuccess();
long result = (long) unitResponseObject.getData();
if (result > 0)
return true;
else
return false;
}
use of info.xiancloud.core.message.UnitResponse in project xian by happyyangyuan.
the class CacheListUtil method set.
public static boolean set(CacheConfigBean cacheConfigBean, String cacheKey, int index, Object value) {
UnitResponse unitResponseObject = SyncXian.call(CacheService.CACHE_SERVICE, "cacheListSet", new JSONObject() {
{
put("cacheConfig", cacheConfigBean);
put("key", cacheKey);
put("index", index);
put("valueObj", value);
}
});
unitResponseObject.throwExceptionIfNotSuccess();
return unitResponseObject.succeeded();
}
use of info.xiancloud.core.message.UnitResponse in project xian by happyyangyuan.
the class CacheListUtil method clear.
public static boolean clear(CacheConfigBean cacheConfigBean, String cacheKey) {
UnitResponse unitResponseObject = SyncXian.call(CacheService.CACHE_SERVICE, "cacheListClear", new JSONObject() {
{
put("cacheConfig", cacheConfigBean);
put("key", cacheKey);
}
});
unitResponseObject.throwExceptionIfNotSuccess();
return unitResponseObject.succeeded();
}
use of info.xiancloud.core.message.UnitResponse in project xian by happyyangyuan.
the class CacheListUtil method add.
/**
* 尾部追加
*
* @param cacheConfigBean cacheConfigBean
* @param cacheKey cacheKey
* @param value value
* @return true on success, false on faulure.
*/
public static boolean add(CacheConfigBean cacheConfigBean, String cacheKey, Object value) {
UnitResponse unitResponseObject = SyncXian.call(CacheService.CACHE_SERVICE, "cacheListAdd", new JSONObject() {
{
put("cacheConfig", cacheConfigBean);
put("key", cacheKey);
put("valueObj", value);
}
});
unitResponseObject.throwExceptionIfNotSuccess();
return unitResponseObject.succeeded();
}
Aggregations