{"id":20840101,"url":"https://github.com/akifev/player-storage","last_synced_at":"2026-04-27T07:32:10.711Z","repository":{"id":37260316,"uuid":"248631970","full_name":"akifev/player-storage","owner":"akifev","description":"Library for managing the storage of players.","archived":false,"fork":false,"pushed_at":"2022-06-20T22:45:25.000Z","size":28,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-27T17:31:08.918Z","etag":null,"topics":["java","kotlin","library"],"latest_commit_sha":null,"homepage":"https://akifev.github.io/player-storage","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akifev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-20T00:16:59.000Z","updated_at":"2020-05-22T18:22:33.000Z","dependencies_parsed_at":"2022-09-04T16:01:33.989Z","dependency_job_id":null,"html_url":"https://github.com/akifev/player-storage","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/akifev/player-storage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akifev%2Fplayer-storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akifev%2Fplayer-storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akifev%2Fplayer-storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akifev%2Fplayer-storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akifev","download_url":"https://codeload.github.com/akifev/player-storage/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akifev%2Fplayer-storage/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32327701,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"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","kotlin","library"],"created_at":"2024-11-18T01:15:17.059Z","updated_at":"2026-04-27T07:32:10.674Z","avatar_url":"https://github.com/akifev.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Player Storage\n[![](https://jitpack.io/v/akifev/player-storage.svg)](https://jitpack.io/#akifev/player-storage)\n\nThis is a library for managing the storage of players with the ability\nto add or update, delete, get a rank, and roll back.\n\n## Table Of Contents\n\u003c!--ts--\u003e\n   * [Overview](#overview)\n        * [Operations](#operations)\n   * [Using in your project](#using-in-your-project)\n        * [Maven](#maven)\n        * [Gradle](#gradle)\n   * [Performance](#performance)\n        * [JMH Benchmark](#jmh-benchmark)\n\u003c!--te--\u003e\n\n## Overview\nThis library contains the thread-safe class PlayerStorage which implements Storage interface.\n\n### Operations\nClass PlayerStorage implements the following methods.\n\n#### registerPlayerResult\nAdds a player with a rating or updates a player rating, if one has been already added.  \n\n```kotlin\n@Synchronized\nfun registerPlayerResult(playerName: String, playerRating: Int): Boolean\n```\n**Note:** This method is marked as @Synchronized.\n\n#### unregisterPlayer\nDeletes the player from the storage.\n\n```kotlin\n@Synchronized\nfun unregisterPlayer(playerName: String): Boolean\n```\n**Note:** This method is marked as @Synchronized.\n\n#### getPlayerRank\nReturns player rank. Rank is a position in the rating table. \n```kotlin\nfun getPlayerRank(playerName: String): Int?\n```\n\n#### rollback\nRolls the last [step] registerPlayerResult or unregisterPlayer invocations back.\n```kotlin\n@Synchronized\nfun rollback(step: Int): Boolean\n```\n**Note:** This method is marked as @Synchronized.\n\n## Using in your project\nThe library published to JitPack repository.\n### Maven\nStep 1. Add the JitPack repository to your build file.\n\n```xml\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003cid\u003ejitpack.io\u003c/id\u003e\n        \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n```\n\nStep 2. Add the dependency.\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.akifev\u003c/groupId\u003e\n    \u003cartifactId\u003eplayer-storage\u003c/artifactId\u003e\n    \u003cversion\u003e2.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n### Gradle\nStep 1. Add the JitPack repository to your build file.\n\n```groovy\nallprojects {\n    repositories {\n        ...\n        maven { url 'https://jitpack.io' }\n    }\n}\n```\n\nStep 2. Add the dependency.\n\n```groovy\ndependencies {\n        implementation 'com.github.akifev:player-storage:2.0'\n}\n```\n\n## Performance\n### JMH Benchmark \nHere is the relation of average operation execution time to the quantity of players added to the storage.   \n\n|Quantity of players | 14    | 62    | 1022  | 8190  | 65534 |         |\n|:-------------------|:-----:|:-----:|:-----:|:-----:|:-----:|--------:|\n|registerPlayerResult|307    |510    |1079   |1984   |4156   |ns/op    |\n|unregisterPlayer    |313    |585    |1123   |1974   |4385   |ns/op    |\n|getPlayerRank       |135    |239    |544    |1104   |2328   |ns/op    |\n|rollback            |58     |50     |59     |31     |9      |ns/op    |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakifev%2Fplayer-storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakifev%2Fplayer-storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakifev%2Fplayer-storage/lists"}