コード例 #1
0
 /// <summary>
 /// Resume (continue) prior client session with FASTER using advanced functions; used during recovery from failure.
 /// For performance reasons this overload is not recommended if functions is value type (struct).
 /// </summary>
 /// <param name="functions">Callback functions</param>
 /// <param name="sessionId">ID/name of previous session to resume</param>
 /// <param name="commitPoint">Prior commit point of durability for session</param>
 /// <param name="threadAffinitized">For advanced users. Specifies whether session holds the thread epoch across calls. Do not use with async code.
 ///     Ensure thread calls session Refresh periodically to move the system epoch forward.</param>
 /// <param name="sessionVariableLengthStructSettings">Session-specific variable-length struct settings</param>
 /// <returns>Session instance</returns>
 public AdvancedClientSession <Key, Value, Input, Output, Context, IAdvancedFunctions <Key, Value, Input, Output, Context> > ResumeSession <Input, Output, Context>(IAdvancedFunctions <Key, Value, Input, Output, Context> functions,
                                                                                                                                                                    string sessionId, out CommitPoint commitPoint, bool threadAffinitized = false, SessionVariableLengthStructSettings <Value, Input> sessionVariableLengthStructSettings = null)
 {
     return(ResumeAdvancedSession <Input, Output, Context, IAdvancedFunctions <Key, Value, Input, Output, Context> >(functions, sessionId, out commitPoint, threadAffinitized, sessionVariableLengthStructSettings));
 }
コード例 #2
0
 /// <summary>
 /// Helper method to specify callback function instance along with Input, Output and Context types for advanced client sessions
 /// </summary>
 /// <typeparam name="Input"></typeparam>
 /// <typeparam name="Output"></typeparam>
 /// <typeparam name="Context"></typeparam>
 /// <returns></returns>
 public AdvancedClientSessionBuilder <Input, Output, Context> For <Input, Output, Context>(IAdvancedFunctions <Key, Value, Input, Output, Context> functions)
 {
     return(new AdvancedClientSessionBuilder <Input, Output, Context>(this, functions));
 }
コード例 #3
0
 /// <summary>
 /// Start a new advanced client session with FASTER.
 /// For performance reasons, please use FasterKV&lt;Key, Value&gt;.For(functions).NewSession&lt;Functions&gt;(...) instead of this overload.
 /// </summary>
 /// <param name="functions">Callback functions</param>
 /// <param name="sessionId">ID/name of session (auto-generated if not provided)</param>
 /// <param name="threadAffinitized">For advanced users. Specifies whether session holds the thread epoch across calls. Do not use with async code.
 ///     Ensure thread calls session Refresh periodically to move the system epoch forward.</param>
 /// <param name="sessionVariableLengthStructSettings">Session-specific variable-length struct settings</param>
 /// <returns>Session instance</returns>
 public AdvancedClientSession <Key, Value, Input, Output, Context, IAdvancedFunctions <Key, Value, Input, Output, Context> > NewSession <Input, Output, Context>(IAdvancedFunctions <Key, Value, Input, Output, Context> functions,
                                                                                                                                                                 string sessionId = null, bool threadAffinitized = false, SessionVariableLengthStructSettings <Value, Input> sessionVariableLengthStructSettings = null)
 {
     return(NewAdvancedSession <Input, Output, Context, IAdvancedFunctions <Key, Value, Input, Output, Context> >(functions, sessionId, threadAffinitized, sessionVariableLengthStructSettings));
 }
コード例 #4
0
 internal AdvancedClientSessionBuilder(FasterKV <Key, Value> fasterKV, IAdvancedFunctions <Key, Value, Input, Output, Context> functions)
 {
     _fasterKV  = fasterKV;
     _functions = functions;
 }