当前位置: 首页>>代码示例>>Java>>正文


Java U.hexLong方法代码示例

本文整理汇总了Java中org.apache.ignite.internal.util.typedef.internal.U.hexLong方法的典型用法代码示例。如果您正苦于以下问题:Java U.hexLong方法的具体用法?Java U.hexLong怎么用?Java U.hexLong使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.ignite.internal.util.typedef.internal.U的用法示例。


在下文中一共展示了U.hexLong方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: slice

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override public DirectMemoryRegion slice(long offset) {
    if (offset < 0 || offset >= size)
        throw new IllegalArgumentException("Failed to create a memory region slice [ptr=" + U.hexLong(addr) +
            ", len=" + size + ", offset=" + offset + ']');

    return new UnsafeChunk(addr + offset, size - offset);
}
 
开发者ID:apache,项目名称:ignite,代码行数:9,代码来源:MappedFile.java

示例2: slice

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override public DirectMemoryRegion slice(long offset) {
    if (offset < 0 || offset >= len)
        throw new IllegalArgumentException("Failed to create a memory region slice [ptr=" + U.hexLong(ptr) +
            ", len=" + len + ", offset=" + offset + ']');

    return new UnsafeChunk(ptr + offset, len - offset);
}
 
开发者ID:apache,项目名称:ignite,代码行数:9,代码来源:UnsafeChunk.java

示例3: checkPageId

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
 * @param pageId Page ID.
 * @param pageAddr Page address.
 */
public static void checkPageId(long pageId, long pageAddr) {
    long actual = PageIO.getPageId(pageAddr);

    // Page ID must be 0L for newly allocated page, for reused page effective ID must remain the same.
    if (actual != 0L && pageId != actual)
        throw new IllegalStateException("Page ID: " + U.hexLong(actual));
}
 
开发者ID:apache,项目名称:ignite,代码行数:12,代码来源:BPlusTreeSelfTest.java

示例4: toString

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override public String toString() {
    return "I [idxName=" + new String(idxName) + ", pageId=" + U.hexLong(pageId) + ']';
}
 
开发者ID:apache,项目名称:ignite,代码行数:5,代码来源:IndexStorageImpl.java

示例5: checkFile

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
 *
 */
private long checkFile() throws IgniteCheckedException {
    try {
        ByteBuffer hdr = ByteBuffer.allocate(headerSize()).order(ByteOrder.LITTLE_ENDIAN);

        while (hdr.remaining() > 0)
            fileIO.read(hdr);

        hdr.rewind();

        long signature = hdr.getLong();

        if (SIGNATURE != signature)
            throw new IgniteCheckedException("Failed to verify store file (invalid file signature)" +
                " [expectedSignature=" + U.hexLong(SIGNATURE) +
                ", actualSignature=" + U.hexLong(signature) + ']');

        int ver = hdr.getInt();

        if (version() != ver)
            throw new IgniteCheckedException("Failed to verify store file (invalid file version)" +
                " [expectedVersion=" + version() +
                ", fileVersion=" + ver + "]");

        byte type = hdr.get();

        if (this.type != type)
            throw new IgniteCheckedException("Failed to verify store file (invalid file type)" +
                " [expectedFileType=" + this.type +
                ", actualFileType=" + type + "]");

        int pageSize = hdr.getInt();

        if (dbCfg.getPageSize() != pageSize)
            throw new IgniteCheckedException("Failed to verify store file (invalid page size)" +
                " [expectedPageSize=" + dbCfg.getPageSize() +
                ", filePageSize=" + pageSize + "]");

        long fileSize = cfgFile.length();

        if (fileSize == headerSize()) // Every file has a special meta page.
            fileSize = pageSize + headerSize();

        if ((fileSize - headerSize()) % pageSize != 0)
            throw new IgniteCheckedException("Failed to verify store file (invalid file size)" +
                " [fileSize=" + U.hexLong(fileSize) +
                ", pageSize=" + U.hexLong(pageSize) + ']');

        return fileSize;
    }
    catch (IOException e) {
        throw new IgniteCheckedException("File check failed", e);
    }
}
 
开发者ID:apache,项目名称:ignite,代码行数:57,代码来源:FilePageStore.java

示例6: formatPageId

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
 * @param x Long.
 * @return String.
 */
private static String formatPageId(long x) {
    return U.hexLong(x);
}
 
开发者ID:apache,项目名称:ignite,代码行数:8,代码来源:BPlusTree.java


注:本文中的org.apache.ignite.internal.util.typedef.internal.U.hexLong方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。