Class MicroStreamAndroidAdapter
- java.lang.Object
-
- one.microstream.memory.android.MicroStreamAndroidAdapter
-
public final class MicroStreamAndroidAdapter extends Object
Trivial setup wrapping class to simplify and document the different setup possibilities.
-
-
Constructor Summary
Constructors Constructor Description MicroStreamAndroidAdapter()
-
Method Summary
Modifier and Type Method Description static void
setupBasic()
Sets up the memory accessing logic to useMemoryAccessorGeneric
.static void
setupFull()
Sets up the memory accessing logic to useMemoryAccessorGeneric
.static void
setupWithInstantiator()
Sets up the memory accessing logic to useMemoryAccessorGeneric
.
-
-
-
Method Detail
-
setupBasic
public static final void setupBasic()
Sets up the memory accessing logic to useMemoryAccessorGeneric
.No platform-specific
DefaultInstantiator
is set, meaning the behavior defaults to public API functionality, i.e. requiring a default constructor to be present for every generically handled class.No platform-specific
DirectBufferDeallocator
is set, meaning the memory allocated by direct byte buffers cannot be freed before the direct byte buffer instance is garbage-collected. See this Stack Overflow question for an example why that might be a problem.- See Also:
setupWithInstantiator()
,setupFull()
-
setupWithInstantiator
public static final void setupWithInstantiator()
Sets up the memory accessing logic to useMemoryAccessorGeneric
.AndroidInstantiatorBlank
ist used as theDefaultInstantiator
implementation.No platform-specific
DirectBufferDeallocator
is set, identical tosetupBasic()
.- See Also:
setupBasic()
,setupFull()
-
setupFull
public static final void setupFull()
Sets up the memory accessing logic to useMemoryAccessorGeneric
.AndroidInstantiatorBlank
ist used as theDefaultInstantiator
implementation.AndroidDirectBufferDeallocator
is used as theDirectBufferDeallocator
.- See Also:
setupBasic()
,setupWithInstantiator()
-
-