*/
public class ShardReadWriteTransaction extends ShardWriteTransaction {
public ShardReadWriteTransaction(ReadWriteShardDataTreeTransaction transaction, ActorRef shardActor,
- ShardStats shardStats, String transactionID, short clientTxVersion) {
- super(transaction, shardActor, shardStats, transactionID, clientTxVersion);
+ ShardStats shardStats) {
+ super(transaction, shardActor, shardStats);
}
@Override
- public void handleReceive(Object message) throws Exception {
- if (message instanceof ReadData) {
- readData((ReadData) message, !SERIALIZED_REPLY);
-
- } else if (message instanceof DataExists) {
- dataExists((DataExists) message, !SERIALIZED_REPLY);
-
- } else if(ReadData.SERIALIZABLE_CLASS.equals(message.getClass())) {
- readData(ReadData.fromSerializable(message), SERIALIZED_REPLY);
-
- } else if(DataExists.SERIALIZABLE_CLASS.equals(message.getClass())) {
- dataExists(DataExists.fromSerializable(message), SERIALIZED_REPLY);
+ public void handleReceive(Object message) {
+ if(ReadData.isSerializedType(message)) {
+ readData(ReadData.fromSerializable(message));
+ } else if(DataExists.isSerializedType(message)) {
+ dataExists((DataExists) message);
} else {
super.handleReceive(message);
}