{"id":24114775,"url":"https://github.com/lecousin/java-framework-core","last_synced_at":"2026-03-07T15:34:21.329Z","repository":{"id":57744826,"uuid":"106168547","full_name":"lecousin/java-framework-core","owner":"lecousin","description":"Java multi-threading and asynchronous programming framework, flexible IO model with asynchronous operations","archived":false,"fork":false,"pushed_at":"2020-10-12T17:34:36.000Z","size":3480,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-29T01:43:36.837Z","etag":null,"topics":["asynchronous-io","asynchronous-programming","asynchronous-tasks","flexible-io","multi-threading"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lecousin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-08T10:43:21.000Z","updated_at":"2025-01-17T14:10:25.000Z","dependencies_parsed_at":"2022-08-30T11:30:19.806Z","dependency_job_id":null,"html_url":"https://github.com/lecousin/java-framework-core","commit_stats":null,"previous_names":[],"tags_count":51,"template":false,"template_full_name":null,"purl":"pkg:github/lecousin/java-framework-core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lecousin%2Fjava-framework-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lecousin%2Fjava-framework-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lecousin%2Fjava-framework-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lecousin%2Fjava-framework-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lecousin","download_url":"https://codeload.github.com/lecousin/java-framework-core/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lecousin%2Fjava-framework-core/sbom","scorecard":{"id":582316,"data":{"date":"2025-08-11","repo":{"name":"github.com/lecousin/java-framework-core","commit":"6f177baf44e1275f77caf770c6c278f32739d771"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T19:29:41.766Z","repository_id":57744826,"created_at":"2025-08-20T19:29:41.766Z","updated_at":"2025-08-20T19:29:41.766Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30219541,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T14:02:48.375Z","status":"ssl_error","status_checked_at":"2026-03-07T14:02:43.192Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asynchronous-io","asynchronous-programming","asynchronous-tasks","flexible-io","multi-threading"],"created_at":"2025-01-11T05:35:18.388Z","updated_at":"2026-03-07T15:34:21.293Z","avatar_url":"https://github.com/lecousin.png","language":"Java","readme":"\r\n# lecousin.net - Java core framework\r\n\r\nThe core library provides mainly:\r\n * A Multi-Threading framework, allowing asynchronous programming\r\n * A new IO (Input/Output) model, much more flexible, and supporting asynchronous operations\r\n\r\nIt does not have any dependency, however the library [net.lecousin.framework.system](https://github.com/lecousin/java-framework-system \"java-framework-system\")\r\nis recommended for better performances on disk operations (detection of physical drives).\r\n\r\n## Build status\r\n\r\n### Current version - branch master\r\n\r\n![build status](https://travis-ci.org/lecousin/java-framework-core.svg?branch=master \"Build Status\")\r\n![build status](https://ci.appveyor.com/api/projects/status/github/lecousin/java-framework-core?branch=master\u0026svg=true \"Build Status\")\r\n[![Codecov](https://codecov.io/gh/lecousin/java-framework-core/graph/badge.svg)](https://codecov.io/gh/lecousin/java-framework-core/branch/master)\r\n\r\n\r\n[![Sonar](https://sonarcloud.io/api/project_badges/measure?project=lecousin_java-framework-core\u0026branch=master\u0026metric=alert_status)](https://sonarcloud.io/dashboard?branch=master\u0026id=lecousin_java-framework-core)\r\n[![Sonar](https://sonarcloud.io/api/project_badges/measure?project=lecousin_java-framework-core\u0026branch=master\u0026metric=bugs)](https://sonarcloud.io/dashboard?branch=master\u0026id=lecousin_java-framework-core)\r\n[![Sonar](https://sonarcloud.io/api/project_badges/measure?project=lecousin_java-framework-core\u0026branch=master\u0026metric=vulnerabilities)](https://sonarcloud.io/dashboard?branch=master\u0026id=lecousin_java-framework-core)\r\n[![Sonar](https://sonarcloud.io/api/project_badges/measure?project=lecousin_java-framework-core\u0026branch=master\u0026metric=code_smells)](https://sonarcloud.io/dashboard?branch=master\u0026id=lecousin_java-framework-core)\r\n[![Sonar](https://sonarcloud.io/api/project_badges/measure?project=lecousin_java-framework-core\u0026branch=master\u0026metric=coverage)](https://sonarcloud.io/dashboard?branch=master\u0026id=lecousin_java-framework-core)\r\n\r\n#### Version\r\n\r\n[![Maven Central](https://img.shields.io/maven-central/v/net.lecousin/core.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22net.lecousin%22%20AND%20a%3A%22core%22)\r\n [![Javadoc](https://img.shields.io/badge/javadoc-0.20.7-brightgreen.svg)](https://www.javadoc.io/doc/net.lecousin/core/0.20.7)\r\n\r\n### Current development - branch dev\r\n\r\n![build status](https://travis-ci.org/lecousin/java-framework-core.svg?branch=dev \"Build Status\")\r\n![build status](https://ci.appveyor.com/api/projects/status/github/lecousin/java-framework-core?branch=dev\u0026svg=true \"Build Status\")\r\n[![Codecov](https://codecov.io/gh/lecousin/java-framework-core/branch/dev/graph/badge.svg)](https://codecov.io/gh/lecousin/java-framework-core/branch/dev)\r\n\r\n[![Sonar](https://sonarcloud.io/api/project_badges/measure?project=lecousin_java-framework-core\u0026branch=dev\u0026metric=alert_status)](https://sonarcloud.io/dashboard?branch=dev\u0026id=lecousin_java-framework-core)\r\n[![Sonar](https://sonarcloud.io/api/project_badges/measure?project=lecousin_java-framework-core\u0026branch=dev\u0026metric=bugs)](https://sonarcloud.io/dashboard?branch=dev\u0026id=lecousin_java-framework-core)\r\n[![Sonar](https://sonarcloud.io/api/project_badges/measure?project=lecousin_java-framework-core\u0026branch=dev\u0026metric=vulnerabilities)](https://sonarcloud.io/dashboard?branch=dev\u0026id=lecousin_java-framework-core)\r\n[![Sonar](https://sonarcloud.io/api/project_badges/measure?project=lecousin_java-framework-core\u0026branch=dev\u0026metric=code_smells)](https://sonarcloud.io/dashboard?branch=dev\u0026id=lecousin_java-framework-core)\r\n[![Sonar](https://sonarcloud.io/api/project_badges/measure?project=lecousin_java-framework-core\u0026branch=dev\u0026metric=coverage)](https://sonarcloud.io/dashboard?branch=dev\u0026id=lecousin_java-framework-core)\r\n\r\n\r\n## Multi-threading\r\n\r\nThe multi-threading system is based on _physical_ resources for better performance:\r\n * One thread by available processor (CPU)\r\n * One thread by physical drive\r\n \r\nEach unit of work is a _Task_, that may succeed with a result, fail with an exception, or be cancelled.\r\nA task must use only one physical resource, so a process implying both CPU work and some operations on a drive\r\nmust be split into several tasks.\r\n\r\nBecause the multi-threading system allocates a single thread by CPU, if long running tasks are running, other\r\ntasks may wait for those tasks to finish if all CPUs are used. While this may be acceptable on a single application\r\nenvironment, it is recommended to split such long running tasks into smaller tasks.\r\n\r\nA thread pool is also available for long running tasks that cannot be split,\r\nor tasks using a library with functionalities that may use several physical resources.\r\nThey will be executed in separate threads so they won't block other tasks.\r\n\r\nA monitoring of tasks executed is done so if a task is exceeding a maximum time, it is put aside to run a new thread\r\nand continue executing other tasks. After a second maximum time, the thread is killed.\r\n\r\nA task should not, but is allowed to block. In this case the blocked thread is interrupted and a new thread\r\nis automatically launched to process other tasks for the same physical resource. Once the task is unblocked,\r\nthe thread is resumed as soon as another thread is available and can be stopped. For this, synchronized\r\nsections should be avoided as much as possible (or be very short), instead a _synchronization point_ should\r\nbe used.\r\n\r\nDifferent kinds of _synchronization point_ are available in the package net.lecousin.framework.concurrent.async,\r\nsuch as JoinPoint, Async, AsyncSupplier... They allow to wait for one or more asynchronous operations\r\nto finish (successfully or not), by listening to them.\r\n\r\nBy default, the order tasks are executed is based on tasks' priority,\r\nthen for the same priority in a first-in-first-out order.\r\nThis may be changed by providing a new implementation of TaskPriorityManager.\r\n\r\nThe multi-threading system handles CPU and drives tasks, for network asynchronous operations you can\r\nuse the library [net.lecousin.framework.network.core](https://github.com/lecousin/java-framework-network-core \"java-framework-network-core\").\r\n\r\nFor a better management of drives, you can use the library\r\n[net.lecousin.framework.system](https://github.com/lecousin/java-framework-system \"java-framework-system\")\r\nwhich will detect drives, their type and capabilities.\r\n\r\n## IO Model\r\n\r\nThe model provided by Java is very basic and mainly based on streams (reading or writing forward).\r\n\r\nOur model adds much more flexibility, by using interfaces that define the capabilities of an Input/Output\r\nimplementation such as Readable, Writable, Seekable, Resizable, Buffered...\r\nBy using those interfaces we can know which operations can be performed on an IO, but allow also a method\r\nto specify what are the minimum expected capabilities.\r\n\r\nFor example a method that needs an IO on which it can write data, it can seek (move forward and backward),\r\nand it can resize the IO can be defined as follow:\r\n\r\n\tpublic \u003cT extends IO.Writable.Seekable \u0026 IO.Resizable\u003e myMethod(T io) { ... }\r\n\r\nIn addition, the model add asynchronous operations (non-blocking) to improve multi-threading.\r\n\r\nVarious kind of I/O are available:\r\n - FileIO for files\r\n - LinkedIO to aggregate several IO into a single one\r\n - SubIO to extract a part as an IO\r\n - buffered implementation such as BufferedIO, PreBufferedReadable, ByteArrayIO, IOInMomoryOrFile...\r\n - OutputToInput allowing to see on one side a writable IO (a producer of data), and on antoher side\r\n a readable IO to consume the data\r\n  - and more...\r\n\r\nThe package net.lecousin.framework.io.util provides also utilities such as AsyncProducer and AsyncConsumer,\r\nBroadcastIO, LimitWriteOperations to queue writing operations...\r\n\r\nSee the javadoc of package net.lecousin.framework.io for more information. \r\n \r\n## Startup\r\n\r\nTo start the framework, one of the _start_ method can be called on the Application class.\r\nThis will initialize the environment for a single application.\r\n\r\nOnce initialized, the application instance can be retrieved through the LCCore.getApplication() method.\r\n\r\nMulti-application environment implementations may come in the future, so the framework is designed such\r\nas multiple applications may share the same environment, including the same multi-threading system.\r\n\r\n## Logging\r\n\r\nA logging system is also provided, in a similar way as other logging frameworks (using loggers and appenders).\r\n\r\nThe reason to provide again another logging system is to have a logging system capable to use our\r\nmulti-threading system and asynchronous IO operations.\r\n\r\nEach time something is logged, this is done by using asynchronous operations and tasks such as the code\r\nlogging information is not blocked to avoid reducing performance because of logging.\r\n\r\nBridges between other logging systems and this logging system are available in \r\n[java-framework-log-bridges](https://github.com/lecousin/java-framework-log-bridges \"java-framework-log-bridges\")\r\n\r\n## Memory management\r\n\r\nIt often happens that data is kept in memory to improve performance, typically a cache. Such implementations\r\ncan declare themselves to the MemoryManager. The MemoryManager is monitoring memory usage, so when available\r\nmemory becomes low, it will ask the implementations to free some memory.\r\n\r\nIn addition, when an application is idle (doing almost nothing) since several minutes, the MemoryManager may\r\ndecide to ask to free some memory to reduce the memory footprint of the application when it is idle.\r\n\r\n## Utilities\r\n\r\nVarious other utilities are also available, such as collections, encoding, more flexible strings...","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flecousin%2Fjava-framework-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flecousin%2Fjava-framework-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flecousin%2Fjava-framework-core/lists"}