public virtual void InitStoreSerDes(ProcessorContext context)
        {
            if (!initStoreSerdes)
            {
                keySerdes ??= context.Configuration.DefaultKeySerDes as ISerDes <K>;
                valueSerdes ??= context.Configuration.DefaultValueSerDes as ISerDes <V>;

                keySerdes?.Initialize(new SerDesContext(context.Configuration));
                valueSerdes?.Initialize(new SerDesContext(context.Configuration));

                initStoreSerdes = true;
            }
        }
예제 #2
0
        public override void Initialize(SerDesContext context)
        {
            if (innerSerdes == null && context.Config.DefaultValueSerDes is ISerDes <V> )
            {
                innerSerdes = (ISerDes <V>)context.Config.DefaultValueSerDes;
            }

            if (innerSerdes == null)
            {
                throw new StreamsException($"ChangeSerdes<{typeof(V)}> is not correctly configured. Please set explicitly serdes in previous operation.");
            }

            innerSerdes.Initialize(context);
        }
 /// <summary>
 /// Initialize method with a current context which contains <see cref="IStreamConfig"/>.
 /// Can be used to initialize the serdes according to some parameters present in the configuration such as the schema.registry.url
 /// </summary>
 /// <param name="context">SerDesContext with stream configuration</param>
 public override void Initialize(SerDesContext context)
 {
     base.Initialize(context);
     innerSerdes.Initialize(context);
 }