Add flush interface and all unit test passed