01: /*
02: * All content copyright (c) 2003-2007 Terracotta, Inc., except as may otherwise be noted in a separate copyright
03: * notice. All rights reserved.
04: */
05: package com.tc.objectserver.handler;
06:
07: import com.tc.async.api.AbstractEventHandler;
08: import com.tc.async.api.EventContext;
09: import com.tc.object.msg.CompletedTransactionLowWaterMarkMessage;
10: import com.tc.object.tx.ServerTransactionID;
11: import com.tc.objectserver.gtx.ServerGlobalTransactionManager;
12:
13: public class TransactionLowWaterMarkHandler extends
14: AbstractEventHandler {
15:
16: private final ServerGlobalTransactionManager gtxm;
17:
18: public TransactionLowWaterMarkHandler(
19: ServerGlobalTransactionManager gtxm) {
20: this .gtxm = gtxm;
21: }
22:
23: public void handleEvent(EventContext context) {
24: CompletedTransactionLowWaterMarkMessage mdg = (CompletedTransactionLowWaterMarkMessage) context;
25: ServerTransactionID sid = new ServerTransactionID(mdg
26: .getClientID(), mdg.getLowWaterMark());
27: gtxm.clearCommitedTransactionsBelowLowWaterMark(sid);
28: }
29:
30: }
|