Examples of DataNode


Examples of org.apache.zookeeper_voltpatches.server.DataNode

     * @return size of the data
     */
    public long approximateDataSize() {
        long result = 0;
        for (Map.Entry<String, DataNode> entry : nodes.entrySet()) {
            DataNode value = entry.getValue();
            synchronized (value) {
                result += entry.getKey().length();
                result += (value.data == null ? 0
                        : value.data.length);
            }
View Full Code Here

Examples of org.chaidb.db.index.btree.DataNode

        final PageBufferManager buffer = btree.getBuffer();
        final BTreeSpec btreeSpec = btree.getBTreeSpec();
        PageNumber dupPageNumber = new PageNumber(nodePos.getPageNo());
        try {
            DataPage curDataPage = new DataPage(btree.getBtreeId(), dupPageNumber, btreeSpec, buffer);
            DataNode curDataNode = new DataNode(curDataPage, nodePos.getOffsetInPage());
            curDataNode.setFlags(BTreeSpec.DATA_NODE_DUP_NEXT);
            byte[] oldData = ByteTool.copyByteArray(curDataNode.getPage().getPage(), curDataNode.getNodeOffset(), (int) curDataNode.getNodeSpace());
            byte[] data = new byte[8];
            ByteTool.intToBytes(data, 0, nextNodePos.getOffsetInPage());
            ByteTool.intToBytes(data, 4, nextNodePos.getPageNo());
            curDataNode.storeNode(data, oldData, kContext);
            buffer.releasePage(btree.getBtreeId(), nodePos.getPageNo(), true);
        } catch (ChaiDBException e) {
            logger.error(e);
            buffer.releasePage(btree.getBtreeId(), nodePos.getPageNo(), false);
        }
View Full Code Here

Examples of org.chaidb.db.index.btree.DataNode

     *         node.nodeNextPosition is updated to the next position after the node,
     *         if the node is dup_next, nodeNextPosition stored the pointer. if link
     *         is end, nodeNextPosition will be null.
     */
    protected int getNode(DataPage dataPage, NodeInfo node) {
        DataNode dupDataNode = new DataNode(dataPage, node.nodePosition.getOffsetInPage());
        int nPageNo = node.nodePosition.getPageNo();
        int nOffset = node.nodePosition.getOffsetInPage();

        try {
            byte[] data = dupDataNode.getData();
            if (dupDataNode.isDupData()) {
                //This node is available value
                node.data = btree.decodeFromByteArray(data, null);
                node.nodeNextPosition = new NodePosition(nPageNo, nOffset + dupDataNode.getNodeSpace());
                return DUP_DATA;
            } else if (dupDataNode.isDupNext()) {
                node.data = null;
                int nextOffset = ByteTool.bytesToInt(data, 0, btree.getBTreeSpec().isMsbFirst());
                int nNextPageNumber = ByteTool.bytesToInt(data, 4, btree.getBTreeSpec().isMsbFirst());
                if ((nextOffset == nOffset) && (nNextPageNumber == nPageNo)) {
                    node.nodeNextPosition = null;
View Full Code Here

Examples of org.jboss.cache.DataNode

      option.setCacheModeLocal(true);
     
      Fqn backup = Fqn.fromString(BuddyManager.BUDDY_BACKUP_SUBTREE);
      backup = new Fqn(backup, "a");
      cache1.put(backup, null, option);
      DataNode target = cache1.get(backup);
     
      Fqn abc = Fqn.fromString("/a/b/c");
      cache2.put(abc, "name", JOE, option);
      Fqn ad = Fqn.fromString("/a/d");
      cache2.put(ad, "name", JANE, option);
View Full Code Here

Examples of org.jsoup.nodes.DataNode

                        + bootstrapLocation) + ");\n");

        appendMainScriptTagContents(context, builder);

        builder.append("//]]>");
        mainScriptTag.appendChild(new DataNode(builder.toString(),
                mainScriptTag.baseUri()));
        fragmentNodes.add(mainScriptTag);

    }
View Full Code Here

Examples of org.openide.loaders.DataNode

        cookies.add((Node.Cookie) DataEditorSupport.create(this, getPrimaryEntry(), cookies));
    }

    @Override
    protected Node createNodeDelegate() {
        return new DataNode(this, Children.LEAF, getLookup());
    }
View Full Code Here

Examples of org.pentaho.platform.api.repository2.unified.data.node.DataNode

        RepositoryFile metadata =
          unifiedRepository.getFile( etcMondrian + RepositoryFile.SEPARATOR + catalogName + RepositoryFile.SEPARATOR
            + "metadata" ); //$NON-NLS-1$

        if ( metadata != null ) {
          DataNode metadataNode =
            unifiedRepository.getDataForRead( metadata.getId(), NodeRepositoryFileData.class ).getNode();
          String datasourceInfo = metadataNode.getProperty( "datasourceInfo" ).getString(); //$NON-NLS-1$
          String definition = metadataNode.getProperty( "definition" ).getString(); //$NON-NLS-1$

          datasourcesXML.append( "<Catalog name=\"" + encoder.encodeForXML( catalogName ) + "\">\n" ); //$NON-NLS-1$ //$NON-NLS-2$
          datasourcesXML
            .append( "<DataSourceInfo>" + encoder.encodeForXML( datasourceInfo ) + "</DataSourceInfo>\n" ); //$NON-NLS-1$ //$NON-NLS-2$
          datasourcesXML.append( "<Definition>" + encoder.encodeForXML( definition ) + "</Definition>\n" ); //$NON-NLS-1$ //$NON-NLS-2$
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.