diff options
| author | Paul Buetow <paul@buetow.org> | 2025-06-22 16:45:17 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-06-22 16:45:17 +0300 |
| commit | 4c16cc3c4da7bbf8375d7951185db1761eb396bf (patch) | |
| tree | 19199b664ce802ed3e967e318e6d4ffeb8c9bf39 /src/main/java/examples/TestRaftLoading.java | |
| parent | 464df52901e2dcb84eb81a22f2db19cbf17e5a9f (diff) | |
Remove all Raft protocol code
Removed all Raft-related code as it was not working properly:
- Removed VSRaftProtocol.java implementation
- Removed all Raft test files
- Removed Raft example/demo files
- Removed Raft documentation
- Removed Raft simulation files (.dat)
- Removed Raft scripts
- Updated VSRegisteredEvents to remove Raft registration
- Updated SimulationBuilder to remove RAFT constant
- Updated SimulationFactory to remove Raft methods
- Updated SimulationBuilderTest to remove Raft tests
- Updated pom.xml to remove Raft test configurations
The protocol had issues with leader election not completing in GUI mode.
🤖 Generated with Claude Code
https://claude.ai/code
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'src/main/java/examples/TestRaftLoading.java')
| -rw-r--r-- | src/main/java/examples/TestRaftLoading.java | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/src/main/java/examples/TestRaftLoading.java b/src/main/java/examples/TestRaftLoading.java deleted file mode 100644 index ebad379..0000000 --- a/src/main/java/examples/TestRaftLoading.java +++ /dev/null @@ -1,57 +0,0 @@ -package examples; - -import events.VSRegisteredEvents; -import prefs.VSDefaultPrefs; -import java.util.Vector; - -/** - * Test if Raft protocol is properly registered and loadable - */ -public class TestRaftLoading { - public static void main(String[] args) { - // Initialize - VSDefaultPrefs prefs = new VSDefaultPrefs(); - prefs.fillWithDefaults(); - VSRegisteredEvents.init(prefs); - - // List all registered protocols - System.out.println("=== Registered Protocols ==="); - Vector<String> protocolNames = VSRegisteredEvents.getProtocolNames(); - for (String name : protocolNames) { - String className = VSRegisteredEvents.getClassnameByEventname(name); - System.out.println(name + " -> " + className); - } - - System.out.println("\n=== Protocol Classnames ==="); - Vector<String> protocolClassnames = VSRegisteredEvents.getProtocolClassnames(); - for (String className : protocolClassnames) { - String shortName = VSRegisteredEvents.getShortnameByClassname(className); - System.out.println(className + " (short: " + shortName + ")"); - } - - // Check Raft specifically - System.out.println("\n=== Raft Protocol Check ==="); - String raftClass = "protocols.implementations.VSRaftProtocol"; - String raftShortName = VSRegisteredEvents.getShortnameByClassname(raftClass); - String raftEventName = VSRegisteredEvents.getNameByClassname(raftClass); - - System.out.println("Class: " + raftClass); - System.out.println("Short name: " + raftShortName); - System.out.println("Event name: " + raftEventName); - - // Try to load the class - try { - Class<?> clazz = Class.forName(raftClass); - System.out.println("Class loaded successfully: " + clazz.getName()); - - // Check if it's a protocol - if (protocols.VSAbstractProtocol.class.isAssignableFrom(clazz)) { - System.out.println("✓ Is a valid protocol class"); - } else { - System.out.println("✗ NOT a protocol class!"); - } - } catch (ClassNotFoundException e) { - System.out.println("✗ Class not found: " + e.getMessage()); - } - } -}
\ No newline at end of file |
