private void assertCorrectLength( ConstraintRule constraintRule ) { // GIVEN ByteBuffer buffer = ByteBuffer.wrap( SchemaRuleSerialization.serialize( constraintRule ) ); // THEN assertThat( SchemaRuleSerialization.lengthOf( constraintRule ), equalTo( buffer.capacity() ) ); }
private void assertCorrectLength( StoreIndexDescriptor indexRule ) { // GIVEN ByteBuffer buffer = ByteBuffer.wrap( SchemaRuleSerialization.serialize( indexRule ) ); // THEN assertThat( SchemaRuleSerialization.lengthOf( indexRule ), equalTo( buffer.capacity() ) ); }
ByteBuffer target = ByteBuffer.allocate( lengthOf( constraintRule ) ); target.putInt( LEGACY_LABEL_OR_REL_TYPE_ID ); target.put( CONSTRAINT_RULE );
ByteBuffer target = ByteBuffer.allocate( lengthOf( indexDescriptor ) ); target.putInt( LEGACY_LABEL_OR_REL_TYPE_ID ); target.put( INDEX_RULE );
ByteBuffer target = ByteBuffer.allocate( lengthOf( constraintRule ) ); target.putInt( LEGACY_LABEL_OR_REL_TYPE_ID ); target.put( CONSTRAINT_RULE );
ByteBuffer target = ByteBuffer.allocate( lengthOf( indexDescriptor ) ); target.putInt( LEGACY_LABEL_OR_REL_TYPE_ID ); target.put( INDEX_RULE );