Starts an orderly shutdown of the Cache. Steps are:
- Completes any outstanding CacheLoader loads.
- Disposes any cache extensions.
- Disposes any cache event listeners. The listeners normally complete, so for example distributed caching operations will complete.
- Flushes all cache items from memory to the disk store, if any
- changes status to shutdown, so that any cache operations after this point throw IllegalStateException
This method should be invoked only by CacheManager, as a cache's lifecycle is bound into that of it's cache manager.
@throws IllegalStateException if the cache is already {@link Status#STATUS_SHUTDOWN}