Skip to content

🎰 Simplistic, atomic, interlocked counter that allows for huge numbers of operations to be performed using a "sharding" style approach to summation, all in .NET Core C#

License

Notifications You must be signed in to change notification settings

Jac21/ShardedCounter

Repository files navigation

logo

NuGet Status MIT Licence Build Status donate

🎰 Simplistic, atomic, interlocked counter that allows for huge numbers of operations to be performed using a "sharding" style approach to summation, all in .NET Core C#

Interface

This library implements the following simplistic interface:

    /// <summary>
    /// A simple counter interface to be used by the Sharded implementation
    /// </summary>
    internal interface ICounter
    {
        /// <summary>
        /// Increase the count by the amount provided
        /// </summary>
        /// <param name="amount">The amount to increase the counter</param>
        void Increase(long amount);

        /// <summary>
        /// Decrease the count by the amount provided
        /// </summary>
        /// <param name="amount">The amount to decrease the counter</param>
        void Decrease(long amount);

        /// <summary>
        /// Get the current count
        /// </summary>
        /// <returns>The current count</returns>
        long Count { get; }
    }

About

🎰 Simplistic, atomic, interlocked counter that allows for huge numbers of operations to be performed using a "sharding" style approach to summation, all in .NET Core C#

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages