public static Codec<BulkCommand> getCommandCodec() { return Framework.getService(CodecService.class).getCodec(DEFAULT_CODEC, BulkCommand.class); }
public static Codec<BulkBucket> getBucketCodec() { return Framework.getService(CodecService.class).getCodec(DEFAULT_CODEC, BulkBucket.class); }
public static Codec<DataBucket> getDataBucketCodec() { return Framework.getService(CodecService.class).getCodec(DEFAULT_CODEC, DataBucket.class); } }
public static Codec<BulkStatus> getStatusCodec() { return Framework.getService(CodecService.class).getCodec(DEFAULT_CODEC, BulkStatus.class); }
protected Settings getSettings(StreamProcessorDescriptor descriptor) { CodecService codecService = Framework.getService(CodecService.class); Codec<Record> actualCodec = descriptor.defaultCodec == null ? codecService.getCodec(DEFAULT_CODEC, Record.class) : codecService.getCodec(descriptor.defaultCodec, Record.class); Settings settings = new Settings(descriptor.defaultConcurrency, descriptor.defaultPartitions, actualCodec, descriptor.getDefaultPolicy()); descriptor.computations.forEach(comp -> settings.setConcurrency(comp.name, comp.concurrency)); descriptor.policies.forEach(policy -> settings.setPolicy(policy.name, descriptor.getPolicy(policy.name))); descriptor.streams.forEach(stream -> settings.setPartitions(stream.name, stream.partitions)); descriptor.streams.stream() .filter(stream -> Objects.nonNull(stream.codec)) .forEach(stream -> settings.setCodec(stream.name, codecService.getCodec(stream.codec, Record.class))); return settings; }
protected Codec<Record> getCodec() { return Framework.getService(CodecService.class).getCodec(getCodecName(), Record.class); }
streamProcessor = new LogStreamProcessor(service.getLogManager(BULK_LOG_MANAGER_NAME)); CodecService codecService = Framework.getService(CodecService.class); Codec<Record> codec = codecService.getCodec(RECORD_CODEC, Record.class);
Framework.getService(CodecService.class).getCodec(RECORD_CODEC, Record.class)); logAppender.append(shardKey, Record.of(command.getId(), commandAsBytes)); return command.getId();