{"id":19735342,"url":"https://github.com/romix/java-concurrent-hash-trie-map","last_synced_at":"2025-07-30T04:08:40.606Z","repository":{"id":4621654,"uuid":"5765579","full_name":"romix/java-concurrent-hash-trie-map","owner":"romix","description":"Java port of a concurrent trie hash map implementation from the Scala collections library","archived":false,"fork":false,"pushed_at":"2020-10-13T08:29:38.000Z","size":144,"stargazers_count":152,"open_issues_count":3,"forks_count":26,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-06-28T20:08:01.176Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/romix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-2.0.html","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-09-11T13:43:17.000Z","updated_at":"2025-06-25T22:46:33.000Z","dependencies_parsed_at":"2022-09-26T21:51:12.688Z","dependency_job_id":null,"html_url":"https://github.com/romix/java-concurrent-hash-trie-map","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/romix/java-concurrent-hash-trie-map","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romix%2Fjava-concurrent-hash-trie-map","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romix%2Fjava-concurrent-hash-trie-map/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romix%2Fjava-concurrent-hash-trie-map/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romix%2Fjava-concurrent-hash-trie-map/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/romix","download_url":"https://codeload.github.com/romix/java-concurrent-hash-trie-map/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romix%2Fjava-concurrent-hash-trie-map/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267605947,"owners_count":24114619,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"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":[],"created_at":"2024-11-12T00:41:38.999Z","updated_at":"2025-07-30T04:08:40.578Z","avatar_url":"https://github.com/romix.png","language":"Java","funding_links":[],"categories":["并发编程","Memory and concurrency"],"sub_categories":[],"readme":"About\n=============================\n\nThis is a Java port of a concurrent trie hash map implementation from the Scala collections library. It is almost a line-by-line \nconversion from Scala to Java.\n\nIdea + implementation techniques can be found in these reports written by Aleksandar Prokopec:\n   * http://infoscience.epfl.ch/record/166908/files/ctries-techreport.pdf - this is a nice introduction to Ctries, along with a correctness proof\n   * http://lamp.epfl.ch/~prokopec/ctries-snapshot.pdf - a more up-to-date writeup which describes the snapshot operation\n\nThe original Scala implementation can be found here and is a part of scala.collection.concurrent:\n   *   [Scala implementation](https://github.com/scala/scala/blob/930c85d6c96507d798d1847ea078eebf93dc0acb/src/library/scala/collection/concurrent/TrieMap.scala)\n\nSome of the tests and implementation details were borrowed from this project:\n   *  https://github.com/flegall/concurrent-hash-trie\n\nImplementation status : \n   *   The given implementation is complete and implements all features of the original Scala implementation including support for \n   snapshots.\n   *   Wherever necessary, code was adapted to be more easily usable in Java, e.g. it returns Objects instead of Option\u003cV\u003e as \n   many methods of Scala's collections do.   \n   *   This class implements all the ConcurrentMap \u0026 Iterator methods and passes all the tests. Can be used as a drop-in replacement\n       for usual Java maps, including ConcurrentHashMap.\n\n\nWhat is a concurrent trie hash map also known as ctrie?\n========================================================\nctrie is a lock-Free Concurrent Hash Array Mapped Trie.\n\nA concurrent hash-trie or Ctrie is a concurrent thread-safe lock-free implementation of a hash array mapped trie.\n \nIt is used to implement the concurrent map abstraction. It has particularly scalable concurrent insert and remove operations \nand is memory-efficient. \n\nIt supports O(1), atomic, lock-free snapshots which are used to implement linearizable lock-free size, iterator and clear operations. \nThe cost of evaluating the (lazy) snapshot is distributed across subsequent updates, thus making snapshot evaluation horizontally scalable.\n\nThe original Scala-based implementation of the Ctrie is a part of the Scala standard library since the version 2.10.\n\nMore info about Ctries:\n\n- http://infoscience.epfl.ch/record/166908/files/ctries-techreport.pdf - this is a nice introduction to Ctries, along with a correctness proof\n- http://lamp.epfl.ch/~prokopec/ctries-snapshot.pdf - a more up-to-date writeup (more coherent with the current version of the code) which describes the snapshot operation\n       \n\nLicense\n===============================\n\nThis library is licensed under the Apache 2.0 license.\n\n\nUsage\n===============================\n\nUsage of this library is very simple. Simply import the class com.romix.scala.collection.concurrent.TrieMap and use it as a usual Map.\n    \n    import com.romix.scala.collection.concurrent.TrieMap;\n    \n    Map myMap = new TrieMap \u003cObject, Object\u003e ();\n    myMap.put(\"key\", \"value\");\n    \n\nBuilding the library\n===============================\n\nUse a usual `mvn clean install`\n\nUsing the library with Maven projects\n=====================================\nThe prebuilt binaries of the library are available from Maven central. Please use the following dependency in your POM files:\n\n\t\t\u003cdependency\u003e\n\t\t\t\u003cgroupId\u003ecom.github.romix\u003c/groupId\u003e\n\t\t\t\u003cartifactId\u003ejava-concurrent-hash-trie-map\u003c/artifactId\u003e\n\t\t\t\u003cversion\u003e0.2.23\u003c/version\u003e\n\t\t\u003c/dependency\u003e\n\n\nExternal dependencies\n=====================================\nThis library is self-contained. It does not depend on any additional libraries. In particular, it does not require the rather big Scala's \nstandard library to be used.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromix%2Fjava-concurrent-hash-trie-map","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromix%2Fjava-concurrent-hash-trie-map","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromix%2Fjava-concurrent-hash-trie-map/lists"}