package com.itjw.txviewer.database.text import java.beans.PropertyChangeListener; import java.util.List; import java.util.Map; import com.itjw.txviewer.database.ITrDb import com.itjw.txviewer.database.ITrGenerator import com.itjw.txviewer.database.ITrHierNode import com.itjw.txviewer.database.ITrStream import com.itjw.txviewer.database.ITransaction class TrStream extends TrHierNode implements ITrStream { Long id; TrTextDb database String name; String fullName; String kind; def generators = []; def childs = [] private allTransactions; public TrHierNode(String name){ this.name=name } @Override public List getChildNodes() { return childs.sort{it.name}; } TrStream(int id, TrTextDb db, String name, String kind){ this.id=id this.database=db this.name=name this.fullName=name this.kind=kind } List getGenerators(){ return generators as List } @Override public ITrDb getDb() { return database; } @Override public int getMaxConcurrrentTx() { def rowendtime = [0] getTransactions().each{Transaction tx -> def rowIdx = 0 for(rowIdx=0; rowendtime.size()tx.beginTime.value; rowIdx++); if(rowendtime.size<=rowIdx){ rowendtime< getTransactions() { if(!allTransactions) allTransactions=generators.transactions.flatten().sort{it.beginTime.value} return allTransactions } }