public void init(RpbGetBucketResp resp) {
if (resp.hasProps()) {
RpbBucketProps props = resp.getProps();
if (props.hasAllowMult()) {
allowMult = Boolean.valueOf(props.getAllowMult());
}
if (props.hasNVal()) {
nValue = new Integer(props.getNVal());
}
if (props.hasLastWriteWins()) {
lastWriteWins = props.getLastWriteWins();
}
if (props.hasHasPrecommit()) {
precommitHooks = parseHooks(props.getPrecommitList());
}
if (props.hasHasPostcommit()) {
postcommitHooks = parseHooks(props.getPostcommitList());
}
if (props.hasChashKeyfun()) {
cHashFun = new ModuleFunction(props.getChashKeyfun().getModule().toStringUtf8(),
props.getChashKeyfun().getFunction().toStringUtf8());
}
if (props.hasLinkfun()) {
linkFun = new ModuleFunction(props.getLinkfun().getModule().toStringUtf8(),
props.getLinkfun().getFunction().toStringUtf8());
}
if (props.hasPr()) {
pr = props.getPr();
}
if (props.hasR()) {
r = props.getR();
}
if (props.hasW()) {
w = props.getW();
}
if (props.hasPw()) {
pw = props.getPw();
}
if (props.hasDw()) {
dw = props.getDw();
}
if (props.hasRw()) {
rw = props.getRw();
}
if (props.hasBasicQuorum()) {
basicQuorum = props.getBasicQuorum();
}
if (props.hasNotfoundOk()) {
notFoundOk = props.getNotfoundOk();
}
if (props.hasSearch()) {
searchEnabled = props.getSearch();
}
if (props.hasBackend()) {
backend = props.getBackend().toStringUtf8();
}
if (props.hasYoungVclock()) {
youngVClock = getUnsignedIntValue(props.getYoungVclock());
}
if (props.hasOldVclock()) {
oldVClock = getUnsignedIntValue(props.getOldVclock());
}
if (props.hasBigVclock()) {
bigVClock = props.getBigVclock();
}
if (props.hasSmallVclock()) {
smallVClock = props.getSmallVclock();
}
}
}