added shutdown support

I added shutdown support to the Cluster class.