Class RecordStore<R extends BaseRecord>
java.lang.Object
org.apache.hadoop.hdfs.server.federation.store.RecordStore<R>
- Type Parameters:
R- Record to store by this interface.
- Direct Known Subclasses:
CachedRecordStore
Store records in the State Store. Subclasses provide interfaces to operate on
those records.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRecordStore(Class<R> clazz, StateStoreDriver stateStoreDriver) Create a new store for records. -
Method Summary
Modifier and TypeMethodDescriptionGet the State Store driver.Report a required record to the data store.static <T extends RecordStore<?>>
TnewInstance(Class<T> clazz, StateStoreDriver driver) Build a state store API implementation interface.
-
Constructor Details
-
RecordStore
Create a new store for records.- Parameters:
clazz- Class of the record to store.stateStoreDriver- Driver for the State Store.
-
-
Method Details
-
getRecordClass
Report a required record to the data store. The data store uses this to create/maintain storage for the record.- Returns:
- The class of the required record or null if no record is required for this interface.
-
getDriver
Get the State Store driver.- Returns:
- State Store driver.
-
newInstance
Build a state store API implementation interface.- Type Parameters:
T- Instance of type RecordStore.- Parameters:
clazz- The specific interface implementation to createdriver- TheStateStoreDriverimplementation in use.- Returns:
- An initialized instance of the specified state store API implementation.
-