本文整理汇总了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);
}
示例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);
}
示例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));
}
示例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) + ']';
}
示例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);
}
}
示例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);
}