Package edu.uiuc.ncsa.security.storage
Class FSInitializer
- java.lang.Object
-
- edu.uiuc.ncsa.security.storage.StoreInitializer
-
- edu.uiuc.ncsa.security.storage.FSInitializer
-
- All Implemented Interfaces:
Initializable
public class FSInitializer extends StoreInitializer
Created by Jeff Gaynor
on 4/23/12 at 10:29 AM
-
-
Field Summary
-
Fields inherited from class edu.uiuc.ncsa.security.storage.StoreInitializer
created, destroyed, initialized
-
-
Constructor Summary
Constructors Constructor Description FSInitializer(File storeDirectory, File indexDirectory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
clearEntries()
Clears out any and all entries in the storage/index directories.boolean
createNew()
Creates a completely new instance.boolean
destroy()
Destroy the object completely.boolean
init()
Initialize an existing object.boolean
isCreated()
(Optional) Returns true if the object in question has been created.boolean
isInitialized()
(Optional) Returns true if the object in question has been initialized.-
Methods inherited from class edu.uiuc.ncsa.security.storage.StoreInitializer
isDestroyed
-
-
-
-
Method Detail
-
createNew
public boolean createNew()
Description copied from interface:Initializable
Creates a completely new instance. Fails if an instance already exists. In that case, call destroy first. For instance, this might create all file system entries or drop then recreate all tables in an SQL database. Compare this with init which might delete any entries in a file store or SQL table.- Returns:
-
isCreated
public boolean isCreated()
Description copied from interface:Initializable
(Optional) Returns true if the object in question has been created. If this cannot be determined then the call should throw an exception.- Specified by:
isCreated
in interfaceInitializable
- Overrides:
isCreated
in classStoreInitializer
- Returns:
-
isInitialized
public boolean isInitialized()
Description copied from interface:Initializable
(Optional) Returns true if the object in question has been initialized. If this cannot be determined this call should throw an exception.- Specified by:
isInitialized
in interfaceInitializable
- Overrides:
isInitialized
in classStoreInitializer
- Returns:
-
destroy
public boolean destroy()
Description copied from interface:Initializable
Destroy the object completely. Returnstrue
if the object existed before destroy was called. Further calls to this object must fail after this invocation.
-
clearEntries
protected void clearEntries()
Clears out any and all entries in the storage/index directories.
-
init
public boolean init()
Description copied from interface:Initializable
Initialize an existing object. This throws an exception if the object does not exist. The state after this call is exactly as if the system were created for the first time. Calls to the object before invocation have no guarantee of success.- Returns:
- Returns True if the operation succeeds.
-
-