private int getCurrentWindowIndex()
    {
        long currentTime = System.currentTimeMillis();
        long currentWindow =((currentTime - startTime) / windowDurationInMs);
        return (int) currentWindow%(numKeys/windowSize);
    }
private int getCurrentWindowIndex ( ) { long currentTime = System . currentTimeMillis ( ) ; long currentWindow = ( ( currentTime - startTime ) / windowDurationInMs ) ; return ( int ) currentWindow % ( numKeys / windowSize ) ; }
/*
Gets the currentWindow, Window number starts from 0.