repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/reef
1,119
lang/java/reef-common/src/main/java/org/apache/reef/evaluator/context/parameters/ContextIdentifier.java
/* * 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.reef.evaluator.context.parameters; import org.apache.reef.tang.annotations.Name; import org.apache.reef.tang.annotations.NamedParameter; /** * Context identifier. */ @NamedParameter(doc = "The identifier for the context.") public final class ContextIdentifier implements Name<String> { }
apache/reef
1,131
lang/java/reef-wake/wake/src/main/java/org/apache/reef/wake/examples/p2p/EventSource.java
/* * 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.reef.wake.examples.p2p; /** * The pull side of the interface: Clients implement this and register it with * the PullToPush class. * * @param <T> the type of the event */ public interface EventSource<T> { /** * @return a event or null if no more messages are available. */ T getNext(); }
apache/seatunnel
1,050
seatunnel-engine/seatunnel-engine-storage/imap-storage-plugins/imap-storage-file/src/main/java/org/apache/seatunnel/engine/imap/storage/file/disruptor/WALEventType.java
/* * 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.seatunnel.engine.imap.storage.file.disruptor; public enum WALEventType { /** write data to wal file */ APPEND, /** delete all wal file in this namespace */ CLEAR, /** Close wal file */ CLOSED }
apache/seatunnel
1,081
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/group/queue/disruptor/RecordEventFactory.java
/* * 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.seatunnel.engine.server.task.group.queue.disruptor; import com.lmax.disruptor.EventFactory; public class RecordEventFactory implements EventFactory<RecordEvent> { @Override public RecordEvent newInstance() { return new RecordEvent(); } }
apache/seatunnel
1,110
seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/multitablesink/MultiTableAggregatedCommitInfo.java
/* * 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.seatunnel.api.sink.multitablesink; import lombok.AllArgsConstructor; import lombok.Getter; import java.io.Serializable; import java.util.Map; @Getter @AllArgsConstructor public class MultiTableAggregatedCommitInfo implements Serializable { private Map<String, Object> commitInfo; }
apache/seatunnel
1,121
seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/Starter.java
/* * 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.seatunnel.core.starter; import java.util.List; /** * A starter for building a commandline start command based on different engine for SeaTunnel job. */ public interface Starter { /** Return the SeaTunnel job commandline start commands */ List<String> buildCommands() throws Exception; }
apache/servicecomb-java-chassis
1,072
foundations/foundation-protobuf/src/test/java/org/apache/servicecomb/foundation/protobuf/internal/schema/scalar/TestInt64Schema.java
/* * 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.servicecomb.foundation.protobuf.internal.schema.scalar; public class TestInt64Schema extends TestNumberBaseSchema { public TestInt64Schema() { minValue = Long.MIN_VALUE; maxValue = Long.MAX_VALUE; initFields("int64", "objInt64"); } }
apache/servicecomb-java-chassis
1,091
foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/utils/bean/ArraySetter.java
/* * 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.servicecomb.foundation.common.utils.bean; public class ArraySetter<T> implements Setter<T[], T> { private final int idx; public ArraySetter(int idx) { this.idx = idx; } @Override public void set(T[] instance, T value) { instance[idx] = value; } }
apache/shardingsphere
1,100
test/it/binder/src/test/java/org/apache/shardingsphere/test/it/sql/binder/dialect/postgresql/PostgreSQLBinderIT.java
/* * 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.shardingsphere.test.it.sql.binder.dialect.postgresql; import org.apache.shardingsphere.test.it.sql.binder.SQLBinderIT; import org.apache.shardingsphere.test.it.sql.binder.SQLBinderITSettings; @SQLBinderITSettings("PostgreSQL") class PostgreSQLBinderIT extends SQLBinderIT { }
apache/skywalking
1,094
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/meter/dynamic/MeterClassPackageHolder.java
/* * 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.skywalking.oap.server.core.analysis.meter.dynamic; /** * MeterClassPackageHolder holds the package for generated meter classes. * * @since 8.9.0 for adopting JDK16+ to avoid `--add-opens java.base/java.lang=ALL-UNNAMED` */ public class MeterClassPackageHolder { }
apache/struts
1,143
core/src/main/java/org/apache/struts2/interceptor/ValidationWorkflowAware.java
/* * 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.struts2.interceptor; /** * ValidationWorkflowAware classes can programmatically change result name when errors occurred * * This interface can be only applied to action which already implements {@link ValidationAware} interface! */ public interface ValidationWorkflowAware { String getInputResultName(); }
apache/synapse
1,129
modules/securevault/src/main/java/org/apache/synapse/securevault/DecryptionProvider.java
/* * 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.synapse.securevault; /** * Provides Decrypt operation */ public interface DecryptionProvider { /** * Decrypts input cipher bytes * * @param cipherText as a byte array * @return plain text as byte array */ public byte[] decrypt(byte[] cipherText); }
apache/tapestry-5
1,119
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/base/AbstractRestDemoPage.java
// Licensed 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.tapestry5.integration.app1.base; import org.apache.tapestry5.EventConstants; import org.apache.tapestry5.annotations.OnEvent; import org.apache.tapestry5.annotations.StaticActivationContextValue; import org.apache.tapestry5.util.TextStreamResponse; public class AbstractRestDemoPage extends EmptySuperclass { @OnEvent(EventConstants.HTTP_GET) protected Object abstractSuperclassEndpoint(@StaticActivationContextValue("abstract") String abstractValue) { return new TextStreamResponse("text/plain", abstractValue); } }
apache/tomee
1,079
arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/FinderTestHome.java
/* * 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.openejb.arquillian.tests.bmp.remote; import jakarta.ejb.CreateException; import jakarta.ejb.EJBHome; import java.rmi.RemoteException; public interface FinderTestHome extends EJBHome { FinderTest create() throws CreateException, RemoteException; }
apache/tsfile
1,135
java/common/src/main/java/org/apache/tsfile/write/UnSupportedDataTypeException.java
/* * 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.tsfile.write; public class UnSupportedDataTypeException extends RuntimeException { public UnSupportedDataTypeException(String message) { super("Unsupported dataType: " + message); } public UnSupportedDataTypeException(String message, Throwable e) { super(message + e.getMessage()); } }
apache/usergrid
1,108
stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/rx/RxTaskScheduler.java
/* * 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.usergrid.persistence.core.rx; import rx.Scheduler; /** * An interface for returning task schedulers */ public interface RxTaskScheduler { /** * Get the scheduler for tasks that perform blocking I/O * @return */ Scheduler getAsyncIOScheduler(); }
apache/wicket
1,110
wicket-core-tests/src/test/java/org/apache/wicket/markup/html/MarkupInheritanceResolverTestPage1.java
/* * 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.wicket.markup.html; import org.apache.wicket.markup.html.basic.Label; /** */ public class MarkupInheritanceResolverTestPage1 extends WebPage { private static final long serialVersionUID = 1L; /** */ MarkupInheritanceResolverTestPage1() { add(new Label("test1", "test1")); } }
apache/wicket
1,121
wicket-core-tests/src/test/java/org/apache/wicket/markup/resolver/SimpleBasePage_6.java
/* * 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.wicket.markup.resolver; import org.apache.wicket.markup.html.WebPage; /** * Mock page for testing. * * @author Chris Turner */ public abstract class SimpleBasePage_6 extends WebPage { private static final long serialVersionUID = 1L; /** * Construct. */ SimpleBasePage_6() { } }
google/beacon-platform
1,110
samples/android/BeaconServiceDemoApp/app/src/main/java/com/google/sample/beaconservice/Constants.java
// Copyright 2015 Google Inc. All rights reserved. // // Licensed 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 com.google.sample.beaconservice; class Constants { private Constants() {} static final int REQUEST_CODE_PICK_ACCOUNT = 1000; static final int REQUEST_CODE_ENABLE_BLE = 1001; static final int REQUEST_CODE_RECOVER_FROM_PLAY_SERVICES_ERROR = 1002; static final int REQUEST_CODE_PLACE_PICKER = 1003; static final String AUTH_SCOPE = "oauth2:https://www.googleapis.com/auth/userlocation.beacon.registry"; static final String PREFS_NAME = "com.google.sample.beaconservice.Prefs"; }
google/bindiff
1,095
java/zylib/src/main/java/com/google/security/zynamics/zylib/gui/zygraph/editmode/actions/CDefaultBackgroundPressedRightAction.java
// Copyright 2011-2024 Google LLC // // Licensed 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 // // https://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 com.google.security.zynamics.zylib.gui.zygraph.editmode.actions; import com.google.security.zynamics.zylib.gui.zygraph.editmode.IStateAction; import com.google.security.zynamics.zylib.gui.zygraph.editmode.states.CBackgroundPressedRightState; import java.awt.event.MouseEvent; public class CDefaultBackgroundPressedRightAction implements IStateAction<CBackgroundPressedRightState> { @Override public void execute(final CBackgroundPressedRightState state, final MouseEvent event) {} }
google/caliper
1,142
caliper-runner/src/main/java/com/google/caliper/runner/server/LocalPort.java
/* * Copyright (C) 2013 Google Inc. * * Licensed 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 com.google.caliper.runner.server; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Retention; import java.lang.annotation.Target; import javax.inject.Qualifier; /** Binding annotation for the port to which the worker has bound. */ @Retention(RUNTIME) @Target({FIELD, PARAMETER, METHOD}) @Qualifier public @interface LocalPort {}
google/closure-compiler
1,129
src/com/google/javascript/jscomp/parsing/parser/trees/UnaryExpressionTree.java
/* * Copyright 2011 The Closure Compiler Authors. * * Licensed 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 com.google.javascript.jscomp.parsing.parser.trees; import com.google.javascript.jscomp.parsing.parser.Token; import com.google.javascript.jscomp.parsing.parser.util.SourceRange; public class UnaryExpressionTree extends ParseTree { public final Token operator; public final ParseTree operand; public UnaryExpressionTree(SourceRange location, Token operator, ParseTree operand) { super(ParseTreeType.UNARY_EXPRESSION, location); this.operator = operator; this.operand = operand; } }
google/guice
1,149
extensions/grapher/src/com/google/inject/grapher/NameFactory.java
/* * Copyright (C) 2008 Google Inc. * * Licensed 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 com.google.inject.grapher; import com.google.inject.Key; import java.lang.reflect.Member; /** * Interface for a service that provides nice {@link String}s that we can display in the graph for * the types that come up in {@link com.google.inject.Binding}s. * * @author phopkins@gmail.com (Pete Hopkins) */ public interface NameFactory { String getMemberName(Member member); String getClassName(Key<?> key); String getInstanceName(Object instance); String getAnnotationName(Key<?> key); String getSourceName(Object source); }
google/oboe
1,141
apps/OboeTester/app/src/main/java/com/mobileer/miditools/synth/SynthUnit.java
/* * Copyright (C) 2014 The Android Open Source Project * * Licensed 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 com.mobileer.miditools.synth; public abstract class SynthUnit { private static final double CONCERT_A_PITCH = 69.0; private static final double CONCERT_A_FREQUENCY = 440.0; /** * @param pitch * MIDI pitch in semitones * @return frequency */ public static double pitchToFrequency(double pitch) { double semitones = pitch - CONCERT_A_PITCH; return CONCERT_A_FREQUENCY * Math.pow(2.0, semitones / 12.0); } public abstract float render(); }
google/TestParameterInjector
1,117
junit4/src/main/java/com/google/testing/junit/testparameterinjector/TestParameterValues.java
/* * Copyright 2021 Google Inc. * * Licensed 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 com.google.testing.junit.testparameterinjector; import com.google.common.base.Optional; import java.lang.annotation.Annotation; /** Interface to retrieve the {@link TestParameterAnnotation} values for a test. */ interface TestParameterValues { /** * Returns a {@link TestParameterAnnotation} value for the current test as specified by {@code * testInfo}, or {@link Optional#absent()} if the {@code annotationType} is not found. */ Optional<Object> getValue(Class<? extends Annotation> annotationType); }
googleads/googleads-shopping-samples
1,131
java/src/main/java/shopping/common/TimeoutHttpRequestInitializer.java
package shopping.common; import com.google.api.client.http.HttpRequest; import com.google.api.client.http.HttpRequestInitializer; import java.io.IOException; /** * Class that enables logging for requests and responses when used as an HttpRequestInitializer. * * <p>When constructing an instance, you can optionally provide an existing HttpRequestInitializer * that this instance should wrap, so that both request initializers run on all requests and * intercept responses as appropriate. */ public class TimeoutHttpRequestInitializer implements HttpRequestInitializer { private final HttpRequestInitializer wrapped; public TimeoutHttpRequestInitializer() { this(null); } public TimeoutHttpRequestInitializer(HttpRequestInitializer toWrap) { this.wrapped = toWrap; } public void initialize(HttpRequest request) throws IOException { if (wrapped != null) { wrapped.initialize(request); } request.setConnectTimeout(1 * 60000); // Raises default timeout to 60 seconds from 20 seconds request.setReadTimeout(1 * 60000); // Raises default timeout to 60 seconds from 20 seconds } }
googleapis/google-cloud-java
1,050
java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/BatchVerifyTargetSitesResponseOrBuilder.java
/* * Copyright 2025 Google LLC * * Licensed 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 * * https://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. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/discoveryengine/v1beta/site_search_engine_service.proto // Protobuf Java Version: 3.25.8 package com.google.cloud.discoveryengine.v1beta; public interface BatchVerifyTargetSitesResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.BatchVerifyTargetSitesResponse) com.google.protobuf.MessageOrBuilder {}
googlearchive/caja
1,170
src/com/google/caja/lexer/Token.java
// Copyright (C) 2005 Google Inc. // // Licensed 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 com.google.caja.lexer; /** * A lexical token. * * @author mikesamuel@gmail.com (Mike Samuel) */ public final class Token<T extends TokenType> { public final String text; public final T type; public final FilePosition pos; public static <TT extends TokenType> Token<TT> instance(String text, TT type, FilePosition pos) { return new Token<TT>(text, type, pos); } private Token(String text, T type, FilePosition pos) { this.text = text; this.type = type; this.pos = pos; } @Override public String toString() { return text; } }
hibernate/hibernate-ogm
1,096
mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/type/impl/GeoMultiPolygonGridType.java
/* * Hibernate OGM, Domain model persistence for NoSQL datastores * * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. */ package org.hibernate.ogm.datastore.mongodb.type.impl; import org.hibernate.MappingException; import org.hibernate.engine.spi.Mapping; import org.hibernate.ogm.datastore.mongodb.type.GeoMultiPolygon; import org.hibernate.ogm.type.impl.AbstractGenericBasicType; /** * Persists {@link GeoMultiPolygon} in the format expected by MongoDB. * * @author Guillaume Smet */ public class GeoMultiPolygonGridType extends AbstractGenericBasicType<GeoMultiPolygon> { public static final GeoMultiPolygonGridType INSTANCE = new GeoMultiPolygonGridType(); public GeoMultiPolygonGridType() { super( GeoMultiPolygonGridTypeDescriptor.INSTANCE, GeoMultiPolygonTypeDescriptor.INSTANCE ); } @Override public String getName() { return "geomultipolygon"; } @Override public int getColumnSpan(Mapping mapping) throws MappingException { return 1; } }
hibernate/hibernate-orm
1,054
hibernate-core/src/test/java/org/hibernate/orm/test/sql/hand/Organization.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.sql.hand; import java.util.Collection; import java.util.HashSet; /** * @author Gavin King */ public class Organization { private long id; private String name; private Collection employments; public Organization(String name) { this.name = name; employments = new HashSet(); } public Organization() {} /** * @return Returns the employments. */ public Collection getEmployments() { return employments; } /** * @param employments The employments to set. */ public void setEmployments(Collection employments) { this.employments = employments; } /** * @return Returns the id. */ public long getId() { return id; } /** * @param id The id to set. */ public void setId(long id) { this.id = id; } /** * @return Returns the name. */ public String getName() { return name; } /** * @param name The name to set. */ public void setName(String name) { this.name = name; } }
hibernate/hibernate-orm
1,082
hibernate-testing/src/main/java/org/hibernate/testing/bytecode/enhancement/extension/BytecodeEnhancementExtension.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.testing.bytecode.enhancement.extension; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.api.extension.TestInstanceFactoryContext; import org.junit.jupiter.api.extension.TestInstancePreConstructCallback; import org.junit.jupiter.api.extension.TestInstancePreDestroyCallback; public class BytecodeEnhancementExtension implements TestInstancePreConstructCallback, TestInstancePreDestroyCallback { private ClassLoader originalClassLoader; @Override public void preConstructTestInstance(TestInstanceFactoryContext testInstanceFactoryContext, ExtensionContext extensionContext) { originalClassLoader = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader( testInstanceFactoryContext.getTestClass().getClassLoader() ); } @Override public void preDestroyTestInstance(ExtensionContext extensionContext) { Thread.currentThread().setContextClassLoader( originalClassLoader ); } }
hibernate/hibernate-orm
1,088
hibernate-core/src/main/java/org/hibernate/boot/registry/selector/spi/NamedStrategyContributions.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.boot.registry.selector.spi; /** * Target for {@linkplain NamedStrategyContributor} * * @see StrategySelector * * @author Steve Ebersole */ public interface NamedStrategyContributions { /** * Registers a named implementor of a particular strategy contract. * * @param strategy The strategy contract. * @param implementation The implementation class. * @param names The registration names. * * @param <T> The strategy type. */ <T> void contributeStrategyImplementor(Class<T> strategy, Class<? extends T> implementation, String... names); /** * Un-registers a named implementor of a particular strategy contract. Un-registers all named registrations * for the given strategy contract naming the given class. * * @param strategy The strategy contract. * @param implementation The implementation class. * * @param <T> The strategy type. */ <T> void removeStrategyImplementor(Class<T> strategy, Class<? extends T> implementation); }
hibernate/hibernate-orm
1,089
hibernate-core/src/main/java/org/hibernate/tool/schema/spi/GenerationTarget.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.tool.schema.spi; /** * Describes a schema generation target * * @author Steve Ebersole */ public interface GenerationTarget { /** * Prepare for accepting actions * * @throws SchemaManagementException If there is a problem preparing the target. */ void prepare(); /** * Called just before a script is executed using one or more calls to {@link #accept(String)}. * <p> * May be used for logging in particular. * @param scriptSource The source for the script that is about to be executed. */ default void beforeScript(ScriptSourceInput scriptSource) { // Defaults to no-op } /** * Accept a command * * @param command The command * * @throws SchemaManagementException If there is a problem accepting the action. */ void accept(String command); /** * Release this target, giving it a change to release its resources. * * @throws SchemaManagementException If there is a problem releasing the target. */ void release(); }
hibernate/hibernate-search
1,052
backend/elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/analysis/model/dsl/impl/ElasticsearchAnalyzerParametersStep.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.backend.elasticsearch.analysis.model.dsl.impl; import org.hibernate.search.backend.elasticsearch.analysis.model.impl.ElasticsearchAnalysisDefinitionCollector; import org.hibernate.search.backend.elasticsearch.logging.impl.AnalysisLog; import org.hibernate.search.backend.elasticsearch.lowlevel.index.analysis.impl.AnalyzerDefinition; import org.hibernate.search.util.common.impl.StringHelper; class ElasticsearchAnalyzerParametersStep extends AbstractElasticsearchAnalysisComponentParametersStep<AnalyzerDefinition> { ElasticsearchAnalyzerParametersStep(String name, String type) { super( name, new AnalyzerDefinition() ); type( type ); } @Override public void contribute(ElasticsearchAnalysisDefinitionCollector collector) { if ( StringHelper.isEmpty( definition.getType() ) ) { throw AnalysisLog.INSTANCE.invalidElasticsearchTypedAnalyzerDefinition( name ); } collector.collect( name, definition ); } }
hibernate/hibernate-validator
1,050
annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/crossparameters/WrongValidationAppliesToConstraintWithInvalidReturnType.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.validator.ap.testmodel.crossparameters; import static java.lang.annotation.ElementType.ANNOTATION_TYPE; import static java.lang.annotation.ElementType.CONSTRUCTOR; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.Target; import jakarta.validation.Constraint; import jakarta.validation.Payload; @Target({ ANNOTATION_TYPE, METHOD, CONSTRUCTOR }) @Retention(RUNTIME) @Constraint(validatedBy = { GenericCrossParameterValidator.class }) @Documented public @interface WrongValidationAppliesToConstraintWithInvalidReturnType { String message() default "{WrongValidationAppliesToConstraintWithInvalidReturnType.message}"; Class<?>[] groups() default { }; Class<? extends Payload>[] payload() default { }; String validationAppliesTo() default "IMPLICIT"; }
hibernate/hibernate-validator
1,077
engine/src/test/java/org/hibernate/validator/test/internal/engine/traversableresolver/AuthorBusinessRules.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.validator.test.internal.engine.traversableresolver; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import jakarta.validation.Constraint; import jakarta.validation.ConstraintValidator; import jakarta.validation.ConstraintValidatorContext; import jakarta.validation.Payload; @Constraint(validatedBy = { AuthorBusinessRules.AuthorBusinessRulesValidator.class }) @Documented @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) public @interface AuthorBusinessRules { String message() default ""; Class<?>[] groups() default { }; Class<? extends Payload>[] payload() default { }; class AuthorBusinessRulesValidator implements ConstraintValidator<AuthorBusinessRules, Object> { @Override public boolean isValid(Object value, ConstraintValidatorContext context) { return true; } } }
openjdk/jdk8
1,144
jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/Node.java
/* * reserved comment block * DO NOT REMOVE OR ALTER! */ /* * Copyright 2001-2004 The Apache Software Foundation. * * Licensed 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. */ /* * $Id: Node.java,v 1.2.4.1 2005/09/06 11:10:29 pvedula Exp $ */ package com.sun.org.apache.xalan.internal.xsltc.runtime; /** * This class is used as "wrapper" for dom nodes. Wrappers are needed when * a node is passed as a parameter to a template. * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen */ public class Node { public int node; public int type; public Node(int n, int t) { node = n; type = t; } }
openjdk/jtreg
1,177
test/modlibs/compileAction/patch/CompilePatch.java
/* * Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /* * @test * @compile/module=java.base java/io/IOHelper.java * @compile/module=java.base java/io/IOHelper2.jasm */
openjdk/jtreg
1,191
test/4499340/lib/HelloWorld.java
/* * Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package p; public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World"); } }
openjdk/skara
1,163
forge/src/main/java/org/openjdk/skara/forge/WorkflowStatus.java
/* * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.skara.forge; public enum WorkflowStatus { NOT_CONFIGURED, ENABLED, DISABLED, }
oracle/coherence
1,115
prj/coherence-testing-data/src/main/java/data/persistence/PersonId.java
/* * Copyright (c) 2000, 2022, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * http://oss.oracle.com/licenses/upl. */ package data.persistence; import com.tangosol.util.Base; import java.io.Serializable; public class PersonId implements Serializable { public PersonId() {} public PersonId(int nId, String sId) { this.m_nId = nId; this.m_sId = sId; } public int getId() { return m_nId; } public String getIdString() { return m_sId; } public boolean equals(Object o) { if (o instanceof PersonId) { PersonId that = (PersonId) o; return this.m_nId == that.m_nId && Base.equals(this.m_sId, that.m_sId); } return false; } public int hashCode() { return m_nId; } public String toString() { return "PersonId(" + m_nId + ", " + m_sId + ")"; } int m_nId; String m_sId; }
oracle/coherence
1,131
prj/coherence-core/src/main/java/com/tangosol/coherence/config/scheme/QueueScheme.java
/* * Copyright (c) 2000, 2024, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * https://oss.oracle.com/licenses/upl. */ package com.tangosol.coherence.config.scheme; import com.tangosol.coherence.config.builder.MapBuilder; import com.tangosol.coherence.config.builder.NamedCollectionBuilder; import com.tangosol.config.expression.ParameterResolver; import com.tangosol.net.NamedCollection; import com.tangosol.net.NamedQueue; /** * The {@link QueueScheme} class is responsible for building a fully * configured instance of a queue. */ @SuppressWarnings("rawtypes") public interface QueueScheme<C extends NamedQueue, S> extends NamedCollectionBuilder<C>, ServiceScheme { /** * Obtain a configured queue service. * * @param resolver the {@link ParameterResolver} to use to resolve the service parameters * @param deps the dependencies to use to configure the service * * @return a configured queue service */ public S ensureConfiguredService(ParameterResolver resolver, MapBuilder.Dependencies deps); }
apache/cxf
1,104
rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/grants/jwt/JwtUserSubjectTest.java
/** * 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.cxf.rs.security.oauth2.grants.jwt; import org.junit.Test; import static org.junit.Assert.assertNotNull; public class JwtUserSubjectTest { @Test public void testJwtUserSubject() { // to be expanded assertNotNull(new JwtUserSubject("user", null)); } }
apache/cxf
1,122
rt/ws/eventing/src/main/java/org/apache/cxf/ws/eventing/backend/database/SubscriptionDatabase.java
/** * 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.cxf.ws.eventing.backend.database; import java.util.List; import java.util.UUID; public interface SubscriptionDatabase { void addTicket(SubscriptionTicket ticket); List<SubscriptionTicket> getTickets(); SubscriptionTicket findById(UUID id); void removeTicketByUUID(UUID id); }
apache/cxf
1,135
rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/NillableService.java
/** * 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.cxf.aegis.services; /** * A minimal service for testing nillable annotations in Aegis XML. */ public class NillableService { public NillableService() { } public boolean submitStringArray(String[] array) { return true; } public void takeNotNillableString(String string) { } }
apache/cxf
1,140
rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/service/GenericsService.java
/** * 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.cxf.jaxws.service; import java.io.Serializable; import jakarta.jws.WebService; /** * */ @WebService(targetNamespace = "http://jaxws.cxf.apache.org/") public interface GenericsService<DTO extends Entity<? extends Serializable>, QS extends QuerySummary> { QueryResult<DTO, QS> read(String query, String uc); }
apache/cxf
1,142
systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ArrayService.java
/** * 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.cxf.systest.jaxws; import jakarta.jws.WebMethod; import jakarta.jws.WebParam; import jakarta.jws.WebService; @WebService(targetNamespace = "org.apache.cxf.systest.jaxws") public interface ArrayService { @WebMethod(operationName = "init") void initValueNotNull(@WebParam(name = "values") String[] values); }
apache/deltaspike
1,098
deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc001/PartialBean.java
/* * 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.deltaspike.test.core.api.partialbean.uc001; import org.apache.deltaspike.test.core.api.partialbean.shared.TestPartialBeanBinding; import jakarta.enterprise.context.RequestScoped; @TestPartialBeanBinding @RequestScoped public interface PartialBean { String getResult(); }
apache/directory-kerby
1,133
kerby-pkix/src/main/java/org/apache/kerby/cms/type/RelativeDistinguishedName.java
/** * 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.kerby.cms.type; import org.apache.kerby.asn1.type.Asn1SetOf; import org.apache.kerby.x500.type.AttributeTypeAndValue; /** * RelativeDistinguishedName ::= SET SIZE (1..MAX) OF AttributeTypeAndValue */ public class RelativeDistinguishedName extends Asn1SetOf<AttributeTypeAndValue> { }
apache/directory-studio
1,100
plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/valueeditors/InPlaceTextValueEditor.java
/* * 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.directory.studio.valueeditors; /** * The default editor for string values. * * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> */ public class InPlaceTextValueEditor extends AbstractInPlaceStringValueEditor { }
apache/doris-manager
1,117
manager/manager/src/main/java/org/apache/doris/stack/model/prometheus/MonitoringNodesConfig.java
// 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.doris.stack.model.prometheus; import java.util.List; import java.util.Map; public class MonitoringNodesConfig { private List<Targets> nodesConfig; @lombok.Data public static class Targets { private List<String> targets; private Map<String, String> labels; } }
apache/drill
1,123
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/materialize/RecordMaterializer.java
/* * 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.drill.exec.physical.impl.materialize; import org.apache.drill.exec.proto.UserBitShared.QueryId; import org.apache.drill.exec.record.VectorContainer; public interface RecordMaterializer { public QueryWritableBatch convertNext(); public QueryId queryId(); public VectorContainer incoming(); }
apache/drill
1,136
contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/DrillHBaseTable.java
/* * 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.drill.exec.store.hbase; public class DrillHBaseTable extends AbstractHBaseDrillTable { public DrillHBaseTable(String storageEngineName, HBaseStoragePlugin plugin, HBaseScanSpec scanSpec) { super(storageEngineName, plugin, scanSpec); setTableDesc(plugin.getConnection(), scanSpec.getTableName()); } }
apache/drill
1,148
exec/java-exec/src/main/java/org/apache/drill/exec/store/mock/IntGen.java
/* * 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.drill.exec.store.mock; /** * Generates integer values uniformly randomly distributed over * the entire 32-bit integer range from * {@link Integer.MIN_VALUE} to {@link Integer.MAX_VALUE}. */ public class IntGen extends AbstractFieldGen { @Override public void setValue() { colWriter.setInt(rand.nextInt()); } }
apache/druid
1,140
processing/src/main/java/org/apache/druid/data/input/ByteBufferInputRowParser.java
/* * 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.druid.data.input; import org.apache.druid.data.input.impl.InputRowParser; import org.apache.druid.data.input.impl.ParseSpec; import java.nio.ByteBuffer; public interface ByteBufferInputRowParser extends InputRowParser<ByteBuffer> { @Override ByteBufferInputRowParser withParseSpec(ParseSpec parseSpec); }
apache/dubbo-samples
1,103
2-advanced/dubbo-samples-version/src/main/java/org/apache/dubbo/samples/version/impl/VersionServiceImpl2.java
/* * * 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.dubbo.samples.version.impl; import org.apache.dubbo.samples.version.api.VersionService; public class VersionServiceImpl2 implements VersionService { @Override public String sayHello(String name) { return "hello2, " + name; } }
apache/dubbo-spi-extensions
1,104
dubbo-rpc-extensions/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/filter/RestFilter.java
/* * 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.dubbo.rpc.protocol.rest.filter; import org.apache.dubbo.rpc.protocol.rest.filter.context.RestFilterContext; /** * Rest filter is extended by rest request & response filter */ public interface RestFilter { void filter(RestFilterContext restFilterContext) throws Exception; }
apache/dubbo
1,136
dubbo-common/src/main/java/org/apache/dubbo/common/concurrent/DiscardOldestPolicy.java
/* * 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.dubbo.common.concurrent; import java.util.Queue; /** * A handler for rejected element that discards the oldest element. */ public class DiscardOldestPolicy<E> implements Rejector<E> { @Override public void reject(final E e, final Queue<E> queue) { queue.poll(); queue.offer(e); } }
apache/eventmesh
1,117
eventmesh-common/src/main/java/org/apache/eventmesh/common/remote/exception/RemoteRuntimeException.java
/* * 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.eventmesh.common.remote.exception; public class RemoteRuntimeException extends RuntimeException { protected final int code; protected final String message; public RemoteRuntimeException(int code, String message) { this.code = code; this.message = message; } }
apache/fineract
1,083
fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionMakeRepaymentPostEvent.java
/** * 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.fineract.test.messaging.event.loan.transaction; public class LoanTransactionMakeRepaymentPostEvent extends AbstractLoanTransactionEvent { @Override public String getEventName() { return "LoanTransactionMakeRepaymentPostBusinessEvent"; } }
apache/fineract
1,106
fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/InterestRecalculationCompoundingMethod.java
/** * 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.fineract.test.data; public enum InterestRecalculationCompoundingMethod { NONE(0), // INTEREST(1), // FEE(2), // FEE_AND_INTEREST(3); // public final Integer value; InterestRecalculationCompoundingMethod(Integer value) { this.value = value; } }
apache/fineract
1,111
fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/PlatformUserDetailsService.java
/** * 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.fineract.infrastructure.security.service; import org.springframework.security.core.userdetails.UserDetailsService; /** * Interface to hide implementation detail of spring security. */ public interface PlatformUserDetailsService extends UserDetailsService { // no added behaviour }
apache/fineract
1,125
fineract-provider/src/main/java/org/apache/fineract/cob/data/LoanAccountStayedLockedData.java
/** * 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.fineract.cob.data; import lombok.AllArgsConstructor; import lombok.Getter; import org.apache.fineract.infrastructure.core.domain.ExternalId; @Getter @AllArgsConstructor public class LoanAccountStayedLockedData { private Long id; private ExternalId externalId; private String accountNo; }
apache/flink-ml
1,129
flink-ml-servable-core/src/main/java/org/apache/flink/ml/servable/types/BasicType.java
/* * 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.flink.ml.servable.types; import org.apache.flink.annotation.PublicEvolving; /** This enum class lists primitive types such as boolean, int, long, etc. */ @PublicEvolving public enum BasicType { BOOLEAN, BYTE, SHORT, INT, LONG, FLOAT, DOUBLE, STRING, BYTE_STRING; }
apache/flink
1,126
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/ShowOperation.java
/* * 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.flink.table.operations; import org.apache.flink.annotation.Internal; /** * An {@link Operation} that show one kind of objects, e.g. USE CATALOGS, USE DATABASES, SHOW * TABLES, SHOW FUNCTIONS, SHOW PARTITIONS. */ @Internal public interface ShowOperation extends Operation, ExecutableOperation {}
apache/flink
1,133
flink-runtime/src/main/java/org/apache/flink/runtime/memory/MemoryReservationException.java
/* * 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.flink.runtime.memory; /** An exception to be thrown when a memory reservation operation is not successful. */ public class MemoryReservationException extends Exception { private static final long serialVersionUID = 1L; MemoryReservationException(String message) { super(message); } }
apache/fluss
1,122
fluss-flink/fluss-flink-common/src/test/java/org/apache/fluss/flink/tiering/TestingWriteResult.java
/* * 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.fluss.flink.tiering; /** A WriteResult for testing purpose. */ public class TestingWriteResult { private final int writeResult; public TestingWriteResult(int writeResult) { this.writeResult = writeResult; } public int getWriteResult() { return writeResult; } }
apache/geaflow
1,083
geaflow/geaflow-core/geaflow-engine/geaflow-cluster/src/main/java/org/apache/geaflow/cluster/clustermanager/ExecutorRegisterException.java
/* * 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.geaflow.cluster.clustermanager; import org.apache.geaflow.common.exception.GeaflowRuntimeException; public class ExecutorRegisterException extends GeaflowRuntimeException { public ExecutorRegisterException(Throwable e) { super(e); } }
apache/geaflow
1,092
geaflow/geaflow-core/geaflow-engine/geaflow-cluster/src/main/java/org/apache/geaflow/cluster/protocol/ICycleResponseEvent.java
/* * 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.geaflow.cluster.protocol; public interface ICycleResponseEvent extends IEvent { /** * The cycle id of the callback event. */ int getCycleId(); /** * Returns the scheduler id of the callback event. */ long getSchedulerId(); }
apache/geaflow
1,095
geaflow/geaflow-core/geaflow-engine/geaflow-cluster/src/main/java/org/apache/geaflow/cluster/rpc/IPipelineMasterEndpoint.java
/* * 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.geaflow.cluster.rpc; import org.apache.geaflow.rpc.proto.Container.Request; import org.apache.geaflow.rpc.proto.Container.Response; public interface IPipelineMasterEndpoint { /** * Pipeline master process. */ Response process(Request request); }
apache/geaflow
1,121
geaflow-console/app/common/dal/src/main/java/org/apache/geaflow/console/common/dal/IdGenerator.java
/* * 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.geaflow.console.common.dal; import org.apache.commons.lang3.RandomStringUtils; import org.springframework.stereotype.Component; @Component public class IdGenerator { public static String nextId() { return System.currentTimeMillis() + RandomStringUtils.randomNumeric(6); } }
apache/geode
1,107
geode-lucene/geode-lucene-test/src/main/java/org/apache/geode/cache/lucene/internal/repository/serializer/Type2.java
/* * 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.geode.cache.lucene.internal.repository.serializer; /** * A test type to get mapped to a lucene document */ public class Type2 extends Type1 { private final String s2; public Type2(String s, int i, long l, double d, float f, String s2) { super(s, i, l, d, f); this.s2 = s2; } }
apache/geode
1,120
geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/PreconditionException.java
/* * 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.geode.connectors.jdbc.internal.cli; /** * Used in gfsh commands that do precondition checks * to indicate that a precondition check failed. */ @SuppressWarnings("serial") public class PreconditionException extends Exception { public PreconditionException(String message) { super(message); } }
apache/geode
1,130
geode-tcp-server/src/main/java/org/apache/geode/distributed/internal/tcpserver/InfoRequest.java
/* * 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.geode.distributed.internal.tcpserver; import org.apache.geode.internal.serialization.BasicSerializable; /** * A request to the TCP server to provide information about the server * * @deprecated this was created for the deprecated Admin API */ @Deprecated public class InfoRequest implements BasicSerializable { }
apache/geode
1,147
geode-junit/src/main/java/org/apache/geode/cache/query/data/Data.java
/* * 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.geode.cache.query.data; import java.io.Serializable; public class Data implements Serializable { /** Creates a new instance of Data */ public Data() { // nothing } public void voidMethod() { // nothing } public boolean booleanMethod() { return true; } public Object nullMethod() { return null; } }
apache/gobblin
1,146
gobblin-test-utils/src/main/java/org/apache/gobblin/test/TimingResult.java
/* * 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.gobblin.test; /** * A class to hold the result of a latency decision in a testing context. */ public class TimingResult { public final boolean isSync; public final long timeValueMillis; TimingResult(boolean isSync, long timeValueMillis) { this.isSync = isSync; this.timeValueMillis = timeValueMillis; } }
apache/gobblin
1,152
gobblin-api/src/main/java/gobblin/source/extractor/WatermarkInterval.java
/* * 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 gobblin.source.extractor; /*** * Shim layer for org.apache.gobblin.source.extractor.WatermarkInterval */ public class WatermarkInterval extends org.apache.gobblin.source.extractor.WatermarkInterval { public WatermarkInterval(Watermark lowWatermark, Watermark expectedHighWatermark) { super(lowWatermark, expectedHighWatermark); } }
apache/gravitino
1,125
core/src/main/java/org/apache/gravitino/stats/storage/LancePartitionStatisticStorageFactory.java
/* * 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.gravitino.stats.storage; import java.util.Map; public class LancePartitionStatisticStorageFactory implements PartitionStatisticStorageFactory { @Override public PartitionStatisticStorage create(Map<String, String> properties) { return new LancePartitionStatisticStorage(properties); } }
apache/groovy-geb
1,147
module/geb-core/src/main/groovy/geb/textmatching/AllTextMatcher.java
/* * 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 geb.textmatching; import java.util.Arrays; class AllTextMatcher extends CompositeTextMatcher { public AllTextMatcher(TextMatcher[] matchers) { super(matchers); } @Override public boolean matches(String text) { return Arrays.stream(matchers).allMatch(m -> m.matches(text)); } }
apache/groovy-geb
1,147
module/geb-core/src/main/groovy/geb/textmatching/AnyTextMatcher.java
/* * 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 geb.textmatching; import java.util.Arrays; class AnyTextMatcher extends CompositeTextMatcher { public AnyTextMatcher(TextMatcher[] matchers) { super(matchers); } @Override public boolean matches(String text) { return Arrays.stream(matchers).anyMatch(m -> m.matches(text)); } }
apache/groovy
1,189
benchmark/bench/hash.java
// $Id: hash.java,v 1.1 2004-05-23 05:06:51 bfulgham Exp $ // http://www.bagley.org/~doug/shootout/ // this program is modified from: // http://cm.bell-labs.com/cm/cs/who/bwk/interps/pap.html // Timing Trials, or, the Trials of Timing: Experiments with Scripting // and User-Interface Languages</a> by Brian W. Kernighan and // Christopher J. Van Wyk. import java.io.*; import java.util.*; public class hash { public static void main(String args[]) throws IOException { int n = Integer.parseInt(args[0]); int i, c; String s = ""; Integer ii; // the original program used: // Hashtable ht = new Hashtable(); // John Olsson points out that Hashtable is for synchronized access // and we should use instead: HashMap ht = new HashMap(); c = 0; for (i = 1; i <= n; i++) ht.put(Integer.toString(i, 16), new Integer(i)); for (i = 1; i <= n; i++) // The original code converted to decimal string this way: // if (ht.containsKey(i+"")) if (ht.containsKey(Integer.toString(i, 10))) c++; System.out.println(c); } }
apache/hadoop-common
1,118
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFcLocalFsUtil.java
/** * 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.hadoop.fs; import org.junit.Before; /** * Test Util for localFs using FileContext API. */ public class TestFcLocalFsUtil extends FileContextUtilBase { @Override @Before public void setUp() throws Exception { fc = FileContext.getLocalFSFileContext(); super.setUp(); } }
apache/hadoop
1,068
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/rm/ContainerAllocator.java
/** * 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.hadoop.mapreduce.v2.app.rm; import org.apache.hadoop.yarn.event.EventHandler; public interface ContainerAllocator extends EventHandler<ContainerAllocatorEvent>{ enum EventType { CONTAINER_REQ, CONTAINER_DEALLOCATE, CONTAINER_FAILED } }
apache/hadoop
1,113
hadoop-cloud-storage-project/hadoop-tos/src/main/java/org/apache/hadoop/fs/tosfs/common/package-info.java
/* * 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. */ /** * Classes for hadoop-tos common. */ @InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce", "YARN", "Hive"}) @InterfaceStability.Evolving package org.apache.hadoop.fs.tosfs.common; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability;
apache/hadoop
1,113
hadoop-cloud-storage-project/hadoop-tos/src/main/java/org/apache/hadoop/fs/tosfs/object/package-info.java
/* * 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. */ /** * Classes for hadoop-tos object. */ @InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce", "YARN", "Hive"}) @InterfaceStability.Evolving package org.apache.hadoop.fs.tosfs.object; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability;
apache/hadoop
1,125
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/package-info.java
/* * 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. */ /** * ViewFileSystem and ViewFileSystemOverloadScheme classes. */ @InterfaceAudience.LimitedPrivate({"MapReduce", "HBase", "Hive" }) @InterfaceStability.Stable package org.apache.hadoop.fs.viewfs; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability;
apache/hadoop
1,134
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/audit/impl/package-info.java
/* * 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. */ /** * The internal implementations of auditing support. * This package is not for use by extensions. */ @InterfaceAudience.Private @InterfaceStability.Unstable package org.apache.hadoop.fs.s3a.audit.impl; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability;
apache/harmony
1,143
classlib/modules/concurrent/src/main/java/java/util/concurrent/Callable.java
/* * Written by Doug Lea with assistance from members of JCP JSR-166 * Expert Group and released to the public domain, as explained at * http://creativecommons.org/licenses/publicdomain */ package java.util.concurrent; /** * A task that returns a result and may throw an exception. * Implementors define a single method with no arguments called * <tt>call</tt>. * * <p>The <tt>Callable</tt> interface is similar to {@link * java.lang.Runnable}, in that both are designed for classes whose * instances are potentially executed by another thread. A * <tt>Runnable</tt>, however, does not return a result and cannot * throw a checked exception. * * <p> The {@link Executors} class contains utility methods to * convert from other common forms to <tt>Callable</tt> classes. * * @see Executor * @since 1.5 * @author Doug Lea * @param <V> the result type of method <tt>call</tt> */ public interface Callable<V> { /** * Computes a result, or throws an exception if unable to do so. * * @return computed result * @throws Exception if unable to compute a result */ V call() throws Exception; }
apache/hbase
1,134
hbase-common/src/main/java/org/apache/hadoop/hbase/exceptions/KeyManagerException.java
/* * 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.hadoop.hbase.exceptions; import org.apache.yetus.audience.InterfaceAudience; @InterfaceAudience.Private public class KeyManagerException extends X509Exception { public KeyManagerException(String message) { super(message); } public KeyManagerException(Throwable cause) { super(cause); } }
apache/hbase
1,139
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockPriority.java
/* * 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.hadoop.hbase.io.hfile; import org.apache.yetus.audience.InterfaceAudience; @InterfaceAudience.Private public enum BlockPriority { /** * Accessed a single time (used for scan-resistance) */ SINGLE, /** * Accessed multiple times */ MULTI, /** * Block from in-memory store */ MEMORY }
apache/hbase
1,144
hbase-server/src/main/java/org/apache/hadoop/hbase/io/MetricsIOWrapperImpl.java
/* * 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.hadoop.hbase.io; import org.apache.hadoop.hbase.io.hfile.HFile; import org.apache.yetus.audience.InterfaceAudience; @InterfaceAudience.Private public class MetricsIOWrapperImpl implements MetricsIOWrapper { @Override public long getChecksumFailures() { return HFile.getAndResetChecksumFailuresCount(); } }
apache/helix
1,149
helix-core/src/main/java/org/apache/helix/HelixRollbackException.java
package org.apache.helix; /* * 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. */ public class HelixRollbackException extends HelixException { public HelixRollbackException(String message) { super(message); } public HelixRollbackException(Throwable cause) { super(cause); } public HelixRollbackException(String message, Throwable cause) { super(message, cause); } }
apache/hertzbeat
1,126
hertzbeat-alerter/src/main/java/org/apache/hertzbeat/alert/dto/AlertPriorityNum.java
/* * 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.hertzbeat.alert.dto; import lombok.AllArgsConstructor; import lombok.Data; /** * Number of monitoring level alarms */ @Data @AllArgsConstructor public class AlertPriorityNum { /** * Alarm level */ private byte priority; /** * Alarm count */ private long num; }
apache/hive
1,144
service/src/java/org/apache/hive/service/auth/saml/HttpSamlRedirectException.java
/* * 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.hive.service.auth.saml; /** * Exception used in SAML auth workflow to determine if a given request needs * to be redirected to the external identity provider. */ public class HttpSamlRedirectException extends HttpSamlAuthenticationException { public HttpSamlRedirectException(String msg) { super(msg); } }
apache/hudi
1,140
hudi-common/src/main/java/org/apache/hudi/exception/HoodieMetadataException.java
/* * 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.hudi.exception; /** * <p> * Exception thrown for table metadata related failures. * </p> */ public class HoodieMetadataException extends HoodieException { public HoodieMetadataException(String msg, Exception t) { super(msg, t); } public HoodieMetadataException(String msg) { super(msg); } }
apache/iceberg
1,157
core/src/test/java/org/apache/iceberg/TestManifestEncryption.java
/* * 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.iceberg; import org.apache.iceberg.encryption.EncryptionManager; import org.apache.iceberg.encryption.EncryptionTestHelpers; public class TestManifestEncryption extends TestManifestWriterVersions { @Override protected EncryptionManager encryptionManager() { return EncryptionTestHelpers.createEncryptionManager(); } }
apache/ignite-3
1,128
modules/raft/src/main/java/org/apache/ignite/internal/raft/storage/impl/UnlimitedBudget.java
/* * 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.raft.storage.impl; import org.apache.ignite.raft.jraft.entity.LogEntry; /** * {@link LogStorageBudget} that always allows everything. */ public class UnlimitedBudget implements LogStorageBudget { @Override public boolean hasRoomFor(LogEntry entry) { return true; } }
apache/ignite-3
1,135
modules/cli/src/test/java/org/apache/ignite/internal/cli/core/call/ThrowingStrCall.java
/* * 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.cli.core.call; /** Test call that throws a runtime exception. **/ public class ThrowingStrCall implements Call<StringCallInput, String> { @Override public CallOutput<String> execute(StringCallInput input) { return DefaultCallOutput.failure(new RuntimeException("Ooops!")); } }
apache/ignite
1,124
modules/core/src/main/java/org/apache/ignite/internal/management/cache/ValidateIndexesContext.java
/* * 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.management.cache; /** * Validate indexes context. */ public interface ValidateIndexesContext { /** * Returns a boolean value meaning whether the check is canceled or not. * * @return True if cancelled, otherwise false. */ public boolean isCancelled(); }
apache/incubator-datalab
1,119
services/self-service/src/main/java/com/epam/datalab/backendapi/annotation/ProjectAdmin.java
/* * 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 com.epam.datalab.backendapi.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) public @interface ProjectAdmin { }