Class PersistenceTypeHandlerProviderFailing<D>
java.lang.Object
one.microstream.persistence.types.PersistenceDataTypeHolder.Default<D>
one.microstream.persistence.internal.PersistenceTypeHandlerProviderFailing<D>
- Type Parameters:
D
-
- All Implemented Interfaces:
PersistenceDataTypeHolder<D>
,PersistenceTypeHandlerEnsurer<D>
,PersistenceTypeHandlerIterable<D>
,PersistenceTypeHandlerProvider<D>
,PersistenceTypeIdLookup
,PersistenceTypeLookup
,PersistenceTypeManager
,PersistenceTypeRegistry
public class PersistenceTypeHandlerProviderFailing<D> extends PersistenceDataTypeHolder.Default<D> implements PersistenceTypeHandlerProvider<D>
Trivial implementation that throws a
PersistenceExceptionTypeNotPersistable
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.PersistenceDataTypeHolder
PersistenceDataTypeHolder.Default<D>
Nested classes/interfaces inherited from interface one.microstream.persistence.types.PersistenceTypeHandlerEnsurer
PersistenceTypeHandlerEnsurer.Default<D>
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<D,T>
ensureTypeHandler(Class<T> type)
long
ensureTypeId(Class<?> type)
<C extends Consumer<? super PersistenceTypeHandler<D, ?>>>
CiterateAllTypeHandlers(C iterator)
<C extends Consumer<? super PersistenceLegacyTypeHandler<D, ?>>>
CiterateLegacyTypeHandlers(C iterator)
<C extends Consumer<? super PersistenceTypeHandler<D, ?>>>
CiterateTypeHandlers(C iterator)
<T> Class<T>
lookupType(long typeId)
long
lookupTypeId(Class<?> type)
<T> PersistenceTypeHandler<D,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)
Methods inherited from class one.microstream.persistence.types.PersistenceDataTypeHolder.Default
dataType
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface one.microstream.persistence.types.PersistenceDataTypeHolder
dataType
-
Constructor Details
-
PersistenceTypeHandlerProviderFailing
public PersistenceTypeHandlerProviderFailing()
-
-
Method Details
-
provideTypeHandler
public <T> PersistenceTypeHandler<D,T> provideTypeHandler(Class<T> type) throws PersistenceExceptionTypeNotPersistable- Specified by:
provideTypeHandler
in interfacePersistenceTypeHandlerProvider<D>
- Throws:
PersistenceExceptionTypeNotPersistable
-
ensureTypeId
- Specified by:
ensureTypeId
in interfacePersistenceTypeManager
-
ensureType
- Specified by:
ensureType
in interfacePersistenceTypeManager
-
currentTypeId
public long currentTypeId()- Specified by:
currentTypeId
in interfacePersistenceTypeManager
-
lookupTypeId
- Specified by:
lookupTypeId
in interfacePersistenceTypeIdLookup
- Specified by:
lookupTypeId
in interfacePersistenceTypeLookup
-
lookupType
- 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
- 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<D,T> ensureTypeHandler(Class<T> type) throws PersistenceExceptionTypeNotPersistable- Specified by:
ensureTypeHandler
in interfacePersistenceTypeHandlerEnsurer<D>
- Specified by:
ensureTypeHandler
in interfacePersistenceTypeHandlerProvider<D>
- Throws:
PersistenceExceptionTypeNotPersistable
-
iterateTypeHandlers
public final <C extends Consumer<? super PersistenceTypeHandler<D, ?>>> C iterateTypeHandlers(C iterator)- Specified by:
iterateTypeHandlers
in interfacePersistenceTypeHandlerIterable<D>
-
iterateLegacyTypeHandlers
public <C extends Consumer<? super PersistenceLegacyTypeHandler<D, ?>>> C iterateLegacyTypeHandlers(C iterator)- Specified by:
iterateLegacyTypeHandlers
in interfacePersistenceTypeHandlerIterable<D>
-
iterateAllTypeHandlers
public <C extends Consumer<? super PersistenceTypeHandler<D, ?>>> C iterateAllTypeHandlers(C iterator)- Specified by:
iterateAllTypeHandlers
in interfacePersistenceTypeHandlerIterable<D>
-