/// <summary> /// Materialize a <see cref="SessionStore{K, AGG}"/> using the provided <see cref="SessionBytesStoreSupplier"/> /// Important: Custom subclasses are allowed here, but they should respect the retention contract: /// Session stores are required to retain windows at least as long as (session inactivity gap + session grace period). /// </summary> /// <typeparam name="KS">New serializer for <typeparamref name="K"/> type</typeparam> /// <typeparam name="VS">New serializer for <typeparamref name="V"/> type</typeparam> /// <param name="supplier">the <see cref="SessionBytesStoreSupplier"/> used to materialize the store</param> /// <returns>a new <see cref="Materialized{K, V, S}"/> instance with the given supplier</returns> public static Materialized <K, V, SessionStore <Bytes, byte[]> > Create <KS, VS>(SessionBytesStoreSupplier supplier) where KS : ISerDes <K>, new() where VS : ISerDes <V>, new() { var m = new Materialized <K, V, SessionStore <Bytes, byte[]> >(supplier) { KeySerdes = new KS(), ValueSerdes = new VS() }; return(m); }
/// <summary> /// Materialize a <see cref="SessionStore{K, AGG}"/> using the provided <see cref="SessionBytesStoreSupplier"/> /// Important: Custom subclasses are allowed here, but they should respect the retention contract: /// Session stores are required to retain windows at least as long as (session inactivity gap + session grace period). /// </summary> /// <param name="supplier">the <see cref="SessionBytesStoreSupplier"/> used to materialize the store</param> /// <returns>a new <see cref="Materialized{K, V, S}"/> instance with the given supplier</returns> public static Materialized <K, V, SessionStore <Bytes, byte[]> > Create(SessionBytesStoreSupplier supplier) { var m = new Materialized <K, V, SessionStore <Bytes, byte[]> >(supplier); return(m); }