private void cleanup() {
// Cleanup after cleared References.
Entry[] tab = this.table;
ReferenceQueue queue = this.queue;
Reference ref;
while ((ref = queue.poll()) != null) {
// Since buckets are single-linked, traverse entire list and
// cleanup all cleared references in it.
int index = (((Entry) ref).hash & 0x7fffffff) % tab.length;
for (Entry e = tab[index], prev = null; e != null; e = e.next) {