org.siebengeisslein.util
Class BitMaskUtil

java.lang.Object
  extended by org.siebengeisslein.util.BitMaskUtil

public final class BitMaskUtil
extends java.lang.Object

Layout of oids: bit contain ------------------------ 0..61 oid 62 nofollow flag (in a reference: object should not be loaded on heuristics). 63 new flag (object does not have a final oid yet). Layout of the values in the BTree: ------------------------ 0..61 Position of value in file 61 store file, that contains the entry (datastorestate.getActiveFile()) 62 GC: evaluated 63 GC: references


Field Summary
static long GC_EVALUATED_MASK
           
static long GC_REFERENCED_MASK
           
static long NEW_MASK
           
static long NO_FOLLOW_MASK
           
static long NO_GC_MASK
           
static long OID_MASK
           
static long POSITION_MASK
           
 
Method Summary
static int getFile(long pos)
           
static boolean isGCEvaluated(long oid)
           
static boolean isGCReferenced(long oid)
           
static boolean isInActiveFile(long pos, int activefile)
           
static boolean isNewOID(long oid)
           
static boolean isNoFollowOID(long oid)
           
static long setBits(int start, int end)
           
static long setFile(long pos, int file)
           
static long setGCEvaluated(long oid)
           
static long setGCReferenced(long oid)
           
static long setNoFollow(long oid)
           
static long unsetFile(long pos)
           
static long unsetGCFlags(long oid)
           
static long unsetNoFollowFlag(long oid)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NEW_MASK

public static final long NEW_MASK
See Also:
Constant Field Values

NO_FOLLOW_MASK

public static final long NO_FOLLOW_MASK
See Also:
Constant Field Values

GC_REFERENCED_MASK

public static final long GC_REFERENCED_MASK
See Also:
Constant Field Values

GC_EVALUATED_MASK

public static final long GC_EVALUATED_MASK
See Also:
Constant Field Values

OID_MASK

public static final long OID_MASK

NO_GC_MASK

public static final long NO_GC_MASK

POSITION_MASK

public static final long POSITION_MASK
Method Detail

setBits

public static final long setBits(int start,
                                 int end)

isNewOID

public static final boolean isNewOID(long oid)

isNoFollowOID

public static final boolean isNoFollowOID(long oid)

setGCReferenced

public static final long setGCReferenced(long oid)

isGCReferenced

public static final boolean isGCReferenced(long oid)

setGCEvaluated

public static final long setGCEvaluated(long oid)

isGCEvaluated

public static final boolean isGCEvaluated(long oid)

unsetGCFlags

public static final long unsetGCFlags(long oid)

unsetNoFollowFlag

public static final long unsetNoFollowFlag(long oid)

setNoFollow

public static long setNoFollow(long oid)

isInActiveFile

public static boolean isInActiveFile(long pos,
                                     int activefile)

getFile

public static int getFile(long pos)

setFile

public static long setFile(long pos,
                           int file)

unsetFile

public static long unsetFile(long pos)