minor database API change

This commit is contained in:
2021-01-14 23:13:11 +01:00
parent 26e8ea8a51
commit 0372e03abb
16 changed files with 206 additions and 199 deletions

View File

@ -76,6 +76,7 @@ public interface IWaveform extends IHierNode {
*
* @return the width
*/
public int getWidth();
public int getRowCount();
public void calculateConcurrency();
}

View File

@ -123,31 +123,31 @@ public class WaveformDb extends HierNode implements IWaveformDb, PropertyChangeL
*/
@Override
public boolean load(File inp) {
boolean retval = true;
for (IWaveformDbLoader loader : loaders) {
if (loader.canLoad(inp)) {
loader.addPropertyChangeListener(this);
try {
loader.addPropertyChangeListener(this);
loader.load(this, inp);
loader.removePropertyChangeListener(this);
for (IWaveform w : loader.getAllWaves()) {
waveforms.put(w.getFullName(), w);
}
if (loader.getMaxTime() > maxTime) {
maxTime = loader.getMaxTime();
}
if (name == null)
name = getFileBasename(inp.getName());
buildHierarchyNodes();
relationTypes.addAll(loader.getAllRelationTypes());
pcs.firePropertyChange(IHierNode.LOADING_FINISHED, null, null);
loaded = true;
return true;
} catch (Exception e) {
return false;
retval=false;
}
loader.removePropertyChangeListener(this);
for (IWaveform w : loader.getAllWaves()) {
waveforms.put(w.getFullName(), w);
}
if (loader.getMaxTime() > maxTime) {
maxTime = loader.getMaxTime();
}
if (name == null)
name = getFileBasename(inp.getName());
buildHierarchyNodes();
relationTypes.addAll(loader.getAllRelationTypes());
}
}
return false;
pcs.firePropertyChange(IHierNode.LOADING_FINISHED, null, null);
loaded = true;
return retval;
}
/**

View File

@ -55,13 +55,6 @@ public interface ITx extends Comparable<ITx> {
*/
public Long getEndTime();
/**
* Gets the concurrency index.
*
* @return the concurrency index
*/
public int getConcurrencyIndex();
/**
* Gets the attributes.
*

View File

@ -30,4 +30,12 @@ public interface ITxEvent extends IEvent {
* @return the transaction
*/
public ITx getTransaction();
/**
* Gets the concurrency index.
*
* @return the concurrency index
*/
public int getRowIndex();
}