Examples of CollectionStore


Examples of org.exist.storage.index.CollectionStore

            }
        }

        public boolean indexInfo( Value key, long pointer ) throws TerminatedException
        {
            final CollectionStore store = (CollectionStore)( (NativeBroker)broker ).getStorage( NativeBroker.COLLECTIONS_DBX_ID );
            final int             docId = CollectionStore.DocumentKey.getDocumentId( key );

            if( !exportedDocs.contains( docId ) ) {

                try {
                    final byte              type    = key.data()[key.start() + Collection.LENGTH_COLLECTION_ID + DocumentImpl.LENGTH_DOCUMENT_TYPE];
                    final VariableByteInput istream = store.getAsStream( pointer );
                    DocumentImpl      doc     = null;

                    if( type == DocumentImpl.BINARY_FILE ) {
                        doc = new BinaryDocument( broker.getBrokerPool() );
                    } else {
View Full Code Here

Examples of org.exist.storage.index.CollectionStore

            }

            //Initialize collections storage
            collectionsDb = (CollectionStore) config.getProperty(CollectionStore.getConfigKeyForFile());
            if(collectionsDb == null) {
                collectionsDb = new CollectionStore(pool, COLLECTIONS_DBX_ID, dataDir, config);
            }
            if(collectionsDb.isReadOnly()) {
                LOG.warn(collectionsDb.getFile().getName() + " is read-only!");
                pool.setReadOnly();
            }
View Full Code Here

Examples of org.exist.storage.index.CollectionStore

        private DocumentCallback(DBBroker broker) {
            this.broker = broker;
        }

        public boolean indexInfo(Value key, long pointer) throws TerminatedException {
            final CollectionStore store = (CollectionStore) ((NativeBroker)broker).getStorage(NativeBroker.COLLECTIONS_DBX_ID);
            try {
                final byte type = key.data()[key.start() + Collection.LENGTH_COLLECTION_ID + DocumentImpl.LENGTH_DOCUMENT_TYPE];
                final VariableByteInput istream = store.getAsStream(pointer);
                DocumentImpl doc = null;
                if (type == DocumentImpl.XML_FILE) {
                    doc = new DocumentImpl(broker.getBrokerPool());
                    doc.read(istream);
                    updateDocument(broker, doc);
View Full Code Here

Examples of org.jpox.store.scostore.CollectionStore

            JPOXLogger.REACHABILITY.debug(LOCALISER.msg("007009", fmd.getFullFieldName()));
        }

        // Update the datastore with this value of collection (clear old elements and add new ones)
        // TODO Consider making this more efficient picking the ones to remove/add
        CollectionStore backingStore = ((CollectionStore) storeMgr.getBackingStoreForField(sm.getObjectManager().getClassLoaderResolver(),fmd, value.getClass()));

        backingStore.clear(sm);
        backingStore.addAll(sm, value, 0);

        // Replace the field with a wrapper containing these elements
        replaceFieldWithWrapper(sm, value, false, false);
    }
View Full Code Here

Examples of org.jpox.store.scostore.CollectionStore

     * @return The backing store of this collection in this store
     */
    private CollectionStore getBackingStoreForCollection(AbstractMemberMetaData fmd, 
            ClassLoaderResolver clr, Class type)
    {
        CollectionStore store = null;
        DatastoreContainerObject datastoreTable = getDatastoreContainerObject(fmd);
        if (type==null)
        {
            // No type to base it on so create it based on the field declared type
            if (datastoreTable == null)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.