class PortChainManager extends AbstractListenerManager<PortChainEvent, PortChainListener> implements
        PortChainService {

    @Override
    public boolean updatePortChain(PortChain portChain) {
        checkNotNull(portChain, PORT_CHAIN_NULL);
        PortChain oldPortChain = null;
        if (!portChainStore.containsKey(portChain.portChainId())) {
            log.warn("The portChain is not exist whose identifier was {} ",
                     portChain.portChainId().toString());
            return false;
        } else {
            oldPortChain = portChainStore.get(portChain.portChainId());
        }
        PortChain newPortChain = DefaultPortChain.create(portChain, oldPortChain);
        portChainStore.put(newPortChain.portChainId(), newPortChain);

        if (!newPortChain.equals(portChainStore.get(newPortChain.portChainId()))) {
            log.debug("The portChain is updated failed whose identifier was {} ",
                      newPortChain.portChainId().toString());
            return false;
        }
        return true;
    }

}