fName = name;
TmfSignalManager.register(this);
}
+
+ public TmfComponent(TmfComponent oldComponent) {
+ this.fName = oldComponent.fName;
+ // Should we register? Probably not but I'm not quite sure what this does
+ //register();
+ }
+
// ------------------------------------------------------------------------
// ITmfComponent
// ------------------------------------------------------------------------
TmfProviderManager.register(fType, this);
}
+
+ public TmfDataProvider(TmfDataProvider<T> oldDataProvider) {
+ super(oldDataProvider);
+
+ this.fType = oldDataProvider.fType;
+ this.fQueueSize = oldDataProvider.fQueueSize;
+
+ this.fExecutor = new TmfRequestExecutor();
+ this.fDataQueue = (oldDataProvider.fQueueSize > 1) ? new LinkedBlockingQueue<T>(oldDataProvider.fQueueSize) : new SynchronousQueue<T>();
+ this.fSynchDepth = oldDataProvider.fSynchDepth;
+ }
+
@Override
public void dispose() {
TmfProviderManager.deregister(fType, this);
public TmfEventProvider(Class<T> type, int queueSize) {
super("TmfEventProvider", type, queueSize);
}
-
+
+ public TmfEventProvider(TmfEventProvider<T> oldProvider) {
+ super(oldProvider);
+ }
+
@Override
public boolean isCompleted(ITmfDataRequest<T> request, T data, int nbRead) {
boolean dataRequestCompleted = super.isCompleted(request, data, nbRead);
public TmfExperiment(Class<T> type, String id, ITmfTrace[] traces, int indexPageSize) {
this(type, id, traces, TmfTimestamp.Zero, indexPageSize);
}
-
+
+
+ public TmfExperiment(TmfExperiment<T> oldExperiment) {
+ super(oldExperiment.fType);
+
+ this.fExperimentId = oldExperiment.fExperimentId;
+ this.fEpoch = oldExperiment.fEpoch;
+
+ this.fIndexPageSize = oldExperiment.fIndexPageSize;
+
+ this.fTraces = new ITmfTrace[oldExperiment.fTraces.length];
+
+ for ( int x=0; x<oldExperiment.fTraces.length; x++) {
+ this.fTraces[x] = oldExperiment.fTraces[x].createTraceCopy();
+ }
+
+ // replace updateNbEvents()
+ this.fNbEvents = oldExperiment.fNbEvents;
+
+ // replace updateTimeRange()
+ this.fTimeRange = oldExperiment.fTimeRange;
+ }
+
+ public TmfExperiment<T> createTraceCopy() {
+ return new TmfExperiment<T>(this);
+ }
+
+
/**
*
*/
* <p>
*/
public interface ITmfTrace {
-
+
+ public ITmfTrace createTraceCopy();
+
+
/**
* @return the trace path
*/