MyDotey.ObjectPool 1.0.0-rc03

This is a prerelease version of MyDotey.ObjectPool.
There is a newer version of this package available.
See the version list below for details.
dotnet add package MyDotey.ObjectPool --version 1.0.0-rc03                
NuGet\Install-Package MyDotey.ObjectPool -Version 1.0.0-rc03                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MyDotey.ObjectPool" Version="1.0.0-rc03" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MyDotey.ObjectPool --version 1.0.0-rc03                
#r "nuget: MyDotey.ObjectPool, 1.0.0-rc03"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MyDotey.ObjectPool as a Cake Addin
#addin nuget:?package=MyDotey.ObjectPool&version=1.0.0-rc03&prerelease

// Install MyDotey.ObjectPool as a Cake Tool
#tool nuget:?package=MyDotey.ObjectPool&version=1.0.0-rc03&prerelease                

MyDotey ObjectPool

License

MyDotey ObjectPool, a generic object pool, implementatin based on ConcurrentHashMap & BlockingQueue, easy to use.

Implemented in java/dotnet separately. Code is clean. Easy to read.

ThreadPool & AutoScaleThreadPool are implemented based on the ObjectPool & AutoScaleObjectPool as well.

Usage

Features

  • ObjectPool

    • acquire, get an object, if no object, block the call

    • tryAcquire, get an object, if no object, get null

    • release, return an object to pool

  • AutoScaleObjectPool

    • self-refreshing automatically

    • close idle objects automatically

    • recognize stale object and replace with new none automatically

    • scale out batch objects

  • ThreadPool

    • implementation based on object pool
  • AutoScaleThreadPool

    • implementation based on auto scale object pool

Configuration

  • ObjectPool

    • minSize, min size objects in pool, default to 0

    • maxSize, max size objects in pool, required

    • objectFactory, object creation logic, required

    • onCreate, object creation hook, default to no hook

    • onClose, object close hook, the default behavior is to invoke close/dispose method automatically for Closeable/Disposable objects

  • AutoScaleObjectPool

    • objectTtl, unit ms, object max live time, if reached, remove it & create a new one, default to long max

    • maxIdleTime, unit ms, max idle time, if reached, remove it, default to long Max

    • staleChecker, object stale decision maker, if one is stale, remove it & replace with a new one, default to always not stale

    • checkInterval, unit ms, default to 10 * 1000 ms

    • scaleFactor, the batch size when scaling out, default to 1

  • ThreadPool

    • queueCapacity, size limit of the task queue, if set to 0, no queue is used, default to int max

Developers

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • NLog (>= 4.5.0-rc06)

NuGet packages (1)

Showing the top 1 NuGet packages that depend on MyDotey.ObjectPool:

Package Downloads
Codibre.MSSqlSession

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 5,741 3/30/2018
1.0.0-rc03 827 2/27/2018
1.0.0-rc02 937 2/27/2018
1.0.0-rc01 919 2/26/2018

object pool, auto scale object pool, thread pool, auto scale thread pool