Interface ProtoDataStore<C>
-
- Type Parameters:
C- Type of the store configuration object
@Immutable(builder=false) public interface ProtoDataStore<C>
The deserialized configuration options from a data store.This can be loaded to a full data store by querying the associated factory.
- Since:
- 2.0.0
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Cconfig()The object holding data store configuration.default DataStoredefrost(DataStoreContext context)Given a data store's properties, resolve a full data store.DataStoreFactory<C>factory()Factory for the type of data store used.Stringidentifier()Identifier for a single data store instance.static <C> ProtoDataStore<C>of(String identifier, C config, DataStoreFactory<C> factory)default voidserialize(org.spongepowered.configurate.ConfigurationNode node)
-
-
-
Method Detail
-
of
static <C> ProtoDataStore<C> of(String identifier, C config, DataStoreFactory<C> factory)
-
identifier
@Parameter String identifier()
Identifier for a single data store instance.- Returns:
- store identifier
- Since:
- 2.0.0
-
config
@Parameter C config()
The object holding data store configuration.- Returns:
- store configuration
- Since:
- 2.0.0
-
factory
@Parameter DataStoreFactory<C> factory()
Factory for the type of data store used.- Returns:
- factory instance
- Since:
- 2.0.0
-
defrost
default DataStore defrost(DataStoreContext context) throws PermissionsLoadingException
Given a data store's properties, resolve a full data store.- Returns:
- the full data store
- Throws:
PermissionsLoadingException
-
serialize
default void serialize(org.spongepowered.configurate.ConfigurationNode node) throws org.spongepowered.configurate.serialize.SerializationException
- Throws:
org.spongepowered.configurate.serialize.SerializationException
-
-