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 class
Response.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 Response
aborted()
Create response for aborted transaction.Response
committed()
Create response for committed transaction.Response
duplicate(long seqId)
Create response for duplicate transaction open requests.static Response
empty()
Create emptyResponse
.static Response
forRequest(Request request)
CreateResponse
that is targetted to be response for given request.int
getPartitionIdForResponse()
boolean
hasPartitionIdForResponse()
boolean
hasSequenceId()
boolean
hasStamp()
Response
open(long seqId, long stamp)
Create response for open transaction.Response
updated()
-
-
-
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)
CreateResponse
that 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()
-
-