- public void handleReceive(Object message) throws Exception {
- if(message instanceof ReadData) {
- readData(transaction, (ReadData) message, !SERIALIZED_REPLY);
+ public void handleReceive(Object message) {
+ if (message instanceof CreateSnapshot) {
+ createSnapshot();
+ } else if(ReadData.isSerializedType(message)) {
+ readData(transaction, ReadData.fromSerializable(message));
+ } else if(DataExists.isSerializedType(message)) {
+ dataExists(transaction, DataExists.fromSerializable(message));
+ } else {
+ super.handleReceive(message);
+ }
+ }