Class PersistenceTypeHandlerProviderFailing<M>
- java.lang.Object
-
- one.microstream.persistence.internal.PersistenceTypeHandlerProviderFailing<M>
-
- Type Parameters:
M
-
- All Implemented Interfaces:
PersistenceTypeHandlerEnsurer<M>
,PersistenceTypeHandlerIterable<M>
,PersistenceTypeHandlerProvider<M>
,PersistenceTypeIdLookup
,PersistenceTypeLookup
,PersistenceTypeManager
,PersistenceTypeRegistry
public class PersistenceTypeHandlerProviderFailing<M> extends Object implements PersistenceTypeHandlerProvider<M>
Trivial implementation that throws aPersistenceExceptionTypeNotPersistable
for every type.Useful if only pre-registered types shall be handleable and every unhandled type shall be indicated to be unpersistable.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface one.microstream.persistence.types.PersistenceTypeHandlerEnsurer
PersistenceTypeHandlerEnsurer.Default<M>
-
Nested classes/interfaces inherited from interface one.microstream.persistence.types.PersistenceTypeManager
PersistenceTypeManager.Default
-
-
Constructor Summary
Constructors Constructor Description PersistenceTypeHandlerProviderFailing()
-
Method Summary
Modifier and Type Method Description long
currentTypeId()
Class<?>
ensureType(long typeId)
<T> PersistenceTypeHandler<M,T>
ensureTypeHandler(Class<T> type)
long
ensureTypeId(Class<?> type)
<C extends Consumer<? super PersistenceTypeHandler<M,?>>>
CiterateAllTypeHandlers(C iterator)
<C extends Consumer<? super PersistenceLegacyTypeHandler<M,?>>>
CiterateLegacyTypeHandlers(C iterator)
<C extends Consumer<? super PersistenceTypeHandler<M,?>>>
CiterateTypeHandlers(C iterator)
<T> Class<T>
lookupType(long typeId)
long
lookupTypeId(Class<?> type)
<T> PersistenceTypeHandler<M,T>
provideTypeHandler(Class<T> type)
boolean
registerType(long tid, Class<?> type)
boolean
registerTypes(Iterable<? extends PersistenceTypeLink> types)
void
updateCurrentHighestTypeId(long highestTypeId)
boolean
validateTypeMapping(long typeId, Class<?> type)
boolean
validateTypeMappings(Iterable<? extends PersistenceTypeLink> mappings)
-
-
-
Method Detail
-
provideTypeHandler
public <T> PersistenceTypeHandler<M,T> provideTypeHandler(Class<T> type) throws PersistenceExceptionTypeNotPersistable
- Specified by:
provideTypeHandler
in interfacePersistenceTypeHandlerProvider<M>
- Throws:
PersistenceExceptionTypeNotPersistable
-
ensureTypeId
public long ensureTypeId(Class<?> type)
- Specified by:
ensureTypeId
in interfacePersistenceTypeManager
-
ensureType
public Class<?> ensureType(long typeId)
- Specified by:
ensureType
in interfacePersistenceTypeManager
-
currentTypeId
public long currentTypeId()
- Specified by:
currentTypeId
in interfacePersistenceTypeManager
-
lookupTypeId
public long lookupTypeId(Class<?> type)
- Specified by:
lookupTypeId
in interfacePersistenceTypeIdLookup
- Specified by:
lookupTypeId
in interfacePersistenceTypeLookup
-
lookupType
public <T> Class<T> lookupType(long typeId)
- Specified by:
lookupType
in interfacePersistenceTypeLookup
-
validateTypeMapping
public boolean validateTypeMapping(long typeId, Class<?> type) throws PersistenceExceptionConsistency
- Specified by:
validateTypeMapping
in interfacePersistenceTypeLookup
- Throws:
PersistenceExceptionConsistency
-
validateTypeMappings
public boolean validateTypeMappings(Iterable<? extends PersistenceTypeLink> mappings) throws PersistenceExceptionConsistency
- Specified by:
validateTypeMappings
in interfacePersistenceTypeLookup
- Throws:
PersistenceExceptionConsistency
-
registerType
public boolean registerType(long tid, Class<?> type) throws PersistenceExceptionConsistency
- Specified by:
registerType
in interfacePersistenceTypeRegistry
- Throws:
PersistenceExceptionConsistency
-
registerTypes
public boolean registerTypes(Iterable<? extends PersistenceTypeLink> types) throws PersistenceExceptionConsistency
- Specified by:
registerTypes
in interfacePersistenceTypeRegistry
- Throws:
PersistenceExceptionConsistency
-
updateCurrentHighestTypeId
public void updateCurrentHighestTypeId(long highestTypeId)
- Specified by:
updateCurrentHighestTypeId
in interfacePersistenceTypeManager
-
ensureTypeHandler
public final <T> PersistenceTypeHandler<M,T> ensureTypeHandler(Class<T> type) throws PersistenceExceptionTypeNotPersistable
- Specified by:
ensureTypeHandler
in interfacePersistenceTypeHandlerEnsurer<M>
- Specified by:
ensureTypeHandler
in interfacePersistenceTypeHandlerProvider<M>
- Throws:
PersistenceExceptionTypeNotPersistable
-
iterateTypeHandlers
public final <C extends Consumer<? super PersistenceTypeHandler<M,?>>> C iterateTypeHandlers(C iterator)
- Specified by:
iterateTypeHandlers
in interfacePersistenceTypeHandlerIterable<M>
-
iterateLegacyTypeHandlers
public <C extends Consumer<? super PersistenceLegacyTypeHandler<M,?>>> C iterateLegacyTypeHandlers(C iterator)
- Specified by:
iterateLegacyTypeHandlers
in interfacePersistenceTypeHandlerIterable<M>
-
iterateAllTypeHandlers
public <C extends Consumer<? super PersistenceTypeHandler<M,?>>> C iterateAllTypeHandlers(C iterator)
- Specified by:
iterateAllTypeHandlers
in interfacePersistenceTypeHandlerIterable<M>
-
-