public class ReservationReceipt
extends java.lang.Object
implements java.io.Serializable
ReservationReceipt
class holds information about the reservation made by the client with the seed or core.
The seeds might either return ACCEPTED, DENIED or BUSY based on the load of the seed.LightningController.reserve()
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
ReservationReceipt.State |
Constructor and Description |
---|
ReservationReceipt(ReservationReceipt.State accepted,
java.lang.String id,
int load) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
int |
getBusyWithLoad()
Get the load of the seed while making reservation for the request.
|
java.lang.String |
getId()
Get the request id for which reservation is made.
|
int |
getLoad()
Get the load of the request.
|
ReservationReceipt.State |
getState()
Get the state returned by the seed.
|
int |
hashCode() |
void |
setBusyWithLoad(int busyWithLoad)
Set the load of the seed while making reservation for the request.
|
void |
setId(java.lang.String id)
Set the request id for which reservation is made.
|
void |
setLoad(int load)
Set the load of the request.
|
void |
setState(ReservationReceipt.State state)
Set the state for the request.
|
java.lang.String |
toString() |
public ReservationReceipt(ReservationReceipt.State accepted, java.lang.String id, int load)
public ReservationReceipt.State getState()
public void setState(ReservationReceipt.State state)
state
- ACCEPTED, DENIED or BUSYpublic java.lang.String getId()
public void setId(java.lang.String id)
id
- the request idpublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int getLoad()
public void setLoad(int load)
load
- the load of the requestpublic java.lang.String toString()
toString
in class java.lang.Object
public int getBusyWithLoad()
public void setBusyWithLoad(int busyWithLoad)
busyWithLoad
- the load of the seed while making reservation for the request