@Override public void bind(String path, ServiceRecord record, int flags) throws IOException { Preconditions.checkArgument(record != null, "null record"); validatePath(path); // validate the record before putting it RegistryTypeUtils.validateServiceRecord(path, record); if (LOG.isDebugEnabled()) { LOG.debug("Bound at {} : ServiceRecord = {}", path, record); } CreateMode mode = CreateMode.PERSISTENT; byte[] bytes = serviceRecordMarshal.toBytes(record); zkSet(path, mode, bytes, getClientAcls(), ((flags & BindFlags.OVERWRITE) != 0)); }
@Override public void bind(String path, ServiceRecord record, int flags) throws IOException { Preconditions.checkArgument(record != null, "null record"); validatePath(path); // validate the record before putting it RegistryTypeUtils.validateServiceRecord(path, record); LOG.info("Bound at {} : {}", path, record); CreateMode mode = CreateMode.PERSISTENT; byte[] bytes = serviceRecordMarshal.toBytes(record); zkSet(path, mode, bytes, getClientAcls(), ((flags & BindFlags.OVERWRITE) != 0)); }