This is an automated email from the ASF dual-hosted git repository.
benedict pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-accord.git
The following commit(s) were added to refs/heads/trunk by this push:
new 63c37e2 fix java8 build (#25)
63c37e2 is described below
commit 63c37e20cfe66a421c1b07ba1f430a9e6aabe4c5
Author: Benedict Elliott Smith <[email protected]>
AuthorDate: Mon Jan 9 21:31:40 2023 +0000
fix java8 build (#25)
---
.../main/java/accord/impl/InMemoryCommandStore.java | 4 ++--
.../src/main/java/accord/impl/SimpleProgressLog.java | 19 +++++++++----------
.../src/test/java/accord/local/CommandTest.java | 3 ++-
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/accord-core/src/main/java/accord/impl/InMemoryCommandStore.java
b/accord-core/src/main/java/accord/impl/InMemoryCommandStore.java
index ce4562d..ad08d14 100644
--- a/accord-core/src/main/java/accord/impl/InMemoryCommandStore.java
+++ b/accord-core/src/main/java/accord/impl/InMemoryCommandStore.java
@@ -18,14 +18,14 @@
package accord.impl;
+import accord.local.CommandStore; // java8 fails compilation if this is in
correct position
+import accord.local.SyncCommandStores.SyncCommandStore; // java8 fails
compilation if this is in correct position
import accord.api.Agent;
import accord.api.DataStore;
import accord.api.Key;
import accord.api.ProgressLog;
import accord.impl.InMemoryCommandStore.SingleThread.AsyncState;
import accord.impl.InMemoryCommandStore.Synchronized.SynchronizedState;
-import accord.local.CommandStore; // java8 fails compilation if this is in
correct position
-import accord.local.SyncCommandStores.SyncCommandStore; // java8 fails
compilation if this is in correct position
import accord.local.Command;
import accord.local.CommandStore.RangesForEpoch;
import accord.local.CommandsForKey;
diff --git a/accord-core/src/main/java/accord/impl/SimpleProgressLog.java
b/accord-core/src/main/java/accord/impl/SimpleProgressLog.java
index f295235..afeb85e 100644
--- a/accord-core/src/main/java/accord/impl/SimpleProgressLog.java
+++ b/accord-core/src/main/java/accord/impl/SimpleProgressLog.java
@@ -29,10 +29,11 @@ import java.util.function.BiConsumer;
import javax.annotation.Nullable;
+import accord.utils.IntrusiveLinkedList;
+import accord.utils.IntrusiveLinkedListNode;
import accord.api.ProgressLog;
import accord.api.RoutingKey;
import accord.coordinate.*;
-import accord.impl.SimpleProgressLog.Instance.State.Monitoring;
import accord.local.*;
import accord.local.Node.Id;
import accord.local.Status.Known;
@@ -41,8 +42,6 @@ import accord.messages.InformDurable;
import accord.messages.SimpleReply;
import accord.primitives.*;
import accord.topology.Topologies;
-import accord.utils.IntrusiveLinkedList;
-import accord.utils.IntrusiveLinkedListNode;
import accord.utils.Invariants;
import org.apache.cassandra.utils.concurrent.Future;
@@ -94,7 +93,7 @@ public class SimpleProgressLog implements ProgressLog.Factory
this.node = node;
}
- class Instance extends IntrusiveLinkedList<Monitoring> implements
ProgressLog, Runnable
+ class Instance extends IntrusiveLinkedList<Instance.State.Monitoring>
implements ProgressLog, Runnable
{
class State
{
@@ -272,7 +271,7 @@ public class SimpleProgressLog implements
ProgressLog.Factory
}
// exists only on home shard
- class DisseminateState extends Monitoring
+ class DisseminateState extends State.Monitoring
{
class CoordinateAwareness implements Callback<SimpleReply>
{
@@ -436,7 +435,7 @@ public class SimpleProgressLog implements
ProgressLog.Factory
}
}
- class BlockingState extends Monitoring
+ class BlockingState extends State.Monitoring
{
Known blockedUntil = Nothing;
@@ -524,7 +523,7 @@ public class SimpleProgressLog implements
ProgressLog.Factory
}
}
- class NonHomeState extends Monitoring
+ class NonHomeState extends State.Monitoring
{
NonHomeState()
{
@@ -778,14 +777,14 @@ public class SimpleProgressLog implements
ProgressLog.Factory
}
@Override
- public void addFirst(Monitoring add)
+ public void addFirst(State.Monitoring add)
{
super.addFirst(add);
ensureScheduled();
}
@Override
- public void addLast(Monitoring add)
+ public void addLast(State.Monitoring add)
{
throw new UnsupportedOperationException();
}
@@ -805,7 +804,7 @@ public class SimpleProgressLog implements
ProgressLog.Factory
isScheduled = false;
try
{
- for (Monitoring run : this)
+ for (State.Monitoring run : this)
{
if (run.shouldRun())
{
diff --git a/accord-core/src/test/java/accord/local/CommandTest.java
b/accord-core/src/test/java/accord/local/CommandTest.java
index 1ec969e..0a5599a 100644
--- a/accord-core/src/test/java/accord/local/CommandTest.java
+++ b/accord-core/src/test/java/accord/local/CommandTest.java
@@ -37,6 +37,7 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import javax.annotation.Nullable;
+import java.util.Arrays;
import java.util.List;
import java.util.Random;
import java.util.Set;
@@ -52,7 +53,7 @@ public class CommandTest
private static final Node.Id ID1 = id(1);
private static final Node.Id ID2 = id(2);
private static final Node.Id ID3 = id(3);
- private static final List<Node.Id> IDS = List.of(ID1, ID2, ID3);
+ private static final List<Node.Id> IDS = Arrays.asList(ID1, ID2, ID3);
private static final Range FULL_RANGE = IntKey.range(0, 100);
private static final Ranges FULL_RANGES = Ranges.single(FULL_RANGE);
private static final Topology TOPOLOGY = TopologyFactory.toTopology(IDS,
3, FULL_RANGE);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]