public RecoverAllTransactionsRequest() {
}
@Override
public void invoke() {
ClientEngine clientEngine = getClientEngine();
ClusterService clusterService = clientEngine.getClusterService();
Collection<MemberImpl> memberList = clusterService.getMemberList();
TransactionManagerServiceImpl service = getService();
List<Future<SerializableCollection>> futures = recoverTransactions(memberList);
Set<Data> xids = new HashSet<Data>();
for (Future<SerializableCollection> future : futures) {
try {
SerializableCollection collectionWrapper = future.get(RECOVER_TIMEOUT, TimeUnit.MILLISECONDS);
for (Data data : collectionWrapper) {
RecoveredTransaction rt = (RecoveredTransaction) clientEngine.toObject(data);
service.addClientRecoveredTransaction(rt);
xids.add(clientEngine.toData(rt.getXid()));
}
} catch (MemberLeftException e) {
ILogger logger = clientEngine.getLogger(RecoverAllTransactionsRequest.class);
logger.warning("Member left while recovering: " + e);
} catch (Throwable e) {
handleException(clientEngine, e);
}
}