{"id":19405743,"url":"https://github.com/jmnarloch/lazy","last_synced_at":"2026-06-14T08:33:10.027Z","repository":{"id":145781253,"uuid":"80960005","full_name":"jmnarloch/lazy","owner":"jmnarloch","description":"Java 8 lazy type","archived":false,"fork":false,"pushed_at":"2017-02-10T05:31:52.000Z","size":82,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-18T08:26:14.674Z","etag":null,"topics":["java","java-8","lazy","library"],"latest_commit_sha":null,"homepage":null,"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/jmnarloch.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-05T01:11:13.000Z","updated_at":"2017-02-05T05:44:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"300ffd37-cd76-485e-bbda-f737103ed871","html_url":"https://github.com/jmnarloch/lazy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jmnarloch/lazy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmnarloch%2Flazy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmnarloch%2Flazy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmnarloch%2Flazy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmnarloch%2Flazy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmnarloch","download_url":"https://codeload.github.com/jmnarloch/lazy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmnarloch%2Flazy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34315072,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["java","java-8","lazy","library"],"created_at":"2024-11-10T11:39:23.557Z","updated_at":"2026-06-14T08:33:10.010Z","avatar_url":"https://github.com/jmnarloch.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Java 8 Lazy type\n\n\u003e General purpose, thread safe and high performance lazy type\n\n[![Build Status](https://travis-ci.org/jmnarloch/lazy.svg?branch=master)](https://travis-ci.org/jmnarloch/lazy)\n[![Coverage Status](https://coveralls.io/repos/jmnarloch/lazy/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/jmnarloch/lazy?branch=master)\n\n## Setup\n\nAdd the library to your project:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.jmnarloch\u003c/groupId\u003e\n  \u003cartifactId\u003elazy\u003c/artifactId\u003e\n  \u003cversion\u003e1.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n \n## Usage\n\nUsage is really simple, you can create a lazy reference to any object. The instance is being provided by a `Supplier`.\nThe `Supplier` will be evaluated upon the first call of the `get` method.\n\n```java\nfinal Lazy\u003cComplexObject\u003e value = Lazy.create(() -\u003e new ComplexObject());\n\n// get the object instance\nComplexObject object = value.get();\n```\n\nThe implementation is guaranteed to be thread safe.\n\n## Performance\n\nThe actual `Lazy` type implementation uses lock free implementation giving it very good performance compared to lock \nvariant whenever it uses the `synchronized` Java keyword or directly `Lock` type.\n\n| Benchmark | Mode | Cnt | Score | Error | Units |\n| --------- | ---- | --- | ----- | ----- | ----- |\n| LazyBenchmark.benchmarkGet | thrpt | 20 | 271440905,189 | ± 2721909,603 | ops/s |\n| LazyBenchmark.benchmarkInitializeAndGet | thrpt | 20 | 274012023,081 | ± 1720484,338 | ops/s |\n\n## License\n\nApache 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmnarloch%2Flazy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmnarloch%2Flazy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmnarloch%2Flazy/lists"}