public final class MetaBucket extends Object implements IBucket
This bucket stored variable key -> value mappings, whereas elements must implement the IMetaEntry
s.
Constructor and Description |
---|
MetaBucket(long pBucketKey)
Create name bucket.
|
Modifier and Type | Method and Description |
---|---|
Set<Map.Entry<IMetaEntry,IMetaEntry>> |
entrySet()
Getting the entry set of the bucket.
|
boolean |
equals(Object obj) |
IMetaEntry |
get(IMetaEntry pKey)
Getting an entry.
|
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.
|
int |
hashCode() |
IMetaEntry |
put(IMetaEntry pKey,
IMetaEntry pVal)
Putting an entry to the map.
|
IMetaEntry |
remove(IMetaEntry pKey)
Removing an element within this bucket
|
com.google.common.hash.HashCode |
secureHash()
Getting a secure hash for a bucket.
|
void |
serialize(DataOutput pOutput)
Serializing to given dataput
|
int |
size()
Getting the size.
|
String |
toString() |
public MetaBucket(long pBucketKey)
pBucketKey
- key of this bucketpublic IMetaEntry put(IMetaEntry pKey, IMetaEntry pVal)
pKey
- to be stored.pVal
- to be stored.ConcurrentHashMap.put(Object, Object)
public IMetaEntry get(IMetaEntry pKey)
pKey
- to be retrievedConcurrentHashMap.get(Object)
public int size()
ConcurrentHashMap.size()
public Set<Map.Entry<IMetaEntry,IMetaEntry>> entrySet()
ConcurrentHashMap.entrySet()
public IMetaEntry remove(IMetaEntry pKey)
pKey
- to be removedConcurrentHashMap.remove(Object)
public void serialize(DataOutput pOutput) throws TTIOException
serialize
in interface IBucket
pOutput
- to serialize toTTIOException
public long getBucketKey()
getBucketKey
in interface IBucket
public com.google.common.hash.HashCode secureHash()
secureHash
in interface IBucket
Copyright © 2013. All Rights Reserved.