public final class UberBucket extends Object implements IReferenceBucket
Uber bucket holds a reference to the static revision root bucket tree.
GUARANTEED_INDIRECT_OFFSET
Constructor and Description |
---|
UberBucket(long pBucketKey,
long pRevisionCount,
long pBucketCounter)
New uber bucket
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
long |
getBucketCounter()
Getter for mBucketCounter.
|
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.
|
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 |
getRevisionNumber()
Get revision key of current in-memory state.
|
int |
hashCode() |
long |
incrementBucketCounter()
Incrementing the counter.
|
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 UberBucket(long pBucketKey, long pRevisionCount, long pBucketCounter)
pBucketKey
- key of this bucketpRevisionCount
- count of all revisions in this storagepBucketCounter
- Counter for all bucketspublic long getRevisionNumber()
public void serialize(DataOutput pOutput) throws TTIOException
serialize
in interface IBucket
pOutput
- to serialize toTTIOException
public long getBucketKey()
getBucketKey
in interface IBucket
public long incrementBucketCounter()
public long getBucketCounter()
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.