Package org.gridgain.grid.spi.indexing.h2

Examples of org.gridgain.grid.spi.indexing.h2.GridH2IndexingSpi$Schema


            return doc;
        }

        private void addSchema(Document doc, String id, SimpleFeatureType featureType) {
            Schema schema = doc.createAndAddSchema();
            schema.setId(id);
            schema.setName(id);
            for (AttributeDescriptor ad : featureType.getAttributeDescriptors()) {
                // skip geometry attributes
                if (ad instanceof GeometryDescriptor) {
                    continue;
                }

                SimpleField field = schema.createAndAddSimpleField();
                field.setName(ad.getLocalName());
                field.setType(getKmlFieldType(ad));
            }
        }
View Full Code Here


    /** {@inheritDoc} */
    @Override public void copyBytes(IndexOutput out, long numBytes) throws IOException {
        assert numBytes >= 0 : "numBytes=" + numBytes;

        GridLuceneOutputStream gridOut = out instanceof GridLuceneOutputStream ? (GridLuceneOutputStream)out : null;

        long left = numBytes;

        while (left > 0) {
            if (bufPosition == bufLength) {
                ++currBufIdx;

                switchCurrentBuffer(true);
            }

            final int bytesInBuf = bufLength - bufPosition;
            final int toCp = (int)(bytesInBuf < left ? bytesInBuf : left);

            if (gridOut != null)
                gridOut.writeBytes(currBuf + bufPosition, toCp);
            else {
                byte[] buff = new byte[toCp];

                mem.readBytes(currBuf + bufPosition, buff);

View Full Code Here

TOP

Related Classes of org.gridgain.grid.spi.indexing.h2.GridH2IndexingSpi$Schema

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.