public final class IndirectBucket extends Object implements IReferenceBucket
Indirect bucket holds a set of references to build a reference tree.
GUARANTEED_INDIRECT_OFFSET
Constructor and Description |
---|
IndirectBucket(long pBucketKey)
Create indirect bucket.
|
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.
|
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.
|
int |
hashCode() |
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 IndirectBucket(long pBucketKey)
pBucketKey
- Key of the bucketpublic 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.