This is private[streaming] in scala api. We don't expose such methods in java api.