Skip to content

Commit

Permalink
Add apache kafka as a library user (as of 3.6)
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-manes committed Jun 25, 2023
1 parent 59df43e commit 3915670
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Powering infrastructure near you:
* [Cassandra][cassandra]: Manage massive amounts of data, fast
* [Coherence][coherence]: Mission critical in-memory data grid
* [Accumulo][accumulo]: A sorted, distributed key/value store
* [Kafka][kafka]: A distributed event streaming platform
* [HBase][hbase]: A distributed, scalable, big data store
* [Apache Solr][solr]: Blazingly fast enterprise search
* [Infinispan][infinispan]: Distributed in-memory data grid
Expand Down Expand Up @@ -138,6 +139,7 @@ Snapshots of the development version are available in
[spring]: https://docs.spring.io/spring/docs/current/spring-framework-reference/integration.html#cache-store-configuration-caffeine
[scala-cache]: https://github.com/cb372/scalacache
[scaffeine]: https://github.com/blemale/scaffeine
[kafka]: https://kafka.apache.org
[hbase]: https://hbase.apache.org
[cassandra]: http://cassandra.apache.org
[solr]: https://solr.apache.org/
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ bouncycastle = "1.70"
cache2k = "2.6.1.Final"
caffeine = "3.1.6"
checker-framework = "3.35.0"
checkstyle = "10.12.0"
checkstyle = "10.12.1"
coherence = "22.06.2"
commons-collections4 = "4.4"
commons-compress = "1.23.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ private ImmutableList<PolicyActor> getPolicyActors(Set<Characteristic> character
}

/** Throws the underlying cause for the simulation failure. */
private void throwError(ImmutableList<PolicyActor> policies, RuntimeException e) {
private void throwError(Iterable<PolicyActor> policies, RuntimeException e) {
if (!Thread.currentThread().isInterrupted()) {
throw e;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,19 +144,18 @@ private void evict() {
int freq = candidate.frequency;
candidate.frequency = 0;
candidate.remove();
sizeFifo--;

if (freq >= moveToMainThreshold) {
evictFromMain();
candidate.appendToTail(headMain);
candidate.type = QueueType.MAIN;
sizeMain++;
sizeFifo--;
} else {
candidate.appendToTail(headGhost);
candidate.type = QueueType.GHOST;
candidate.frequency = 0;
sizeGhost++;
sizeFifo--;

if (sizeGhost > maxGhost) {
var ghost = headGhost.next;
Expand Down

0 comments on commit 3915670

Please sign in to comment.