use of com.arjuna.ats.arjuna.coordinator.RecordListIterator in project narayana by jbosstm.
the class RecoveryBACoordinator method setRecoveryCoordinator.
/**
* provide the recovered participants with a handle on this coordinator so they can
* propagate events through to it.
*/
public void setRecoveryCoordinator() {
if (preparedList != null) {
RecordListIterator iter = new RecordListIterator(preparedList);
AbstractRecord absRec = iter.iterate();
while (absRec != null) {
if (absRec instanceof ParticipantRecord) {
ParticipantRecord pr = (ParticipantRecord) absRec;
}
absRec = iter.iterate();
}
}
}
use of com.arjuna.ats.arjuna.coordinator.RecordListIterator in project narayana by jbosstm.
the class RecoveringTransaction method getParticipants.
public List<RESTRecord> getParticipants(List<RESTRecord> participants) {
RecordListIterator iter = new RecordListIterator(preparedList);
AbstractRecord recordBeingHandled;
while (((recordBeingHandled = iter.iterate()) != null)) {
if (recordBeingHandled.activate()) {
if (recordBeingHandled.typeIs() == RecordType.RESTAT_RECORD) {
participants.add((RESTRecord) recordBeingHandled);
} else {
log.warnf("Could not reactivate participant %s of transaction %s", recordBeingHandled.get_uid(), get_uid());
}
}
}
return participants;
}
use of com.arjuna.ats.arjuna.coordinator.RecordListIterator in project narayana by jbosstm.
the class Transaction method savePendingList.
private void savePendingList() {
if (pendingList == null || pending != null)
return;
RecordListIterator i = new RecordListIterator(pendingList);
AbstractRecord r;
pending = new ArrayList<>();
while ((r = i.iterate()) != null) {
if (r instanceof LRARecord) {
pending.add((LRARecord) r);
}
}
}
use of com.arjuna.ats.arjuna.coordinator.RecordListIterator in project narayana by jbosstm.
the class Transaction method getRecoveryCoordinatorUrls.
public void getRecoveryCoordinatorUrls(Map<String, String> participants, RecordList list) {
RecordListIterator iter = new RecordListIterator(list);
AbstractRecord rec;
while (((rec = iter.iterate()) != null)) {
if (rec instanceof LRARecord) {
// rec.typeIs() == LRARecord.getTypeId()) {
LRARecord lraRecord = (LRARecord) rec;
participants.put(lraRecord.getRecoveryCoordinatorURL().toExternalForm(), lraRecord.getParticipantPath());
}
}
}
use of com.arjuna.ats.arjuna.coordinator.RecordListIterator in project narayana by jbosstm.
the class RecoveringLRA method moveTo.
private void moveTo(RecordList fromList, RecordList toList) {
RecordListIterator i = new RecordListIterator(fromList);
AbstractRecord record;
while ((record = fromList.getFront()) != null) toList.putFront(record);
}
Aggregations