Class DefaultStoreWorker
- java.lang.Object
-
- org.projectnessie.versioned.store.DefaultStoreWorker
-
- All Implemented Interfaces:
StoreWorker
public class DefaultStoreWorker extends java.lang.Object implements StoreWorker
MainStoreWorkerimplementation that maintains a registry of availablecontent serializersand delegates to these.
-
-
Constructor Summary
Constructors Constructor Description DefaultStoreWorker()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static org.projectnessie.model.Content.TypecontentTypeForPayload(int payload)org.projectnessie.model.Content.TypegetType(int payload, org.projectnessie.nessie.relocated.protobuf.ByteString onReferenceValue)Deprecated.static StoreWorkerinstance()static intpayloadForContent(org.projectnessie.model.Content c)static intpayloadForContent(org.projectnessie.model.Content.Type contentType)booleanrequiresGlobalState(int payload, org.projectnessie.nessie.relocated.protobuf.ByteString onReferenceValue)Deprecated.org.projectnessie.nessie.relocated.protobuf.ByteStringtoStoreOnReferenceState(org.projectnessie.model.Content content)Returns the serialized representation of the on-reference part of the given content-object.org.projectnessie.model.ContentvalueFromStore(int payload, org.projectnessie.nessie.relocated.protobuf.ByteString onReferenceValue)org.projectnessie.model.ContentvalueFromStore(int payload, org.projectnessie.nessie.relocated.protobuf.ByteString onReferenceValue, java.util.function.Supplier<org.projectnessie.nessie.relocated.protobuf.ByteString> globalState)Deprecated.
-
-
-
Method Detail
-
instance
public static StoreWorker instance()
-
payloadForContent
public static int payloadForContent(org.projectnessie.model.Content c)
-
payloadForContent
public static int payloadForContent(org.projectnessie.model.Content.Type contentType)
-
contentTypeForPayload
public static org.projectnessie.model.Content.Type contentTypeForPayload(int payload)
-
toStoreOnReferenceState
public org.projectnessie.nessie.relocated.protobuf.ByteString toStoreOnReferenceState(org.projectnessie.model.Content content)
Description copied from interface:StoreWorkerReturns the serialized representation of the on-reference part of the given content-object.- Specified by:
toStoreOnReferenceStatein interfaceStoreWorker
-
valueFromStore
public org.projectnessie.model.Content valueFromStore(int payload, org.projectnessie.nessie.relocated.protobuf.ByteString onReferenceValue)- Specified by:
valueFromStorein interfaceStoreWorker
-
valueFromStore
@Deprecated public org.projectnessie.model.Content valueFromStore(int payload, org.projectnessie.nessie.relocated.protobuf.ByteString onReferenceValue, java.util.function.Supplier<org.projectnessie.nessie.relocated.protobuf.ByteString> globalState)Deprecated.- Specified by:
valueFromStorein interfaceStoreWorker
-
requiresGlobalState
@Deprecated public boolean requiresGlobalState(int payload, org.projectnessie.nessie.relocated.protobuf.ByteString onReferenceValue)Deprecated.Description copied from interface:StoreWorkerChecks whether the given persisted content has been persisted using global state.This function can be entirely removed once all content objects are guaranteed to have no global state.
- Specified by:
requiresGlobalStatein interfaceStoreWorker
-
getType
@Deprecated public org.projectnessie.model.Content.Type getType(int payload, org.projectnessie.nessie.relocated.protobuf.ByteString onReferenceValue)Deprecated.Description copied from interface:StoreWorkerRetrieve theContent.Typefor the given persisted representation.Needs both
payloadandonRefContentfor backwards compatibility, because old persisted content objects can have fixedpayload == 0, therefore the implementation for the default types (Iceberg, DL, Namespace) needs this.- Specified by:
getTypein interfaceStoreWorker
-
-