Ignore:
Timestamp:
07/16/13 23:31:35 (11 years ago)
Author:
psniegowski
Message:

HIGHLIGHTS:

for Joinables running

CHANGELOG:
Add WorkPackageLogic? and classes representing prime experiment state.

Add classes for PrimeExperiment? state.

Extract single netload routine in Simulator.

Working netload with dummy content in PrimeExperiment?.

More development with NetLoadSaveLogic? and PrimeExperiment?.

Improvement around prime.

Improve BufferedDispatcher?.isActive logic.

Add prime-all.xml configuration.

Manual connecting to existing simulators from GUI.

Guard in SimulatorConnector? against expdef mismatch.

Guard against empty target dispatcher in BufferedDispatcher?.

Make BufferedDispatcher? a Dispatcher (and Joinable).

Minor improvements.

Done StackedJoinable?, improve Experiment.

Develop StackedJoinable?.

Add StackedJoinable? utility joinables controller.

Add dependency on apache-commons-lang.

Add ready ListChange? on Simulators.

Improve hints in ListChange?.

Several improvements.

Found bug with dispatching in Experiment.

Minor improvements.

Fix bug with early finishing Server.

Many changes in Dispatching.

Fix bug with connection.

Do not obfuscate log with socket related exceptions.

Add SocketClosedException?.

Add SimulatorConnector?.

Work out conception of experiment composing of logics building blocks.

Rename SinkInterface? to Sink.

Move saving of Accesses into AccessOperations?.

Some improvements to Experiment.

Improve joinables.

Fix issue with joinables closing.

Add direct and managed consoles to popup menu.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • java/main/src/main/java/com/framsticks/util/dispatching/AbstractJoinable.java

    r101 r102  
    1818
    1919        private static final Logger log = LogManager.getLogger(AbstractJoinable.class);
     20        private static final Logger reportLog = LogManager.getLogger(AbstractJoinable.class.getName() + ".Report");
    2021
    2122        protected final Set<JoinableParent> owners = new HashSet<JoinableParent>();
     
    3536        }
    3637
     38
     39
    3740        public static void report() {
     41                if (!reportLog.isDebugEnabled()) {
     42                        return;
     43                }
    3844                StringBuilder b = new StringBuilder();
    3945                synchronized (joinablesRegistry) {
     
    4248                        }
    4349                }
    44                 log.debug("state: {}", b);
     50                reportLog.debug("state: {}", b);
    4551        }
    4652
     
    5359                }
    5460                this.state = state;
    55 
    56                 log.debug("{} is notifying {} parents", this, joinableListeners.size());
     61                log.debug("{} changed state to {}", this, state);
     62
    5763
    5864                List<JoinableParent> parents = new LinkedList<>();
     
    6167                for (JoinableParent p : parents) {
    6268                        if (p != null) {
     69                                log.debug("{} is notifying parent {} about change to {}", this, p, state);
    6370                                Dispatching.childChangedState(p, this, state);
    6471                        }
     
    110117                }
    111118                joinableJoin();
    112                 synchronized (this) {
    113                         this.state = JoinableState.JOINED;
    114                 }
     119                changeState(JoinableState.JOINED);
     120                // synchronized (this) {
     121                //      this.state = JoinableState.JOINED;
     122                // }
    115123        }
    116124
     
    158166                synchronized (this) {
    159167                        if (!owners.contains(owner)) {
    160                                 return false;
    161                                 // throw new FramsticksException().msg("object is not owning that joinable").arg("joinable", this).arg("object", owner);
     168                                // log.error("owner {} is not owning that joinable {}", owner, this);
     169                                // return false;
     170                                throw new FramsticksException().msg("object is not owning that joinable").arg("joinable", this).arg("object", owner);
    162171                        }
    163172                        // assert owners.containsKey(owner);
    164                         log.debug("{} is droping {}", owner, this);
    165173                        owners.remove(owner);
    166174                        stop = owners.isEmpty();
     175                        log.debug("{} is droping {} (users remaining: {})", owner, this, owners);
    167176                }
    168177                if (stop) {
     
    195204        @Override
    196205        public String toString() {
    197                 return getName();
     206                return getClass().getSimpleName() + "(" + getName() + ")";
    198207        }
    199208
     
    203212        }
    204213
    205 
    206214}
Note: See TracChangeset for help on using the changeset viewer.