class HpackContext {

    public Entry add(HttpField field) {
        Entry entry = new Entry(field);
        int size = entry.getSize();
        if (size > maxDynamicTableSizeInBytes) {
            if (LOG.isDebugEnabled())
                LOG.debug(String.format("HdrTbl[%x] !added size %d>%d", hashCode(), size, maxDynamicTableSizeInBytes));
            dynamicTable.evictAll();
            return null;
        }
        dynamicTableSizeInBytes += size;
        dynamicTable.add(entry);
        fieldMap.put(field, entry);
        nameMap.put(StringUtils.asciiToLowerCase(field.getName()), entry);

        if (LOG.isDebugEnabled())
            LOG.debug(String.format("HdrTbl[%x] added %s", hashCode(), entry));
        dynamicTable.evict();
        return entry;
    }

    public  HpackContext(int maxDynamicTableSize);

}