Package io.camunda.zeebe.db.impl
Record Class DbForeignKey<K extends DbKey>
java.lang.Object
java.lang.Record
io.camunda.zeebe.db.impl.DbForeignKey<K>
- Type Parameters:
K-- Record Components:
inner-columnFamily-
- All Implemented Interfaces:
ContainsForeignKeys,DbKey,DbValue,BufferReader,BufferWriter
public record DbForeignKey<K extends DbKey>(K extends DbKey inner, Enum<?> columnFamily, DbForeignKey.MatchType match, Predicate<K extends DbKey> skip)
extends Record
implements DbKey, DbValue, ContainsForeignKeys
Wraps a key from a given column family. When serialized via
BufferWriter, this behaves exactly as the inner key.-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDbForeignKey(K inner, Enum<?> columnFamily) DbForeignKey(K inner, Enum<?> columnFamily, DbForeignKey.MatchType match) DbForeignKey(K inner, Enum<?> columnFamily, DbForeignKey.MatchType match, Predicate<K> skip) Creates an instance of aDbForeignKeyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionEnum<?>Returns the value of thecolumnFamilyrecord component.final booleanIndicates whether some other object is "equal to" this one.intfinal inthashCode()Returns a hash code value for this object.inner()Returns the value of theinnerrecord component.match()Returns the value of thematchrecord component.booleanskip()Returns the value of theskiprecord component.final StringtoString()Returns a string representation of this record class.voidwrap(org.agrona.DirectBuffer buffer, int offset, int length) voidwrite(org.agrona.MutableDirectBuffer buffer, int offset)
-
Constructor Details
-
DbForeignKey
-
DbForeignKey
-
DbForeignKey
Creates an instance of aDbForeignKeyrecord class.- Parameters:
inner- the value for theinnerrecord componentcolumnFamily- the value for thecolumnFamilyrecord componentmatch- the value for thematchrecord componentskip- the value for theskiprecord component
-
-
Method Details
-
wrap
public void wrap(org.agrona.DirectBuffer buffer, int offset, int length) - Specified by:
wrapin interfaceBufferReader
-
getLength
public int getLength()- Specified by:
getLengthin interfaceBufferWriter
-
write
public void write(org.agrona.MutableDirectBuffer buffer, int offset) - Specified by:
writein interfaceBufferWriter
-
containedForeignKeys
- Specified by:
containedForeignKeysin interfaceContainsForeignKeys
-
shouldSkipCheck
public boolean shouldSkipCheck() -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
inner
Returns the value of theinnerrecord component.- Returns:
- the value of the
innerrecord component
-
columnFamily
Returns the value of thecolumnFamilyrecord component.- Returns:
- the value of the
columnFamilyrecord component
-
match
Returns the value of thematchrecord component.- Returns:
- the value of the
matchrecord component
-
skip
Returns the value of theskiprecord component.- Returns:
- the value of the
skiprecord component
-