class GridContinuousQueryBatch extends GridContinuousBatchAdapter {
    /** Entries size included filtered entries. */
    private final AtomicInteger size = new AtomicInteger();

    /** {@inheritDoc} */
    @Override public void add(Object obj) {<FILL_FUNCTION_BODY>}

    /**
     * @return Entries count.
     */
    public int entriesCount() {
        return size.get();
    }
}

        assert obj != null;
        assert obj instanceof CacheContinuousQueryEntry || obj instanceof List;

        if (obj instanceof CacheContinuousQueryEntry) {
            buf.add(obj);

            size.incrementAndGet();
        }
        else {
            List<Object> objs = (List<Object>)obj;

            buf.addAll(objs);

            size.addAndGet(objs.size());
        }
    
<methods>public non-sealed void <init>() ,public void add(java.lang.Object) ,public Collection<java.lang.Object> collect() ,public int size() <variables>protected final FastSizeDeque<java.lang.Object> buf