Skip to content

A hash based thread safe implementation of linked blocking queue.

License

Notifications You must be signed in to change notification settings

dejankos/java-hash-queue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CI Status codecov

Java Blocking Hash Queue

A hash based thread safe implementation of linked blocking queue with FIFO (first-in-first-out) order. This data structure is suitable to be used as a blocking queue while having search performance of a hash table.

Examples

var queue = new LinkedBlockingHashQueue<Integer>();
queue.put(42);

/* 
 * Both calls will have hash table performance instad of linear as usually queues have.
 * Avg: O(1)
 * Worst: O(N) / O( logN ) depending of bucket type where N is size of bucket 
 */
queue.contains(42);
queue.remove(42);

More examples under /src/test/java

License

Java Blocking Hash Queue is licensed under the Apache License, Version 2.0

About

A hash based thread safe implementation of linked blocking queue.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages