page.java
来自「这个是perst-269.zip下面的SOURCECODE,和大家分享了。」· Java 代码 · 共 30 行
JAVA
30 行
package org.garret.perst.impl;
public class Page extends LRU implements Comparable {
Page collisionChain;
int accessCount;
int writeQueueIndex;
int state;
long offs;
byte data[];
static final int psDirty = 0x01;// page has been modified
static final int psRaw = 0x02;// page is loaded from the disk
static final int psWait = 0x04;// other thread(s) wait load operation completion
public static final int pageSizeLog = 12;
public static final int pageSize = 1 << pageSizeLog;
public int compareTo(Object o)
{
long po = ((Page)o).offs;
return offs < po ? -1 : offs == po ? 0 : 1;
}
Page()
{
data = new byte[pageSize];
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?