[WIP][SPARK-1477]: Add the lifecycle interface 

shouldn't we declare this in scala?