com.hazelcast.core
Interface MapLoaderLifecycleSupport


public interface MapLoaderLifecycleSupport

Provides Lifecycle support for the implementing MapLoader class. MapLoader classes implementing MapLoaderLifecycleSupport interface will be called by Hazelcast on init and destroy so that implementation can do necessary configuration when initializing and cleanup when destroying.


Method Summary
 void destroy()
          Hazelcast will call this method before shutting down.
 void init(HazelcastInstance hazelcastInstance, Properties properties, String mapName)
          Initializes this MapLoader implementation.
 

Method Detail

init

void init(HazelcastInstance hazelcastInstance,
          Properties properties,
          String mapName)
Initializes this MapLoader implementation. Hazelcast will call this method when the map is first used on the HazelcastInstance. Implementation can initialize required resources for the implementing mapLoader such as reading a config file and/or creating database connection.

Parameters:
hazelcastInstance - HazelcastInstance of this mapLoader.
properties - Properties set for this mapStore. see MapStoreConfig
mapName - name of the map.

destroy

void destroy()
Hazelcast will call this method before shutting down. This method can be overridden to cleanup the resources held by this map loader implementation, such as closing the database connections etc.



Copyright © 2008-2012 Hazel Ltd. All Rights Reserved.