No need to create a Long.

int index = (int) (now % numBuckets);