Record Class LLFaultInjection
java.lang.Object
java.lang.Record
com.io7m.looseleaf.server.api.LLFaultInjection
- Record Components:
databaseCrashProbability- The probability that a database access will crash
Fault injection configuration.
-
Constructor Summary
ConstructorsConstructorDescriptionLLFaultInjection(double databaseCrashProbability) Creates an instance of aLLFaultInjectionrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thedatabaseCrashProbabilityrecord component.voidPotentially throw an I/O exception based on the database crash probability.static LLFaultInjectiondisabled()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LLFaultInjection
public LLFaultInjection(double databaseCrashProbability) Creates an instance of aLLFaultInjectionrecord class.- Parameters:
databaseCrashProbability- the value for thedatabaseCrashProbabilityrecord component
-
-
Method Details
-
disabled
- Returns:
- The configuration with no fault injection
-
databaseFaultInject
Potentially throw an I/O exception based on the database crash probability.- Throws:
IOException- Sometimes
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
databaseCrashProbability
public double databaseCrashProbability()Returns the value of thedatabaseCrashProbabilityrecord component.- Returns:
- the value of the
databaseCrashProbabilityrecord component
-