Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import org.openjdk.jmh.annotations.Warmup;

import static java.util.concurrent.TimeUnit.SECONDS;
import static org.apache.ignite.internal.MessageSerializationContext.IGNORED;
import static org.openjdk.jmh.annotations.Mode.Throughput;

/** Benchmarks the {@link DirectMessageReader} compressed-field hot path. */
Expand Down Expand Up @@ -96,7 +97,7 @@ public void setup() {

writer.setBuffer(buf);

boolean finished = writer.writeMessage(msg, true);
boolean finished = writer.writeMessage(msg, true, IGNORED);

if (!finished)
throw new IllegalStateException("Message does not fit into the buffer.");
Expand All @@ -111,7 +112,7 @@ public Message compressedMessage() {

reader.setBuffer(buf);

Message msg = reader.readMessage(true);
Message msg = reader.readMessage(true, IGNORED);

reader.reset();

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.ignite.internal;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.apache.ignite.internal.processors.rollingupgrade.feature.IgniteFeature;

/**
* Links the annotated class to the specified {@link IgniteFeature} registry. The registry
* is used to resolve fully qualified names of features that introduced or deprecated fields
* (see {@link Order#introducedBy()} and {@link Order#deprecatedBy()}).
*
* <p>If this annotation is absent, the Ignite Core Feature Registry is used.</p>
*
* @see Order
* @see IgniteFeature
*/
@Retention(RetentionPolicy.CLASS)
@Target(ElementType.TYPE)
public @interface FeatureRegistry {
/** @return Class of the feature registry. */
Class<?> value();
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import java.util.stream.Collectors;
import javax.annotation.processing.FilerException;
import javax.annotation.processing.ProcessingEnvironment;
import javax.lang.model.element.Element;
import javax.lang.model.element.TypeElement;
import javax.lang.model.element.VariableElement;
import javax.lang.model.type.TypeMirror;
Expand Down Expand Up @@ -181,6 +182,11 @@ protected void writeClassHeader(Writer writer, String interfaceName, String clsN
writer.write("public final class " + clsName + " implements " + interfaceName + "<" + simpleNameWithGeneric(type) + ">");
}

/** */
protected void printError(Element el, String msg) {
env.getMessager().printMessage(Diagnostic.Kind.ERROR, msg, el);
}

/** @return {@code format} formatted with {@code args}, prefixed with {@link #indent} tabs. */
protected String indentedLine(String format, Object... args) {
return TAB.repeat(indent) + String.format(format, args);
Expand Down
Loading
Loading