Package me.ahoo.cosid.machine
Class MachineIdOverflowException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
me.ahoo.cosid.CosIdException
me.ahoo.cosid.machine.MachineIdOverflowException
- All Implemented Interfaces:
Serializable
Exception thrown when machine ID cannot be allocated.
Indicates that all available machine IDs have been allocated and no more can be distributed.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMachineIdOverflowException(int totalMachineIds, InstanceId instanceId) Creates a new exception. -
Method Summary
Modifier and TypeMethodDescriptionGets the instance ID.intGets the total number of machine IDs.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
MachineIdOverflowException
Creates a new exception.- Parameters:
totalMachineIds- the total number of available machine IDsinstanceId- the instance that failed to get an ID
-
-
Method Details
-
getTotalMachineIds
public int getTotalMachineIds()Gets the total number of machine IDs.- Returns:
- the total machine IDs
-
getInstanceId
Gets the instance ID.- Returns:
- the instance ID
-