org.apache.falcon.entity.store
Class ConfigurationStore
java.lang.Object
org.apache.falcon.entity.store.ConfigurationStore
- All Implemented Interfaces:
- FalconService
public final class ConfigurationStore
- extends Object
- implements FalconService
Persistent store for falcon entities.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
get
public static ConfigurationStore get()
init
public void init()
throws FalconException
- Specified by:
init
in interface FalconService
- Throws:
FalconException
registerListener
public void registerListener(ConfigurationChangeListener listener)
unregisterListener
public void unregisterListener(ConfigurationChangeListener listener)
publish
public void publish(EntityType type,
Entity entity)
throws FalconException
- Parameters:
type
- - EntityType that need to be publishedentity
- - Reference to the Entity Object
- Throws:
FalconException
update
public void update(EntityType type,
Entity entity)
throws FalconException
- Throws:
FalconException
initiateUpdate
public void initiateUpdate(Entity entity)
throws FalconException
- Throws:
FalconException
get
public <T extends Entity> T get(EntityType type,
String name)
throws FalconException
- Type Parameters:
T
- - Actual Entity object type- Parameters:
type
- - Entity type that is being retrievedname
- - Name as it appears in the entity xml definition
- Returns:
- - Entity object from internal dictionary, If the object is not
loaded in memory yet, it will retrieve it from persistent store
just in time. On startup all the entities will be added to the
dictionary with null reference.
- Throws:
FalconException
getEntities
public Collection<String> getEntities(EntityType type)
remove
public boolean remove(EntityType type,
String name)
throws FalconException
- Remove an entity which is already stored in the config store.
- Parameters:
type
- - Entity type being removedname
- - Name of the entity object being removed
- Returns:
- - True is remove is successful, false if request entity doesn't
exist
- Throws:
FalconException
cleanupUpdateInit
public void cleanupUpdateInit()
getName
public String getName()
- Specified by:
getName
in interface FalconService
destroy
public void destroy()
- Specified by:
destroy
in interface FalconService
Copyright © 2013-2014 Apache Software Foundation. All Rights Reserved.