protected void boardCast() throws Exception {
        byte[] text = StringUtils.fullSpace(Code.SERVER_HEARTBEAT.getCode()).getBytes();
        List<SelectionKey> selects = new ArrayList<SelectionKey>(selector.keys());
        for (SelectionKey key : selects) {
            if (key.channel() instanceof SocketChannel) {
                key.interestOps(SelectionKey.OP_READ);
            }
        }
        List<String> sharedKeys = new ArrayList(sharedChannels.keySet());
        for (String sharedKey : sharedKeys) {
            SocketChannel sharedChannel = sharedChannels.get(sharedKey);
            if (sharedChannel != null) {
                try {
                    System.out.println("Boardcast to " + sharedKey);
                    sharedChannel.write(ByteBuffer.wrap(text));
                } catch (Exception e) {
                    e.printStackTrace();
                }
                List<SocketChannel> sharedRepliChannels = replicationChannels.get(sharedKey);
                if (sharedRepliChannels != null && !sharedRepliChannels.isEmpty()) {
                    for (SocketChannel sharedRepliChannel : sharedRepliChannels) {
                        try {
                            sharedRepliChannel.write(ByteBuffer.wrap(text));
                        } catch (Exception e) {
                            e.printStackTrace();
                        }
                    }
                }
            }
        }
    }