Examples of entryToObject()


Examples of com.sleepycat.je.rep.vlsn.VLSNRange.VLSNRangeBinding.entryToObject()

            OperationStatus status = cursor.getSearchKey(key, data,
                                                         LockMode.DEFAULT);
            if (status == OperationStatus.SUCCESS) {
                /* initialize the range from the database. */
                VLSNRangeBinding rangeBinding = new VLSNRangeBinding();
                range = rangeBinding.entryToObject(data);
                lastOnDiskVLSN = range.getLast();
            } else if (status == OperationStatus.NOTFOUND) {
                /* No mappings exist before. */
                range = VLSNRange.EMPTY;
            } else {
View Full Code Here

Examples of com.sleepycat.je.rep.vlsn.VLSNRange.VLSNRangeBinding.entryToObject()

                 */
                OperationStatus status =
                    cursor.getFirst(key, data, LockMode.DEFAULT);
                if (status == OperationStatus.SUCCESS) {
                    VLSNRangeBinding rangeBinding = new VLSNRangeBinding();
                    dbRange = rangeBinding.entryToObject(data);

                    /* Collect info about the  buckets. */
                    while (cursor.getNext(key, data, LockMode.DEFAULT) ==
                           OperationStatus.SUCCESS) {

View Full Code Here

Examples of com.sleepycat.je.sync.impl.LogChangeSet.LogChangeSetBinding.entryToObject()

        /* Go over the whole list. */
        LogChangeSetBinding binding = new LogChangeSetBinding();
        long minValue = Long.MAX_VALUE;
        for (Map.Entry<String, DatabaseEntry> entry : changeSets.entrySet()) {
            LogChangeSet changeSet = binding.entryToObject(entry.getValue());
            syncStarts.put(entry.getKey(), changeSet.getNextSyncStart());
            /* Find the minSyncStart. */
            if (doCompare(minValue, changeSet.getNextSyncStart()) > 0) {
                minValue = changeSet.getNextSyncStart();
            }
View Full Code Here

Examples of com.sleepycat.je.sync.impl.LogChangeSet.LogChangeSetBinding.entryToObject()

                    syncStartInfos =
                        new ConcurrentHashMap<String, StartInfo>();
                    txnIdToSyncStarts.put(txn.getId(), syncStartInfos);
                }
                LogChangeSetBinding binding = new LogChangeSetBinding();
                LogChangeSet set = binding.entryToObject(data);
                StartInfo startInfo =
                    new StartInfo(set.getNextSyncStart(), isDelete);
                syncStartInfos.put(dataSetName, startInfo);
            }
        }
View Full Code Here

Examples of com.sleepycat.persist.impl.PersistEntityBinding.entryToObject()

        /* Write object, read it back and validate (compare) it. */
        PersistEntityBinding entityBinding =
            new PersistEntityBinding(catalog, entityCls.getName(), false);
        entityBinding.objectToData(entity, dataEntry);
        entityBinding.objectToKey(entity, keyEntry);
        Object entity2 = entityBinding.entryToObject(keyEntry, dataEntry);
        entity.validate(entity2);

        /* Read back the primary key and validate it. */
        PersistKeyBinding keyBinding =
            new PersistKeyBinding(catalog, keyCls.getName(), false);
View Full Code Here

Examples of com.sleepycat.persist.impl.PersistKeyBinding.entryToObject()

        entity.validate(entity2);

        /* Read back the primary key and validate it. */
        PersistKeyBinding keyBinding =
            new PersistKeyBinding(catalog, keyCls.getName(), false);
        Object priKey2 = keyBinding.entryToObject(keyEntry);
        assertEquals(priKey, priKey2);
        keyBinding.objectToEntry(priKey2, keyEntry2);
        assertEquals(keyEntry, keyEntry2);

        /* Check raw entity binding. */
 
View Full Code Here

Examples of org.apache.qpid.server.store.berkeleydb.ContentTB.entryToObject()

                {
                    _bytesSeenSoFar = 0;
                }

                //determine the content size
                ByteBuffer content = (ByteBuffer) contentTB.entryToObject(value);
                int contentSize = content.limit();

                //create the new key: id + previously seen data count
                MessageContentKey_5 newKey = new MessageContentKey_5(msgId, _bytesSeenSoFar);
                DatabaseEntry newKeyEntry = new DatabaseEntry();
View Full Code Here

Examples of org.apache.qpid.server.store.berkeleydb.ExchangeTB.entryToObject()

       
        DatabaseVisitor exchangeListVisitor = new DatabaseVisitor()
        {          
            public void visit(DatabaseEntry key, DatabaseEntry value) throws DatabaseException
            {
                ExchangeRecord exchangeRec = (ExchangeRecord) exchangeTB.entryToObject(value);
                AMQShortString type = exchangeRec.getType();

                if (ExchangeDefaults.TOPIC_EXCHANGE_CLASS.equals(type))
                {
                    topicExchanges.add(exchangeRec.getNameShortString());
View Full Code Here

Examples of org.apache.qpid.server.store.berkeleydb.tuple.ConfiguredObjectBinding.entryToObject()

            ConfiguredObjectBinding configuredObjectBinding = ConfiguredObjectBinding.getInstance();

            OperationStatus status = _configuredObjectsDb.get(null, key, value, LockMode.DEFAULT);
            if (status == OperationStatus.SUCCESS)
            {
                ConfiguredObjectRecord queueRecord = configuredObjectBinding.entryToObject(value);
                ConfiguredObjectRecord newQueueRecord = _configuredObjectHelper.updateQueueConfiguredObject(queue, queueRecord);

                // write the updated entry to the store
                configuredObjectBinding.objectToEntry(newQueueRecord, newValue);
                status = _configuredObjectsDb.put(null, key, newValue);
View Full Code Here

Examples of org.apache.qpid.server.store.berkeleydb.tuple.ContentBinding.entryToObject()

            int written = 0;
            OperationStatus status = _messageContentDb.get(null, contentKeyEntry, value, LockMode.READ_UNCOMMITTED);
            if (status == OperationStatus.SUCCESS)
            {
                byte[] dataAsBytes = contentTupleBinding.entryToObject(value);
                int size = dataAsBytes.length;
                if (offset > size)
                {
                    throw new RuntimeException("Offset " + offset + " is greater than message size " + size
                            + " for message id " + messageId + "!");
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.