Ignore:
Timestamp:
07/12/13 23:41:06 (11 years ago)
Author:
psniegowski
Message:

HIGHLIGHTS:

  • add <include/> to configuration
  • add side notes to tree
    • used to store arbitrary information alongside the tree structure
  • migrate to log4j2
    • supports lazy string evaluation of passed arguments
  • improve GUI tree
    • it stays in synchronization with actual state (even in high load test scenario)
  • improve panel management in GUI
  • make loading objects in GUI more lazy
  • offload parsing to connection receiver thread
    • info parsing
    • first step of objects parsing
  • fix connection parsing bug (eof in long values)
  • support zero-arguments procedure in table view

CHANGELOG:
Implement procedure calls from table view.

Refactorization around procedures in tables.

Add table editor for buttons.

Render buttons in the the list view.

Further improve Columns.

Add Column class for TableModel?.

Accept also non-arguments ProcedureParams? in tableView.

Increase maximal TextAreaControl? size.

Add tooltip to ProcedureControl?.

Fix bug of interpreting eofs in long values by connection reader.

Further rework connection parsing.

Simplify client connection processing.

Test ListChange? modification.

Test ListChange? events with java server.

Add TestChild?.

Fix bug with fast deregistering when connecting to running server.

Another minor refactorization in TreeOperations?.

Fix bug in SimpleAbstractAccess? loading routine.

Another minor improvement.

Minor change.

Make reading of List objects two-phase.

Another minor change.

Dispatch parsing into receiver thread.

Another step.

Enclose passing value in ObjectParam? case in closure.

Minor step.

Minor change on way to offload parsing.

Temporarily comment out single ValueParam? get.

It will be generalized to multi ValueParam?.

Process info in receiver thread.

Add DispatchingExceptionHandler?.

Make waits in browser test longer.

Use FETCHED_MARK.

It is honored in GUI, where it used to decide whether to get values

after user action.

It is set in standard algorithm for processing fetched values.

Add remove operation to side notes.

Make loading more lazy.

Improve loading policy.

On node choose load itself, on node expansion, load children.

Minor improvement.

Fix bug with panel interleaving.

Minor improvements.

Improve panel management.

More cleaning around panels.

Reorganize panels.

Further improve tree.

Fix bug in TreeModel?.

Remove children from TreeNode?.

Implement TreeNode? hashCode and equals.

Make TreeNode? delegate equals and hashcode to internal reference.

Move listeners from TreeNode? to side notes.

Store path.textual as a side note.

Side note params instead of accesses for objects.

More refactorizations.

In TreeNode? bindAccess based on side notes.

Minor step.

Hide createAccess.

Rename AccessInterface? to Access.

Minor changes.

Several improvements in high load scenarios.

Change semantics of ArrayListAccess?.set(index, null);

It now removes the element, making list shorter
(it was set to null before).

Add path remove handler.

Handle exceptions in Connection.

Update .gitignore

Configure logging to file.

Move registration to TreeModel?.

Further refactorization.

Minor refactorization.

Minor improvements.

Use specialized event also for Modify action of ListChange?.

Use remove events.

Use the insertion events for tree.

Further improve tree refreshing.

Further improve reacting on events in GUI.

Fix problem with not adding objects on addition list change.

Migrate to log4j lazy String construction interface.

Migrate imports to log4j2.

Drop dependency on adapter to version 1.2.

Switch log4j implementation to log4j2.

Add dirty mark to the NodeAtFrame?.

Make selecting in AccessInterfaces? type safe.

Ignore containers size settings in Model and Genotype.

Use tree side notes to remember local changes and panels.

Add sideNotes to tree.

They will be used to store various accompanying information
right in the tree.

Use ReferenceIdentityMap? from apache in TreeNode?.

It suits the need perfectly (weak semantics on both key and value).

Make ArrayListParam? do not react size changes.

Guard in TableModel? before not yet loaded objects.

Add <include/> clause and AutoInjector?.

Extract common columns configuration to separate xml,
that can be included by other configurations.

Location:
java/main/src/main/java/com/framsticks/util
Files:
2 added
8 edited

Legend:

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

    r96 r100  
    11package com.framsticks.util;
    22
    3 import org.apache.log4j.Logger;
     3import org.apache.logging.log4j.Logger;
    44
    55import com.framsticks.util.dispatching.ExceptionResultHandler;
     
    2828                };
    2929        }
     30
     31        public static <T> T passThru(Logger log, String header, T value) {
     32                log.info("{}: {}", header, value);
     33                return value;
     34        }
    3035}
  • java/main/src/main/java/com/framsticks/util/Misc.java

    r88 r100  
    11package com.framsticks.util;
    22
    3 // import org.apache.log4j.Logger;
     3// import org.apache.logging.log4j.Logger;
    44
    55/**
     
    88public class Misc {
    99        // private static final Logger log =
    10         //      Logger.getLogger(Misc.class);
     10        //      LogManager.getLogger(Misc.class);
    1111
    1212        public static class WithType {
     
    3434
    3535        public static boolean equals(Object a, Object b) {
    36                 // log.info("equality of " + withType(a) + " ? " + withType(b));
     36                // log.info("equality of {} ? {}", withType(a), withType(b));
    3737                if (a != null) {
    3838                        return (b != null && a.equals(b));
  • java/main/src/main/java/com/framsticks/util/dispatching/AbstractJoinable.java

    r97 r100  
    1010
    1111import org.apache.commons.collections.CollectionUtils;
    12 import org.apache.log4j.Logger;
     12import org.apache.logging.log4j.Logger;
     13import org.apache.logging.log4j.LogManager;
    1314
    1415import com.framsticks.util.FramsticksException;
     
    1617public abstract class AbstractJoinable implements Joinable {
    1718
    18         private static final Logger log = Logger.getLogger(AbstractJoinable.class);
     19        private static final Logger log = LogManager.getLogger(AbstractJoinable.class);
    1920
    2021        protected final Set<JoinableParent> owners = new HashSet<JoinableParent>();
     
    4142                        }
    4243                }
    43                 log.debug("state: " + b);
     44                log.debug("state: {}", b);
    4445        }
    4546
     
    5354                this.state = state;
    5455
    55                 log.debug(this + " is notifying " + joinableListeners.size() + " parents");
     56                log.debug("{} is notifying {} parents", this, joinableListeners.size());
    5657
    5758                List<JoinableParent> parents = new LinkedList<>();
     
    141142                        }
    142143                        start = owners.isEmpty();
    143                         log.debug(owner + " is using " + this);
     144                        log.debug("{} is using {}", owner, this);
    144145                        owners.add(owner);
    145146                        joinableListeners.add(owner);
     
    161162                        }
    162163                        // assert owners.containsKey(owner);
    163                         log.debug(owner + " is droping " + this);
     164                        log.debug("{} is droping {}", owner, this);
    164165                        owners.remove(owner);
    165166                        stop = owners.isEmpty();
  • java/main/src/main/java/com/framsticks/util/dispatching/Dispatching.java

    r99 r100  
    11package com.framsticks.util.dispatching;
    22
    3 import org.apache.log4j.Logger;
     3import org.apache.logging.log4j.Logger;
     4import org.apache.logging.log4j.LogManager;
    45
    56import com.framsticks.util.FramsticksException;
     
    910 */
    1011public abstract class Dispatching {
    11         private static final Logger log = Logger.getLogger(Dispatching.class);
     12        private static final Logger log = LogManager.getLogger(Dispatching.class);
    1213
    1314        public static boolean isThreadSafe() {
     
    5758
    5859        public static void use(final Joinable joinable, final JoinableParent owner) {
    59                 log.debug("using " + joinable + " by " + owner);
     60                log.debug("using {} by {}", joinable, owner);
    6061                if (joinable.use(owner)) {
    61                         log.debug("started " + joinable);
     62                        log.debug("started {}", joinable);
    6263                } else {
    63                         log.debug("start of " + joinable + " already happened");
     64                        log.debug("start of {} already happened", joinable);
    6465                }
    6566        }
    6667
    6768        public static void drop(final Joinable joinable, final JoinableParent owner) {
    68                 log.debug("droping " + joinable + " by " + owner);
     69                log.debug("droping {} by {}", joinable, owner);
    6970                if (joinable.drop(owner)) {
    70                         log.debug("stoped " + joinable);
     71                        log.debug("stoped {}", joinable);
    7172                } else {
    72                         log.debug("stop of " + joinable + " deferred");
     73                        log.debug("stop of {} deferred", joinable);
    7374                }
    7475        }
    7576
    7677        public static void join(Joinable joinable) throws InterruptedException {
    77                 log.debug("joining " + joinable);
     78                log.debug("joining {}", joinable);
    7879                try {
    7980                        joinable.join();
    8081                } catch (InterruptedException e) {
    81                         log.debug("failed to join " + joinable);
     82                        log.debug("failed to join {}", joinable);
    8283                        throw e;
    8384                }
    84                 log.debug("joined " + joinable);
     85                log.debug("joined {}", joinable);
    8586        }
    8687
     
    9293                        @Override
    9394                        protected void runAt() {
    94                                 log.debug("joinable " + joinable + " is notifying parent " + parent + " about change to " + state);
     95                                log.debug("joinable {} is notifying parent {} about change to {}", joinable, parent, state);
    9596                                parent.childChangedState(joinable, state);
    9697                        }
     
    108109
    109110        public static void joinAbsolutely(Joinable joinable) {
    110                 log.debug("joining absolutely " + joinable);
     111                log.debug("joining absolutely {}", joinable);
    111112                while (true) {
    112113                        try {
     
    116117                                // throw new FramsticksException().msg("failed to join").arg("dispatcher", dispatcher).cause(e);
    117118                        }
    118                         log.debug("waiting for " + joinable);
     119                        log.debug("waiting for {}", joinable);
    119120                        wait(joinable, 500);
    120121                }
  • java/main/src/main/java/com/framsticks/util/dispatching/Monitor.java

    r96 r100  
    11package com.framsticks.util.dispatching;
    22
    3 import org.apache.log4j.Logger;
     3import org.apache.logging.log4j.Logger;
     4import org.apache.logging.log4j.LogManager;
    45import com.framsticks.util.dispatching.Dispatching;
    56import java.lang.Thread;
     
    78public class Monitor implements JoinableParent {
    89        private static final Logger log =
    9                 Logger.getLogger(Monitor.class);
     10                LogManager.getLogger(Monitor.class);
    1011
    1112        protected final Joinable joinable;
     
    3031                Runtime.getRuntime().addShutdownHook(shutdownHook);
    3132
    32                 log.debug(this + " is using");
     33                log.debug("{} is using", this);
    3334                Dispatching.use(joinable, this);
    3435                return this;
     
    4142
    4243        public Monitor waitFor() {
    43                 log.debug(this + " is waiting");
     44                log.debug("{} is waiting", this);
    4445                synchronized (this) {
    4546                        while (joinable.getState().ordinal() < JoinableState.FINISHING.ordinal()) {
     
    4748                        }
    4849                }
    49                 log.debug(this + " ended waiting");
     50                log.debug("{} ended waiting", this);
    5051                return this;
    5152        }
     
    5354
    5455        public Monitor drop() {
    55                 log.debug(this + " is droping");
     56                log.debug("{} is droping", this);
    5657                Dispatching.drop(joinable, this);
    5758                return this;
     
    5960
    6061        public Monitor join() {
    61                 log.debug(this + " is joining");
     62                log.debug("{} is joining", this);
    6263                Dispatching.joinAbsolutely(joinable);
    63                 log.debug(this + " is joined");
     64                log.debug("{} is joined", this);
    6465
    6566                try {
     
    7879                        this.notify();
    7980                }
    80                 log.debug(this + " received notification about transition to " + state);
     81                log.debug("{} received notification about transition to {}", this, state);
    8182        }
    8283
  • java/main/src/main/java/com/framsticks/util/dispatching/Thread.java

    r99 r100  
    11package com.framsticks.util.dispatching;
    22
    3 import org.apache.log4j.Logger;
     3import org.apache.logging.log4j.Logger;
     4import org.apache.logging.log4j.LogManager;
    45
    56import java.util.LinkedList;
     
    1516public class Thread<C> extends AbstractJoinable implements JoinableDispatcher<C> {
    1617
    17         private static final Logger log = Logger.getLogger(Thread.class);
     18        private static final Logger log = LogManager.getLogger(Thread.class);
    1819
    1920        protected final java.lang.Thread thread;
     
    4647
    4748        protected void routine() {
    48                 log.debug("starting thread " + this);
     49                log.debug("starting thread {}", this);
    4950                assert getMonitor() != null;
    5051                ExceptionHandler exceptionHandler = getMonitor().getTaskExceptionHandler();
     
    8384                        }
    8485                }
    85                 log.debug("finishing thread " + this);
     86                log.debug("finishing thread {}", this);
    8687                finish();
    8788        }
     
    138139        protected void joinableJoin() throws InterruptedException {
    139140                thread.join(500);
    140                 log.debug("joined " + this);
     141                log.debug("joined {}", this);
    141142        }
    142143
  • java/main/src/main/java/com/framsticks/util/lang/Casting.java

    r99 r100  
    2929                return class_.cast(object);
    3030        }
     31
     32        public static <T> T nullOrThrowCast(Class<T> class_, Object object) {
     33                if (object == null) {
     34                        return null;
     35                }
     36                return class_.cast(object);
     37        }
    3138}
  • java/main/src/main/java/com/framsticks/util/lang/FlagsUtil.java

    r99 r100  
    22
    33import java.lang.reflect.Field;
    4 import org.apache.log4j.Logger;
     4import org.apache.logging.log4j.Logger;
     5import org.apache.logging.log4j.LogManager;
    56
    67import com.framsticks.util.lang.Delimeted;
     
    89public final class FlagsUtil {
    910
    10         private final static Logger log = Logger.getLogger(FlagsUtil.class);
     11        private final static Logger log = LogManager.getLogger(FlagsUtil.class);
    1112
    1213        private FlagsUtil() {
     
    4142                                        allFlags |= Integer.parseInt(field.get(null).toString());
    4243                                } catch (SecurityException e) {
    43                                         log.warn("security exception was thrown while trying to read flag (" + flag + ")");
     44                                        log.warn("security exception was thrown while trying to read flag ({})", flag);
    4445                                } catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException e) {
    45                                         log.warn("selected flag is not known (" + flag + ")");
     46                                        log.warn("selected flag is not known ({})", flag);
    4647                                }
    4748                        }
Note: See TracChangeset for help on using the changeset viewer.