Package xbird.util.resource

Examples of xbird.util.resource.PropertyMap


        for(Map.Entry<String, DTMDocument> entry : map.entrySet()) {
            String docName = entry.getKey();
            DTMDocument doc = entry.getValue();
            IDocumentTable doctbl = doc.documentTable();
            DocumentTableModel dtm = doc.getDataModel();
            PropertyMap props = col.getCollectionProperties();
            LabelingHandler handler = new LabelingHandler(doctbl, col, docName, props);
            dtm.export(0L, handler);
            doctbl.close();
        }
        return true;
View Full Code Here


        this._block[(int) (at >> PAGE_SHIFT)][(int) (at & PAGE_MASK)] |= flag;
    }

    public void flush(final DbCollection coll, final String docName) throws IOException,
            DbException {
        PropertyMap properties = coll.getCollectionProperties();

        // #1 sync local symbol table with shared symbol table
        if(BUILDIDX_AT_BULKLOAD) {
            flushAuxiliaries(coll, docName, properties);
        }
        coll.flushSymbols();

        // #2 write properties
        writeProperties(docName, properties);

        // #3 write str chunk
        _strChunk.flush(coll, docName, properties);

        properties.save();

        // #4 write block in segment paged files
        FixedSegments paged = getPaged(coll, docName);
        pageOutSegments(paged, 0, true);
        close();
View Full Code Here

        this._block[(int) (at >> PAGE_SHIFT)][(int) (at & PAGE_MASK)] |= flag;
    }

    public void flush(final DbCollection coll, final String docName) throws IOException,
            DbException {
        PropertyMap properties = coll.getCollectionProperties();

        // #1 sync local symbol table with shared symbol table
        if(BUILDIDX_AT_BULKLOAD) {
            flushAuxiliaries(coll, docName, properties);
        }
        coll.flushSymbols();

        // #2 write properties
        writeProperties(docName, properties);

        // #3 write str chunk
        _strChunk.flush(coll, docName, properties);

        properties.save();

        // #4 write block in segment paged files
        FixedSegments paged = getPaged(coll, docName);
        pageOutSegments(paged, 0, true);
        close();
View Full Code Here

public final class StringChunkLoader {

    private StringChunkLoader() {}

    public static IStringChunk load(final DbCollection coll) throws IOException {
        PropertyMap props = coll.getCollectionProperties();
        File chunkFile = getChunkFile(coll);
        VarSegments paged = new VarSegments(chunkFile, DescriptorType.hash);
        IStringChunk sc = new PagedStringChunk2(paged, props);
        return sc;
    }
View Full Code Here

                    _cache.remove(id);
                }
            }
        }

        final PropertyMap docProps = coll.getCollectionProperties();
        final String dtmClass = docProps.getProperty(IDocumentTable.KEY_DTM_CLASS + docName);
        final IDocumentTable newTable;
        if(MemoryMappedDocumentTable.MMDTM_CLASS.equals(dtmClass) || (dtmClass == null && USE_MMAP)) {
            newTable = new MemoryMappedDocumentTable(coll, docName, docProps, true);
        } else if(DocumentTable.DTM_CLASS.equals(dtmClass)) {
            if(PROFILE_ACCESS_PATTERN != null) {
                newTable = new ProfiledPersistentDocumentTable(PROFILE_ACCESS_PATTERN, coll, docName, docProps);
            } else {
                newTable = DocumentTable.load(coll, docName, docProps);
            }
        } else if(BigDocumentTable.DTM_CLASS.equals(dtmClass)) {
            newTable = BigDocumentTable.load(coll, docName, docProps);
        } else {
            throw new IllegalStateException("dtmp file format '" + dtmClass + "' is illegal: "
                    + docProps.getFile().getAbsolutePath());
        }
        synchronized(_cache) {
            _cache.put(id, newTable); // intended that two or more DTM table are created concurrently.
        }
        return newTable;
View Full Code Here

    }

    public void flush(final DbCollection coll, final String docName) throws IOException,
            DbException {
        // #1 write properties
        PropertyMap properties = coll.getCollectionProperties();
        writeProperties(docName, properties);

        // #2 write QName table
        coll.flushSymbols();

        // #3 write str chunk
        _strChunk.flush(coll, docName, properties);

        properties.save();

        _mmfile.flush();
        _mmfile.close();
    }
View Full Code Here

    private static PropertyMap generatePropertyMap(String colDir, String colName)
            throws IOException {
        String propFilename = colName + DTM_PROPS_FILE_SUFFIX;
        File propFile = new File(colDir, propFilename);
        if(!propFile.exists()) {
            return new PropertyMap(propFile);
        }
        PropertyMap map = PropertyMap.load(propFile);
        return map;
    }
View Full Code Here

    private static PropertyMap generatePropertyMap(String colDir, String colName)
            throws IOException {
        String propFilename = colName + DTM_PROPS_FILE_SUFFIX;
        File propFile = new File(colDir, propFilename);
        if(!propFile.exists()) {
            return new PropertyMap(propFile);
        }
        PropertyMap map = PropertyMap.load(propFile);
        return map;
    }
View Full Code Here

        this._block[(int) (at >> PAGE_SHIFT)][(int) (at & PAGE_MASK)] |= flag;
    }

    public void flush(final DbCollection coll, final String docName) throws IOException,
            DbException {
        PropertyMap properties = coll.getCollectionProperties();

        // #1 sync local symbol table with shared symbol table
        if(BUILDIDX_AT_BULKLOAD) {
            flushAuxiliaries(coll, docName, properties);
        }
        coll.flushSymbols();

        // #2 write properties
        writeProperties(docName, properties);

        // #3 write str chunk
        _strChunk.flush(coll, docName, properties);

        properties.save();

        // #4 write block in segment paged files
        FixedSegments paged = getPaged(coll, docName);
        pageOutSegments(paged, 0, true);
        close();
View Full Code Here

            } else {
                _cache.remove(id);
            }
        }

        final PropertyMap docProps = coll.getCollectionProperties();
        final String dtmClass = docProps.getProperty(IDocumentTable.KEY_DTM_CLASS + docName);
        final IDocumentTable table;
        if(MemoryMappedDocumentTable.MMDTM_CLASS.equals(dtmClass) || dtmClass == null) {
            table = new MemoryMappedDocumentTable(coll, docName, docProps, true);
        } else if(DocumentTable.DTM_CLASS.equals(dtmClass)) {
            if(USE_MMAP) {
                table = new MemoryMappedDocumentTable(coll, docName, docProps, true);
            } else {
                if(PROFILE_ACCESS_PATTERN != null) {
                    table = new ProfiledPersistentDocumentTable(PROFILE_ACCESS_PATTERN, coll, docName, docProps);
                } else {
                    table = DocumentTable.load(coll, docName, docProps);
                }
            }
        } else if(BigDocumentTable.DTM_CLASS.equals(dtmClass)) {
            table = BigDocumentTable.load(coll, docName, docProps);
        } else {
            throw new IllegalStateException("dtmp file format '" + dtmClass + "' is illegal: "
                    + docProps.getFile().getAbsolutePath());
        }
        _cache.put(id, table); // intended that two or more DTM table are created concurrently.
        return table;
    }
View Full Code Here

TOP

Related Classes of xbird.util.resource.PropertyMap

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.