@Override
    public void run() {
        long before = System.currentTimeMillis();
        while (this._running) {
            try {
                this.selector.select(this.period);
            } catch (IOException e) {
                logger.log(Level.SEVERE, "Problem during select", e);
            }

            Set<SelectionKey> keys = this.selector.selectedKeys();
            Iterator<SelectionKey> iterator = keys.iterator();
            while (iterator.hasNext()) {

                SelectionKey key = iterator.next();

                iterator.remove();
                try {
                    processSelection(key);
                } catch (Throwable e) {
                    e.printStackTrace();
                    logger.log(Level.WARNING, "Problem during key processing", e);
                    if (key != null) {
                        key.cancel();
                    }
                }
                key = null;
            }

            try {
                this.server.processScheduledStatuses();
            } catch (Throwable t) {
                logger.log(Level.SEVERE, "Problem while processing scheduled statuses", t);
            }

            try {
                //TODO - FRV  <Done> Enable after testing
                this.server.sendServerKeepAliveMessage();
            } catch (Throwable t) {
                logger.log(Level.SEVERE, "Problem while sending Keep alive messages to all servers", t);
            }

            try {
                //TODO - FRV  <Done> Enable after testing
                this.server.processDisconnection();
            } catch (Throwable t) {
                logger.log(Level.SEVERE, "Problem while processing disconnection events", t);
            }

            keys = null;
            iterator = null;

            System.gc();
            long now = System.currentTimeMillis();
            if (now - before > 10000) {
                System.out.println();
                logger.log(Level.WARNING, "\n***** totalMemory = {0} \t***** freeMemory = {1} *****", new Object[]{rt.totalMemory(), rt.freeMemory()});
                before = now;
            }
        }
    }