@Override public long freeMemory(long windowId) throws IOException {
  long size=keyStream.dataSizeUpToWindow(windowId) + valueStream.dataSizeUpToWindow(windowId);
  windowsForFreeMemory.add(windowId);
  return size;
}

@ Override public long freeMemory ( long windowId ) throws IOException { long size = keyStream . dataSizeUpToWindow ( windowId ) + valueStream . dataSizeUpToWindow ( windowId ) ; windowsForFreeMemory . add ( windowId ) ; return size ; }
free memory up to the given windowid this method will be called by another thread . adding concurrency control to stream would impact the performance . this method only calculates the size of the memory that could be released and then sends free memory request to the operator thread
