public final class RevisionRootBucket extends Object implements IReferenceBucket
Revision root bucket holds a reference to the name bucket as well as the static data-bucket tree.
Modifier and Type | Field and Description |
---|---|
static int |
META_REFERENCE_OFFSET
Offset of name bucket reference.
|
GUARANTEED_INDIRECT_OFFSET
Constructor and Description |
---|
RevisionRootBucket(long pBucketKey,
long pRevision,
long pMaxDataKey)
Constructor of RevisionRootBuckets.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
long |
getBucketKey()
Getting the key of a bucket for dereferencing over any pointers as well, the access in the log and for
retrieving buckets from the persistent storage.
|
long |
getMaxDataKey()
Get last allocated data key.
|
byte[][] |
getReferenceHashs()
Getting the HashValues mapped to the references guarding the integrity of the referenced buckets.
|
long[] |
getReferenceKeys()
Getting the keys of the referenced buckets.
|
long |
getRevision()
Getting revision of this root bucket.
|
int |
hashCode() |
long |
incrementMaxDataKey()
Increment number of datas by one while allocating another key.
|
com.google.common.hash.HashCode |
secureHash()
Getting a secure hash for a bucket.
|
void |
serialize(DataOutput pOutput)
Serializing to given dataput
|
void |
setReferenceHash(int pIndex,
byte[] pHash)
Setting the hash of a referenced bucket to this bucket.
|
void |
setReferenceKey(int pIndex,
long pKey)
Setting one key of a bucket to be referenced from this bucket.
|
String |
toString() |
public static final int META_REFERENCE_OFFSET
public RevisionRootBucket(long pBucketKey, long pRevision, long pMaxDataKey)
pBucketKey
- Key of this bucketpRevision
- to be createdpMaxDataKey
- maximal data key givenpublic long getMaxDataKey()
public long incrementMaxDataKey()
public long getRevision()
public void serialize(DataOutput pOutput) throws TTIOException
serialize
in interface IBucket
pOutput
- to serialize toTTIOException
public long getBucketKey()
getBucketKey
in interface IBucket
public long[] getReferenceKeys()
getReferenceKeys
in interface IReferenceBucket
public void setReferenceKey(int pIndex, long pKey)
setReferenceKey
in interface IReferenceBucket
pIndex
- offset of the key to be referencedpKey
- the key of the bucket to be referencedpublic byte[][] getReferenceHashs()
getReferenceHashs
in interface IReferenceBucket
public void setReferenceHash(int pIndex, byte[] pHash)
setReferenceHash
in interface IReferenceBucket
pIndex
- where the hash should be applied topHash
- to be stored inpublic com.google.common.hash.HashCode secureHash()
secureHash
in interface IBucket
Copyright © 2013. All Rights Reserved.