GroupModBuilder builder = null; if (driverService == null) { builder = GroupModBuilder.builder(groupOperation.buckets(), groupOperation.groupId(), groupOperation.groupType(), sw.factory(), Optional.of(groupModXid)); } else { builder = GroupModBuilder.builder(groupOperation.buckets(), groupOperation.groupId(), groupOperation.groupType(), sw.factory(), Optional.of(groupModXid), switch (groupOperation.opType()) { case ADD: groupMod = builder.buildGroupAdd();
@Override public void groupOperationFailed(DeviceId deviceId, GroupOperation operation) { StoredGroupEntry existing = (groupEntriesById.get( deviceId) != null) ? groupEntriesById.get(deviceId).get(operation.groupId()) : null; if (existing == null) { log.warn("No group entry with ID {} found ", operation.groupId()); return; } switch (operation.opType()) { case ADD: notifyDelegate(new GroupEvent(Type.GROUP_ADD_FAILED, existing)); break; case MODIFY: notifyDelegate(new GroupEvent(Type.GROUP_UPDATE_FAILED, existing)); break; case DELETE: notifyDelegate(new GroupEvent(Type.GROUP_REMOVE_FAILED, existing)); break; default: log.warn("Unknown group operation type {}", operation.opType()); } ConcurrentMap<GroupKey, StoredGroupEntry> keyTable = getGroupKeyTable(existing.deviceId()); ConcurrentMap<GroupId, StoredGroupEntry> idTable = getGroupIdTable(existing.deviceId()); idTable.remove(existing.id()); keyTable.remove(existing.appCookie()); }
group.id(), group.deviceId()); GroupOperation groupAddOp = GroupOperation. createAddGroupOperation(group.id(), group.type(), group.buckets()); group.id(), group.deviceId()); GroupOperation groupModifyOp = GroupOperation. createModifyGroupOperation(group.id(), group.type(), group.buckets()); group.id(), group.deviceId()); GroupOperation groupDeleteOp = GroupOperation. createDeleteGroupOperation(group.id(), group.type()); groupOps = new GroupOperations(
GroupMsgErrorCode.values()[(code.ordinal())]; GroupOperation failedOperation = GroupOperation .createFailedGroupOperation(operation, failureCode); log.warn("Received a group mod error {}", msg); providerService.groupOperationFailed(deviceId,