Package jline.examples.java.advanced
Class EnvBreakdownExample
java.lang.Object
jline.examples.java.advanced.EnvBreakdownExample
Example demonstrating the node breakdown/repair API for random environments.
This example shows how to easily model a server that can break down and be
repaired using the new Environment convenience methods.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidExample 1: Using addNodeFailureRepair convenience method with node object (recommended).static voidExample 2: Using separate breakdown and repair calls with node object.static voidExample 3: With custom reset policies using node object.static voidExample 4: Modifying reset policies after creation using node object.static voidExample 5: Solve the environment model and display results.static voidMain method to run all examples.
-
Constructor Details
-
EnvBreakdownExample
public EnvBreakdownExample()
-
-
Method Details
-
example1_basicFailureRepair
public static void example1_basicFailureRepair()Example 1: Using addNodeFailureRepair convenience method with node object (recommended). -
example2_separateCalls
public static void example2_separateCalls()Example 2: Using separate breakdown and repair calls with node object. -
example3_customResetPolicies
public static void example3_customResetPolicies()Example 3: With custom reset policies using node object. -
example4_modifyResetPolicies
public static void example4_modifyResetPolicies()Example 4: Modifying reset policies after creation using node object. -
example5_solveEnvironment
Example 5: Solve the environment model and display results.- Throws:
Exception
-
main
Main method to run all examples.
-