public String toString() { stringBuf.setLength(0); stringBuf.append(tab); stringBuf.append(tab); stringBuf.append("LoadFilter:"); stringBuf.append(eol); stringBuf.append(tab); stringBuf.append(tab); stringBuf.append(tab); stringBuf.append("OpenLimit: "); stringBuf.append(openLimit()); stringBuf.append(eol); stringBuf.append(tab); stringBuf.append(tab); stringBuf.append(tab); stringBuf.append("OpenWindow: "); stringBuf.append(openWindow()); stringBuf.append(eol); stringBuf.append(tab); stringBuf.append(tab); stringBuf.append(tab); stringBuf.append("LoadFactor: "); stringBuf.append(loadFactor()); stringBuf.append(eol); return stringBuf.toString(); }
_service.load().openLimit(_openLimit);
_service.load().openLimit(OPEN_LIMIT);
assertFalse(serviceByIdAfterUpdate.state().acceptingRequests() == serviceByIdBeforeUpdate.state().acceptingRequests()); assertFalse(serviceByIdAfterUpdate.state().serviceState() == serviceByIdBeforeUpdate.state().serviceState()); assertFalse(serviceByIdAfterUpdate.load().openLimit() == serviceByIdBeforeUpdate.load().openLimit()); assertFalse(serviceByIdAfterUpdate.info().capabilitiesList().size() == serviceByIdBeforeUpdate.info().capabilitiesList().size());
_service.load().openLimit(OPEN_LIMIT);
_service.load().openLimit(OPEN_LIMIT);
service.load().openLimit(OPEN_LIMIT);
openLimit(tmpUInt.toLong());
rdmServiceLoad.openLimit(openLimit); rdmServiceLoad.applyHasOpenLimit();
element.name(ElementNames.OPEN_LIMIT); element.dataType(DataTypes.UINT); tmpUInt.value(openLimit()); ret = element.encode(encIter, tmpUInt); if (ret != CodecReturnCodes.SUCCESS)
rdmServiceLoad.openLimit(openLimit); rdmServiceLoad.applyHasOpenLimit();
/** * Performs a deep copy of {@link ServiceLoad} object. * * @param destServiceLoad ServiceLoad object to copy this object into. It cannot be null. * * @return UPA return value indicating success or failure of copy operation. */ public int copy(ServiceLoad destServiceLoad) { assert (destServiceLoad != null) : "destServiceLoad can not be null"; destServiceLoad.clear(); if (checkHasLoadFactor()) { destServiceLoad.applyHasLoadFactor(); destServiceLoad.loadFactor(loadFactor()); } if (checkHasOpenLimit()) { destServiceLoad.applyHasOpenLimit(); destServiceLoad.openLimit(openLimit()); } if (checkHasOpenWindow()) { destServiceLoad.applyHasOpenWindow(); destServiceLoad.openWindow(openWindow()); } destServiceLoad.action(action()); return CodecReturnCodes.SUCCESS; }
/** * Performs an update of {@link ServiceLoad} object. * * @param destServiceLoad ServiceLoad object to update with information from this object. It cannot be null. * * @return UPA return value indicating success or failure of update operation. */ public int update(ServiceLoad destServiceLoad) { assert (destServiceLoad != null) : "destServiceLoad can not be null"; if (checkHasLoadFactor()) { destServiceLoad.applyHasLoadFactor(); destServiceLoad.loadFactor(loadFactor()); } if (checkHasOpenLimit()) { destServiceLoad.applyHasOpenLimit(); destServiceLoad.openLimit(openLimit()); } if (checkHasOpenWindow()) { destServiceLoad.applyHasOpenWindow(); destServiceLoad.openWindow(openWindow()); } destServiceLoad.action(action()); return CodecReturnCodes.SUCCESS; }
private void buildRDMServiceLoad(Service.ServiceLoad rdmServiceLoad, int action) { int flags = Service.ServiceLoadFlags.HAS_LOAD_FACTOR | Service.ServiceLoadFlags.HAS_OPEN_LIMIT | Service.ServiceLoadFlags.HAS_OPEN_WINDOW; long loadFactor = 1; long openLimit = 1; long openWindow = 1; rdmServiceLoad.clear(); rdmServiceLoad.flags(flags); rdmServiceLoad.action(action); if (rdmServiceLoad.checkHasOpenLimit()) { rdmServiceLoad.openLimit(openLimit); rdmServiceLoad.applyHasOpenLimit(); } if (rdmServiceLoad.checkHasOpenWindow()) { rdmServiceLoad.openWindow(openWindow); rdmServiceLoad.applyHasOpenWindow(); } if (rdmServiceLoad.checkHasLoadFactor()) { rdmServiceLoad.loadFactor(loadFactor); rdmServiceLoad.applyHasLoadFactor(); } }
private void copyServiceLoadRefFrom(ServiceLoad srcLoad) { assert (srcLoad != null) : "srcLoad can not be null"; load().action(srcLoad.action()); if (srcLoad.checkHasLoadFactor()) { load().applyHasLoadFactor(); load().loadFactor(srcLoad.loadFactor()); } if (srcLoad.checkHasOpenLimit()) { load().applyHasOpenLimit(); load().openLimit(srcLoad.openLimit()); } if (srcLoad.checkHasOpenWindow()) { load().applyHasOpenWindow(); load().openWindow(srcLoad.openWindow()); } }
private void verifyServiceLoad(Service.ServiceLoad rdmServiceLoad, Service.ServiceLoad rdmServiceLoadDec) { if (rdmServiceLoadDec.checkHasLoadFactor()) assertEquals(rdmServiceLoad.loadFactor(), rdmServiceLoadDec.loadFactor()); if (rdmServiceLoadDec.checkHasOpenLimit()) assertEquals(rdmServiceLoad.openLimit(), rdmServiceLoadDec.openLimit()); if (rdmServiceLoadDec.checkHasOpenWindow()) assertEquals(rdmServiceLoad.openWindow(), rdmServiceLoadDec.openWindow()); }