{"id":17004839,"url":"https://github.com/clickermonkey/zource","last_synced_at":"2025-03-22T10:39:16.663Z","repository":{"id":152212262,"uuid":"9776795","full_name":"ClickerMonkey/Zource","owner":"ClickerMonkey","description":"A Java library for pooling expensive resources.","archived":false,"fork":false,"pushed_at":"2013-11-15T20:52:39.000Z","size":216,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-27T10:23:10.893Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"osl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ClickerMonkey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-04-30T18:05:12.000Z","updated_at":"2017-01-15T23:28:51.000Z","dependencies_parsed_at":"2023-04-09T12:14:53.883Z","dependency_job_id":null,"html_url":"https://github.com/ClickerMonkey/Zource","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClickerMonkey%2FZource","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClickerMonkey%2FZource/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClickerMonkey%2FZource/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClickerMonkey%2FZource/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ClickerMonkey","download_url":"https://codeload.github.com/ClickerMonkey/Zource/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244945597,"owners_count":20536295,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-14T04:44:35.626Z","updated_at":"2025-03-22T10:39:16.643Z","avatar_url":"https://github.com/ClickerMonkey.png","language":"Java","readme":"zource\n======\n\n![Stable](http://i4.photobucket.com/albums/y123/Freaklotr4/stage_stable.png)\n\nA Java library for pooling expensive resources.\n\n**Features**\n- A ResourcePool can return reusable resources (Resource implementation dependent) or can generate new resources if the pool doesn't have any currently available.\n- A ResourcePool can automatically downsize it's number of resources if the number of unused resources meets a specified number for a specified amount of time.\n\n**Documentation**\n- [JavaDoc](http://gh.magnos.org/?r=http://clickermonkey.github.com/Zource/)\n\n**Example**\n\n```java\n// Create a factory that creates services for handling tasks.\nResourceFactory\u003cTaskService\u003e factory = new ResourceFactory\u003cTaskService\u003e() {\n    public TaskService allocate() {\n        TaskService s = new TaskService();\n        s.start();\n        return s;\n    }\n};\n\n// Create a pool of services for handling tasks and populate it.\nResourcePool\u003cTaskService\u003e pool = new ResourcePool\u003cTaskService\u003e(factory);\npool.setMinCapacity(5);\npool.setMaxCapacity(10);\npool.setAllocateSize(5);\npool.setAllocateThreshold(50);\npool.setDeallocateSize(1);\npool.populate();\n\n// Get a ready service to process a task\nTaskService serve = pool.allocate();\n\n// Create the task and give it to the service.\nTask myTask = ...;\nserve.addEvent(myTask);\n\n// Empty pool and wait for all tasks to finish.\npool.empty();\n```\n\n**Builds**\n- [zource-1.0.0.jar](http://gh.magnos.org/?r=https://github.com/ClickerMonkey/Zource/blob/master/build/zource-1.0.0.jar?raw=true)\n- [zource-src-1.0.0.jar](http://gh.magnos.org/?r=https://github.com/ClickerMonkey/Zource/blob/master/build/zource-src-1.0.0.jar?raw=true) *- includes source code*\n- [zource-all-1.0.0.jar](http://gh.magnos.org/?r=https://github.com/ClickerMonkey/Zource/blob/master/build/zource-1.0.0.jar?raw=true) *- includes all dependencies*\n- [zource-all-src-1.0.0.jar](http://gh.magnos.org/?r=https://github.com/ClickerMonkey/Zource/blob/master/build/zource-src-1.0.0.jar?raw=true) *- includes all dependencies and source code*\n\n**Projects using zource:**\n- [taskaroo](http://gh.magnos.org/?r=https://github.com/ClickerMonkey/Taskaroo)\n- [falcon](http://gh.magnos.org/?r=https://github.com/ClickerMonkey/Falcon)\n\n**Dependencies**\n- [curity](http://gh.magnos.org/?r=https://github.com/ClickerMonkey/Curity)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclickermonkey%2Fzource","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclickermonkey%2Fzource","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclickermonkey%2Fzource/lists"}