Пример #1
0
        /// <summary>
        /// Materialize a <see cref="ISessionStore{K,AGG}"/> using the provided <see cref="ISessionBytesStoreSupplier"/>
        /// 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="ISessionBytesStoreSupplier"/> 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, ISessionStore <Bytes, byte[]> > Create <KS, VS>(ISessionBytesStoreSupplier supplier)
            where KS : ISerDes <K>, new()
            where VS : ISerDes <V>, new()
        {
            var m = new Materialized <K, V, ISessionStore <Bytes, byte[]> >(supplier)
            {
                KeySerdes   = new KS(),
                ValueSerdes = new VS()
            };

            return(m);
        }
Пример #2
0
        /// <summary>
        /// Materialize a <see cref="ISessionStore{K,AGG}"/> using the provided <see cref="ISessionBytesStoreSupplier"/>
        /// 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="ISessionBytesStoreSupplier"/> 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, ISessionStore <Bytes, byte[]> > Create(ISessionBytesStoreSupplier supplier)
        {
            var m = new Materialized <K, V, ISessionStore <Bytes, byte[]> >(supplier);

            return(m);
        }