class Append<K, V> extends Put<K, V, K> {

        public Append(BTreeMap<K, V> map, V value, AsyncHandler<AsyncResult<K>> resultHandler) {
            super(map, null, value, resultHandler);
        }

        @Override
        protected Page gotoLeafPage() { // 直接定位到最后一页
            Page p = map.getRootPage();
            while (true) {
                if (p.isLeaf()) {
                    return p;
                }
                p = p.getChildPage(map.getChildPageCount(p) - 1);
            }
        }

        @Override
        protected int getKeyIndex() {
            return -(p.getKeyCount() + 1);
        }

        @Override
        @SuppressWarnings("unchecked")
        protected Object writeLocal(int index, Scheduler scheduler) {<FILL_FUNCTION_BODY>}
    }

            long k = map.incrementAndGetMaxKey();
            if (map.getKeyType() == ValueLong.type)
                key = (K) Long.valueOf(k);
            else
                key = (K) ValueLong.get(k);
            insertLeaf(index, value); // 执行insertLeaf的过程中已经把当前页标记为脏页了
            return key;
        
<no_super_class>