Package cz.o2.proxima.core.transaction
Class Response
- java.lang.Object
-
- cz.o2.proxima.core.transaction.Response
-
- All Implemented Interfaces:
java.io.Serializable
@Internal public class Response extends java.lang.Object implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classResponse.Flags
-
Constructor Summary
Constructors Constructor Description Response()Response(Response.Flags flags, long seqId, long stamp, int targetPartitionId)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Responseaborted()Create response for aborted transaction.Responsecommitted()Create response for committed transaction.Responseduplicate(long seqId)Create response for duplicate transaction open requests.static Responseempty()Create emptyResponse.static ResponseforRequest(Request request)CreateResponsethat is targetted to be response for given request.intgetPartitionIdForResponse()booleanhasPartitionIdForResponse()booleanhasSequenceId()booleanhasStamp()Responseopen(long seqId, long stamp)Create response for open transaction.Responseupdated()
-
-
-
Constructor Detail
-
Response
public Response()
-
Response
public Response(Response.Flags flags, long seqId, long stamp, int targetPartitionId)
-
-
Method Detail
-
forRequest
public static Response forRequest(Request request)
CreateResponsethat is targetted to be response for given request.
-
open
public Response open(long seqId, long stamp)
Create response for open transaction.- Returns:
- response for open transaction
-
updated
public Response updated()
-
committed
public Response committed()
Create response for committed transaction.- Returns:
- response for committed transaction.
-
aborted
public Response aborted()
Create response for aborted transaction.- Returns:
- response for aborted transaction.
-
duplicate
public Response duplicate(long seqId)
Create response for duplicate transaction open requests.- Returns:
- response for duplicate transaction open requests.
-
hasSequenceId
public boolean hasSequenceId()
-
hasStamp
public boolean hasStamp()
-
getPartitionIdForResponse
public int getPartitionIdForResponse()
-
hasPartitionIdForResponse
public boolean hasPartitionIdForResponse()
-
-