public class SimpleCuckooTable extends java.lang.Object implements CuckooTable
| Constructor and Description |
|---|
SimpleCuckooTable(BitSet bitSet,
int numBuckets,
int tagsPerBucket,
int bitsPerTag)
Create a single cuckoo table on given bit set.
|
| Modifier and Type | Method and Description |
|---|---|
TagPosition |
deleteTag(int bucketIndex,
int tag)
Delete a tag in specified bucket and return its position.
|
TagPosition |
findTag(int bucketIndex,
int tag)
Find a tag in specified bucket and return its position.
|
TagPosition |
findTag(int bucketIndex1,
int bucketIndex2,
int tag)
Find a tag in specified two buckets and return its position.
|
int |
getBitsPerTag() |
int |
getNumBuckets() |
int |
getNumTagsPerBuckets() |
int |
getSizeInBytes() |
int |
getSizeInTags() |
int |
insertOrKickTag(int bucketIndex,
int tag)
Insert a tag into specified bucket.
|
int |
readTag(int bucketIndex,
int slotIndex)
Reads the value of tag in specified position.
|
void |
writeTag(int bucketIndex,
int slotIndex,
int tag)
Set the value of tag in specified position.
|
public SimpleCuckooTable(BitSet bitSet, int numBuckets, int tagsPerBucket, int bitsPerTag)
bitSet - the bit set will be used as the underlying storagenumBuckets - the number of buckets this table hastagsPerBucket - the number of slots each bucket hasbitsPerTag - the number of bits each slot haspublic int readTag(int bucketIndex,
int slotIndex)
CuckooTablereadTag in interface CuckooTablebucketIndex - the bucket indexslotIndex - the slot in bucketpublic void writeTag(int bucketIndex,
int slotIndex,
int tag)
CuckooTablewriteTag in interface CuckooTablebucketIndex - the bucket indexslotIndex - the slot in buckettag - the tag value to writepublic TagPosition findTag(int bucketIndex, int tag)
CuckooTablefindTag in interface CuckooTablebucketIndex - the bucket indextag - the tag value to findpublic TagPosition findTag(int bucketIndex1, int bucketIndex2, int tag)
CuckooTablefindTag in interface CuckooTablebucketIndex1 - the first bucket indexbucketIndex2 - the second bucket indextag - the tag value to findpublic TagPosition deleteTag(int bucketIndex, int tag)
CuckooTabledeleteTag in interface CuckooTablebucketIndex - the bucket to delete fromtag - the tag value to findpublic int insertOrKickTag(int bucketIndex,
int tag)
CuckooTableinsertOrKickTag in interface CuckooTablebucketIndex - the bucket indextag - the tag value to findpublic int getNumTagsPerBuckets()
getNumTagsPerBuckets in interface CuckooTablepublic int getNumBuckets()
getNumBuckets in interface CuckooTablepublic int getBitsPerTag()
getBitsPerTag in interface CuckooTablepublic int getSizeInBytes()
getSizeInBytes in interface CuckooTablepublic int getSizeInTags()
getSizeInTags in interface CuckooTableCopyright © 2022. All Rights Reserved.