Uploaded image for project: 'Hot Rod Native client'
  1. Hot Rod Native client
  2. HRCPP-282

Implement asynchronous operations for RemoteCache

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • .NET
    • None

      The .NET client should provide asynchronous versions of basic operations such as put, get, etc.
      All the operations of the original Java client should have their "async" equivalents:

      • GetAsync
      • PutAsync
      • PutIfAbsent
      • PutAllAsync
      • ClearAsync
      • RemoveAsync
      • ReplaceAsync
      • ReplaceWithVersionAsync
      • RemoveWithVersionAsync

      Rationale: The current implementation allows for asynchronous invocation of all methods through C# Task API in this way:

      await Task.Run(() => cache.Put(k,v)).
      

      However, it is common in C# to have asynchronous methods ending with "Async" (e.g. StreamReader has ReadLineAsync link StreamReader.ReadLineAsync)

      The goal is to simplify programming with these methods and allow the caller to call just:

      await cache.PutAsync(k,v)
      

              vrigamon@redhat.com Vittorio Rigamonti
              mgencur Martin Gencur
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: