public void clearTenant ( String tenantId ) { String index = getIndex ( tenantId ) ; synchronized ( knownIndices ) { IndicesAdminClient indices = client . admin ( ) . indices ( ) ; boolean indexExists = indices . prepareExists ( index ) . execute ( ) . actionGet ( ) . isExists ( ) ; if ( indexExists ) { indices . prepareDelete ( index ) . execute ( ) . actionGet ( ) ; } knownIndices . remove ( index ) ; } }
Removes all data associated with tenant .