repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
apache/shenyu | 1,106 | shenyu-alert/src/main/java/org/apache/shenyu/alert/exception/AlertNoticeException.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.shenyu.alert.exception;
/**
* alert notice send failed.
*/
public class AlertNoticeException extends RuntimeException {
private static final long serialVersionUID = 1904557336581968426L;
public AlertNoticeException(final String message) {
super(message);
}
}
|
apache/skywalking | 1,058 | oap-server/server-library/library-elasticsearch-client/src/main/java/org/apache/skywalking/library/elasticsearch/response/Index.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.library.elasticsearch.response;
import java.util.Map;
import lombok.Data;
@Data
public final class Index {
private Map<String, Object> settings;
private Mappings mappings;
private Map<String, Object> aliases;
}
|
apache/skywalking | 1,071 | oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/type/trace/v2/RetrievedTimeRange.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.query.type.trace.v2;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@Getter
@RequiredArgsConstructor
public class RetrievedTimeRange {
private final long startTime;
private final long endTime;
}
|
apache/skywalking | 1,075 | oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/type/TemplateChangeStatus.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.query.type;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
@Setter
@Getter
@Builder
public class TemplateChangeStatus {
private String id;
private boolean status;
private String message;
}
|
apache/solr | 1,119 | solr/modules/ltr/src/java/org/apache/solr/ltr/norm/NormalizerException.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.solr.ltr.norm;
public class NormalizerException extends RuntimeException {
private static final long serialVersionUID = 1L;
public NormalizerException(String message) {
super(message);
}
public NormalizerException(String message, Exception cause) {
super(message, cause);
}
}
|
apache/solr | 1,120 | solr/benchmark/src/java/org/apache/solr/bench/generators/BooleansDSL.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.solr.bench.generators;
import org.apache.solr.bench.SolrGenerate;
public class BooleansDSL {
/**
* Generates either true or false randomly.
*
* @return a Source of booleans
*/
public SolrGen<Boolean> all() {
return new SolrGen<>(SolrGenerate.booleans(), Boolean.class);
}
}
|
apache/stanbol | 1,074 | enhancer/generic/nlp/src/main/java/org/apache/stanbol/enhancer/nlp/dependency/GrammaticalRelationCategory.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.stanbol.enhancer.nlp.dependency;
/**
* The top level category that a grammatical relation belongs to.
*
* @author Cristian Petroaca
*
*/
public enum GrammaticalRelationCategory {
Argument,
Auxiliary,
DependencyLabel,
SemanticDependent;
}
|
apache/stratos | 1,054 | components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/payload/FrameworkCartridgePayloadData.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.stratos.autoscaler.applications.payload;
public class FrameworkCartridgePayloadData extends PayloadData {
public FrameworkCartridgePayloadData(BasicPayloadData basicPayloadData) {
super(basicPayloadData);
}
}
|
apache/tapestry-5 | 1,074 | tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/PerFormValidationMessageDemo.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.pages;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.beaneditor.DataType;
import org.apache.tapestry5.beaneditor.ReorderProperties;
import org.apache.tapestry5.beaneditor.Validate;
@ReorderProperties("userId,password")
public class PerFormValidationMessageDemo
{
@Validate("required,minlength")
@Property
private String userId;
@Validate("required")
@DataType("password")
@Property
private String password;
}
|
apache/tapestry-5 | 1,119 | plastic/src/main/java/org/apache/tapestry5/plastic/AnnotationAccess.java | // Copyright 2011 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.
package org.apache.tapestry5.plastic;
import java.lang.annotation.Annotation;
/** Interface implemented by members that may hold annotations. */
public interface AnnotationAccess
{
/** Checks to see if the target has an annotation of the given type. */
<T extends Annotation> boolean hasAnnotation(Class<T> annotationType);
/** Returns an instantiated annotation, or null if the target does not have the indicated annotation. */
<T extends Annotation> T getAnnotation(Class<T> annotationType);
}
|
apache/thrift | 1,107 | lib/java/src/main/java/org/apache/thrift/transport/sasl/TInvalidSaslFrameException.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.thrift.transport.sasl;
/** Got an invalid frame that does not respect the thrift sasl protocol. */
public class TInvalidSaslFrameException extends TSaslNegotiationException {
public TInvalidSaslFrameException(String message) {
super(ErrorType.PROTOCOL_ERROR, message);
}
}
|
apache/tomcat | 1,144 | java/org/apache/catalina/tribes/Heartbeat.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.catalina.tribes;
/**
* Can be implemented by the ChannelListener and Membership listeners to receive heartbeat notifications from the
* Channel
*
* @see Channel
* @see Channel#heartbeat()
*/
public interface Heartbeat {
/**
* Heartbeat invocation for resources cleanup etc
*/
void heartbeat();
} |
apache/tomcat | 1,144 | test/org/apache/el/parser/TestAstChoice.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.el.parser;
import jakarta.el.ELProcessor;
import org.junit.Assert;
import org.junit.Test;
public class TestAstChoice {
@Test
public void test01() {
ELProcessor processor = new ELProcessor();
Long result = processor.eval("null?1:2");
Assert.assertEquals(Long.valueOf(2), result);
}
}
|
apache/tomee | 1,107 | tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/WebDeploymentListener.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.tomee.catalina;
import org.apache.openejb.assembler.classic.AppInfo;
import org.apache.openejb.assembler.classic.WebAppInfo;
/**
* @version $Rev$ $Date$
*/
public interface WebDeploymentListener {
void afterApplicationCreated(final AppInfo appInfo,final WebAppInfo webApp);
}
|
apache/tomee | 1,114 | maven/tomee-maven-plugin/src/test/java/org/apache/openejb/maven/plugin/Config.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.maven.plugin;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface Config {
}
|
apache/tomee | 1,116 | container/openejb-core/src/test/java/org/apache/openejb/mbeans/Reader.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.mbeans;
import org.apache.openejb.api.jmx.Description;
import org.apache.openejb.api.jmx.MBean;
import org.apache.openejb.api.jmx.ManagedAttribute;
@MBean
@Description("descr ;)")
public class Reader {
@ManagedAttribute
public int getValue() {
return 2;
}
}
|
apache/usergrid | 1,079 | stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/consistency/TimeService.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.consistency;
/**
* Simple time service to get the current system time. Useful in mocking
*/
public interface TimeService {
/**
* Get the current time
* @return
*/
public long getCurrentTime();
}
|
google/binnavi | 1,099 | src/main/java/com/google/security/zynamics/binnavi/API/disassembly/View2DListenerAdapter.java | // Copyright 2011-2016 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
//
// 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.security.zynamics.binnavi.API.disassembly;
import com.google.security.zynamics.binnavi.yfileswrap.API.disassembly.View2D;
// / Simplifies View2D listeners.
/**
* Adapter class that can be used by classes that want to listen on View2D objects but only need to
* be notified about few events.
*/
public class View2DListenerAdapter implements IView2DListener {
@Override
public void changedView2D(final View2D view, final View oldView, final View newView) {
// Adapter class
}
}
|
google/copybara | 1,120 | java/com/google/copybara/jcommander/GreaterThanZeroValidator.java | /*
* Copyright (C) 2017 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.copybara.jcommander;
import com.beust.jcommander.IParameterValidator;
import com.beust.jcommander.ParameterException;
/**
* Check if a parameter is greater than zero.
*/
public class GreaterThanZeroValidator implements IParameterValidator {
public void validate(String name, String value) throws ParameterException {
if (Integer.parseInt(value) < 1) {
throw new ParameterException(
String.format("Parameter %s should be greater than zero (found %s)", name, value));
}
}
}
|
google/gitiles | 1,142 | java/com/google/gitiles/blame/cache/BlameCache.java | // Copyright (C) 2014 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.gitiles.blame.cache;
import java.io.IOException;
import java.util.List;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.Repository;
public interface BlameCache {
/** @return the blame of a path at a given commit. */
List<Region> get(Repository repo, ObjectId commitId, String path) throws IOException;
/** @return the last commit that modified a path, starting at the given commit. */
ObjectId findLastCommit(Repository repo, ObjectId commitId, String path) throws IOException;
}
|
google/guava | 1,112 | guava-testlib/src/com/google/common/collect/testing/TestSubjectGenerator.java | /*
* Copyright (C) 2008 The Guava 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.common.collect.testing;
import com.google.common.annotations.GwtCompatible;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
/**
* To be implemented by test generators that can produce test subjects without requiring any
* parameters.
*
* @param <T> the type created by this generator.
* @author George van den Driessche
*/
@GwtCompatible
@NullMarked
public interface TestSubjectGenerator<T extends @Nullable Object> {
T createTestSubject();
}
|
google/j2cl | 1,082 | junit/generator/javatests/com/google/j2cl/junit/integration/stacktrace/data/DuplicateFileNameStacktraceTest.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.j2cl.junit.integration.stacktrace.data;
import com.google.j2cl.junit.integration.stacktrace.data.package1.DuplicateFileName;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
/** Test stack trace containing different files with the same name. */
@RunWith(JUnit4.class)
public class DuplicateFileNameStacktraceTest extends StacktraceTestBase {
@Test
public void test() {
DuplicateFileName.callFileWithDuplicateName();
}
}
|
google/j2cl | 1,089 | transpiler/javatests/com/google/j2cl/integration/java/allsimplebridges/Tester609.java | /*
* Copyright 2017 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
*
* 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 allsimplebridges;
import static com.google.j2cl.integration.testing.Asserts.assertTrue;
import jsinterop.annotations.JsType;
public class Tester609 {
@JsType
static interface I1 {
default String get(String value) {
return "I1.get";
}
}
@SuppressWarnings("unchecked")
static class C1 implements I1 {
C1() {}
}
@SuppressWarnings("unchecked")
public static void test() {
C1 s = new C1();
assertTrue(((I1) s).get("").equals("I1.get"));
}
}
|
google/j2cl | 1,119 | junit/generator/java/com/google/j2cl/junit/apt/TestConstructor.java | /*
* Copyright 2022 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.j2cl.junit.apt;
import com.google.auto.value.AutoValue;
/** Represents a test constructor in a JUnit test case. */
@AutoValue
public abstract class TestConstructor {
public static Builder builder() {
return new AutoValue_TestConstructor.Builder();
}
public abstract int numberOfParameters();
/** Builder for {@link TestConstructor}. */
@AutoValue.Builder
public abstract static class Builder {
abstract Builder numberOfParameters(int n);
abstract TestConstructor build();
}
}
|
googleads/googleads-shopping-samples | 1,083 | java/src/main/java/shopping/content/v2_1/samples/accounts/AccountInsertSample.java | package shopping.content.v2_1.samples.accounts;
import com.google.api.client.googleapis.json.GoogleJsonResponseException;
import com.google.api.services.content.model.Account;
import java.io.IOException;
import shopping.content.v2_1.samples.ContentSample;
/**
* Sample that inserts a new MC account into an MCA. Configuration must signal that we're working
* with an MCA for this to run.
*/
public class AccountInsertSample extends ContentSample {
public AccountInsertSample(String[] args) throws IOException {
super(args);
}
@Override
public void execute() throws IOException {
checkMCA();
try {
Account account = AccountUtils.getDefaultAccount();
System.out.println("Inserting new account.");
Account result = content.accounts().insert(config.getMerchantId(), account).execute();
AccountUtils.printAccount(result);
} catch (GoogleJsonResponseException e) {
checkGoogleJsonResponseException(e);
}
}
public static void main(String[] args) throws IOException {
new AccountInsertSample(args).execute();
}
}
|
googleapis/api-compiler | 1,095 | src/main/java/com/google/api/tools/framework/aspects/http/model/CollectionName.java | /*
* Copyright 2017 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.api.tools.framework.aspects.http.model;
import com.google.auto.value.AutoValue;
/**
* Represents a full REST collection name, consisting of a base name for the collection and the
* REST version it is used with.
*/
@AutoValue
public abstract class CollectionName {
public static CollectionName create(String baseName, String version) {
return new AutoValue_CollectionName(baseName, version);
}
public abstract String baseName();
public abstract String version();
}
|
googleapis/google-cloud-java | 1,027 | java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ProvisionProjectMetadataOrBuilder.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/project_service.proto
// Protobuf Java Version: 3.25.8
package com.google.cloud.discoveryengine.v1beta;
public interface ProvisionProjectMetadataOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.ProvisionProjectMetadata)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/google-cloud-java | 1,033 | java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/WriteTensorboardRunDataResponseOrBuilder.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/aiplatform/v1beta1/tensorboard_service.proto
// Protobuf Java Version: 3.25.8
package com.google.cloud.aiplatform.v1beta1;
public interface WriteTensorboardRunDataResponseOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.WriteTensorboardRunDataResponse)
com.google.protobuf.MessageOrBuilder {}
|
googlesamples/mlkit | 1,068 | android/vision-quickstart/app/src/main/java/com/google/mlkit/vision/demo/preference/StillImagePreferenceFragment.java | /*
* Copyright 2020 Google LLC. 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.mlkit.vision.demo.preference;
import android.os.Bundle;
import android.preference.PreferenceFragment;
import com.google.mlkit.vision.demo.R;
/** Configures still image demo settings. */
public class StillImagePreferenceFragment extends PreferenceFragment {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.preference_still_image);
}
}
|
hibernate/hibernate-ogm | 1,048 | core/src/test/java/org/hibernate/ogm/backendtck/inheritance/tableperclass/depositor/GiroAccount.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.backendtck.inheritance.tableperclass.depositor;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
@Entity
@DiscriminatorValue(value = "GIRO_ACCOUNT")
public class GiroAccount extends Account {
@Column(name = "CREDIT_LIMIT")
@Basic(optional = false)
private Double creditLimit;
protected GiroAccount() {
}
public GiroAccount(final Depositor depositor) {
this( depositor, 0.0d );
}
public GiroAccount(final Depositor depositor, final double creditLimit) {
super( depositor );
this.creditLimit = creditLimit;
}
public double getCreditLimit() {
return creditLimit;
}
public void setCreditLimit(final double creditLimit) {
this.creditLimit = creditLimit;
}
}
|
hibernate/hibernate-ogm | 1,090 | core/src/main/java/org/hibernate/ogm/type/impl/ByteArrayStringType.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.type.impl;
import org.hibernate.MappingException;
import org.hibernate.engine.spi.Mapping;
import org.hibernate.ogm.type.descriptor.impl.StringMappedGridTypeDescriptor;
import org.hibernate.type.descriptor.java.ByteArrayTypeDescriptor;
/**
* Persist an array of {@link Byte} as {@link String}.
*
* @see StringMappedGridTypeDescriptor
* @author Davide D'Alto
*/
public class ByteArrayStringType extends AbstractGenericBasicType<Byte[]> {
public static final ByteArrayStringType INSTANCE = new ByteArrayStringType();
public ByteArrayStringType() {
super( StringMappedGridTypeDescriptor.INSTANCE, ByteArrayTypeDescriptor.INSTANCE );
}
@Override
public String getName() {
return "byte_array_as_string";
}
@Override
public int getColumnSpan(Mapping mapping) throws MappingException {
return 1;
}
}
|
hibernate/hibernate-orm | 1,040 | hibernate-core/src/test/java/org/hibernate/orm/test/tool/schema/TargetStdoutImpl.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.tool.schema;
import org.hibernate.engine.jdbc.internal.FormatStyle;
import org.hibernate.engine.jdbc.internal.Formatter;
import org.hibernate.tool.schema.spi.GenerationTarget;
/**
* @author Steve Ebersole
*/
public class TargetStdoutImpl implements GenerationTarget {
final private String delimiter;
final private Formatter formatter;
public TargetStdoutImpl() {
this( null );
}
public TargetStdoutImpl(String delimiter) {
this( delimiter, FormatStyle.NONE.getFormatter());
}
public TargetStdoutImpl(String delimiter, Formatter formatter) {
this.formatter = formatter;
this.delimiter = delimiter;
}
@Override
public void prepare() {
}
@Override
public void accept(String action) {
if (formatter != null) {
action = formatter.format(action);
}
if ( delimiter != null ) {
action += delimiter;
}
System.out.println( action );
}
@Override
public void release() {
}
}
|
hibernate/hibernate-orm | 1,054 | hibernate-core/src/test/java/org/hibernate/orm/test/metamodel/wildcardmodel/AbstractOwner.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.metamodel.wildcardmodel;
import java.util.ArrayList;
import java.util.List;
import jakarta.persistence.CascadeType;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
import jakarta.persistence.Inheritance;
import jakarta.persistence.InheritanceType;
import jakarta.persistence.OneToMany;
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
public abstract class AbstractOwner {
@Id
@GeneratedValue
private Long id;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "owner", targetEntity = AbstractEntity.class)
private List<? extends AbstractEntity> entities = new ArrayList<>();
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public List<? extends AbstractEntity> getEntities() {
return entities;
}
public void setEntities(List<? extends AbstractEntity> entities) {
this.entities = entities;
}
}
|
hibernate/hibernate-orm | 1,059 | hibernate-core/src/main/java/org/hibernate/sql/model/jdbc/JdbcInsertMutation.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.sql.model.jdbc;
import java.util.List;
import org.hibernate.jdbc.Expectation;
import org.hibernate.sql.exec.spi.JdbcParameterBinder;
import org.hibernate.sql.model.MutationTarget;
import org.hibernate.sql.model.MutationType;
import org.hibernate.sql.model.TableMapping;
/**
* Descriptor for a table insert originating from a flush
*
* @author Steve Ebersole
*/
public class JdbcInsertMutation extends AbstractJdbcMutation {
public JdbcInsertMutation(
TableMapping tableDetails,
MutationTarget<?> mutationTarget,
String sql,
boolean callable,
Expectation expectation,
List<? extends JdbcParameterBinder> parameterBinders) {
super( tableDetails, mutationTarget, sql, callable, expectation, parameterBinders );
}
@Override
public MutationType getMutationType() {
return MutationType.INSERT;
}
@Override
public String toString() {
return "JdbcInsertMutation(" + getTableDetails().getTableName() + ")";
}
}
|
hibernate/hibernate-orm | 1,069 | tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/hashcode/HashCodeTest.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.processor.test.hashcode;
import org.hibernate.processor.test.util.CompilationTest;
import org.hibernate.processor.test.util.TestForIssue;
import org.hibernate.processor.test.util.WithClasses;
import org.junit.jupiter.api.Test;
import static org.hibernate.processor.test.util.TestUtil.assertAbsenceOfFieldInMetamodelFor;
import static org.hibernate.processor.test.util.TestUtil.assertMetamodelClassGeneratedFor;
import static org.hibernate.processor.test.util.TestUtil.assertPresenceOfFieldInMetamodelFor;
/**
* @author Hardy Ferentschik
*/
@CompilationTest
class HashCodeTest {
@Test
@TestForIssue(jiraKey = "METAGEN-76")
@WithClasses(HashEntity.class)
void testHashCodeDoesNotCreateSingularAttribute() {
assertMetamodelClassGeneratedFor( HashEntity.class );
assertPresenceOfFieldInMetamodelFor( HashEntity.class, "id" );
assertAbsenceOfFieldInMetamodelFor( HashEntity.class, "hashCode", "hashCode is not a persistent property" );
}
}
|
hibernate/hibernate-orm | 1,089 | hibernate-core/src/main/java/org/hibernate/query/ResultListTransformer.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.query;
import java.util.List;
import org.hibernate.Incubating;
/**
* Defines some processing performed on the overall result {@link List}
* of a {@link Query} before the result list is returned to the caller.
*
* @see Query#setResultListTransformer
* @see Query#list
* @see Query#getResultList
* @see TupleTransformer
*
* @author Steve Ebersole
* @author Gavin King
*/
@Incubating
@FunctionalInterface
public interface ResultListTransformer<T> {
/**
* Here we have an opportunity to perform transformation on the
* query result as a whole. This might be useful to convert from
* one collection type to another or to remove duplicates from the
* result, etc.
*
* @param resultList The result list as would otherwise be returned
* by the {@code Query} without the intervention
* of this {@code ResultListTransformer}
*
* @return The transformed result.
*/
List<T> transformList(List<T> resultList);
}
|
hibernate/hibernate-reactive | 1,062 | hibernate-reactive-core/src/main/java/org/hibernate/reactive/provider/service/NoJtaPlatformInitiator.java | /* Hibernate, Relational Persistence for Idiomatic Java
*
* SPDX-License-Identifier: Apache-2.0
* Copyright: Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.reactive.provider.service;
import org.hibernate.boot.registry.StandardServiceInitiator;
import org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform;
import org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform;
import org.hibernate.service.spi.ServiceRegistryImplementor;
import java.util.Map;
/**
* A Hibernate {@linkplain StandardServiceInitiator service initiator}
* for the non-configured form of JTA platform.
*
* @see NoJtaPlatform
*/
public class NoJtaPlatformInitiator implements StandardServiceInitiator<JtaPlatform> {
public static final NoJtaPlatformInitiator INSTANCE = new NoJtaPlatformInitiator();
@Override
public JtaPlatform initiateService(Map configurationValues, ServiceRegistryImplementor registry) {
return NoJtaPlatform.INSTANCE;
}
@Override
public Class<JtaPlatform> getServiceInitiated() {
return JtaPlatform.class;
}
}
|
hibernate/hibernate-search | 1,045 | mapper/pojo-base/src/main/java/org/hibernate/search/mapper/pojo/mapping/definition/annotation/processing/impl/IdProjectionProcessor.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.mapper.pojo.mapping.definition.annotation.processing.impl;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.IdProjection;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.processing.MethodParameterMappingAnnotationProcessor;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.processing.MethodParameterMappingAnnotationProcessorContext;
import org.hibernate.search.mapper.pojo.mapping.definition.programmatic.MethodParameterMappingStep;
import org.hibernate.search.mapper.pojo.search.definition.binding.builtin.IdProjectionBinder;
public final class IdProjectionProcessor
implements MethodParameterMappingAnnotationProcessor<IdProjection> {
@Override
public void process(MethodParameterMappingStep mapping, IdProjection annotation,
MethodParameterMappingAnnotationProcessorContext context) {
mapping.projection( IdProjectionBinder.create() );
}
}
|
hibernate/hibernate-shards | 1,106 | src/test/java/org/hibernate/shards/criteria/CriteriaFactoryDefaultMock.java | /**
* Copyright (C) 2007 Google Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* This library 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
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
package org.hibernate.shards.criteria;
import org.hibernate.Criteria;
import org.hibernate.Session;
/**
* @author maxr@google.com (Max Ross)
*/
public class CriteriaFactoryDefaultMock implements CriteriaFactory {
public Criteria createCriteria(Session session) {
throw new UnsupportedOperationException();
}
}
|
hibernate/hibernate-validator | 1,069 | engine/src/test/java/org/hibernate/validator/test/internal/util/DurationFormatterTest.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.validator.test.internal.util;
import static org.assertj.core.api.Assertions.assertThat;
import java.time.Duration;
import org.hibernate.validator.internal.util.logging.formatter.DurationFormatter;
import org.testng.annotations.Test;
/**
* @author Marko Bekhta
*/
public class DurationFormatterTest {
@Test
public void testDurationFormatting() throws Exception {
assertThat( new DurationFormatter( Duration.ZERO ).toString() ).isEqualTo( "0" );
assertThat( new DurationFormatter( Duration.ofSeconds( 62, 100 ) ).toString() ).isEqualTo( "1 minute 2 seconds 100 nanoseconds" );
assertThat( new DurationFormatter( Duration.ofHours( 49 ).plusSeconds( 121 ) ).toString() ).isEqualTo( "2 days 1 hour 2 minutes 1 second" );
assertThat( new DurationFormatter( Duration.ofDays( 1 ).plusHours( 10 ).plusMinutes( 15 ).plusSeconds( 20 ).plusMillis( 25 ) ).toString() )
.isEqualTo( "1 day 10 hours 15 minutes 20 seconds 25 milliseconds" );
}
}
|
openjdk/jdk8 | 1,135 | langtools/test/tools/javac/diags/examples/EnumAsIdentifier2.java | /*
* Copyright (c) 2010, 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.
*/
// key: compiler.err.enum.as.identifier
class EnumAsIdentifier2 {
int enum;
}
|
openjdk/jdk8 | 1,140 | langtools/test/tools/javac/diags/examples/NotEnclClass.java | /*
* Copyright (c) 2010, 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.
*/
// key: compiler.err.not.encl.class
class NotEnclClass {
Object o = Object.this;
}
|
openjdk/skara | 1,161 | process/src/main/java/module-info.java | /*
* Copyright (c) 2018, 2019, 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.
*/
module org.openjdk.skara.process {
requires java.logging;
exports org.openjdk.skara.process;
}
|
oracle/coherence | 1,102 | prj/coherence-core/src/main/java/com/tangosol/util/fsm/annotations/OnExitState.java | /*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
package com.tangosol.util.fsm.annotations;
import com.tangosol.util.fsm.Event;
import com.tangosol.util.fsm.ExecutionContext;
import com.tangosol.util.fsm.FiniteStateMachine;
import com.tangosol.util.fsm.StateExitAction;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Defines a {@link StateExitAction} that should be executed when a
* {@link FiniteStateMachine} leaves a specified state.
* <p>
* Note: The signature of the annotated method should be the same as that
* defined by {@link StateExitAction#onExitState(Enum, Event, ExecutionContext)}
* <p>
*
* @author Brian Oliver
* @since Coherence 12.2.1
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface OnExitState
{
/**
* The name of the state being exited.
*/
String value();
}
|
oracle/nosql | 1,121 | kvmain/src/main/java/oracle/kv/impl/arb/admin/ArbNodeAdminResponder.java | /*-
* Copyright (C) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This file was distributed by Oracle as part of a version of Oracle NoSQL
* Database made available at:
*
* http://www.oracle.com/technetwork/database/database-technologies/nosqldb/downloads/index.html
*
* Please see the LICENSE file included in the top-level directory of the
* appropriate version of Oracle NoSQL Database for a copy of the license and
* additional information.
*/
package oracle.kv.impl.arb.admin;
import static oracle.kv.impl.async.StandardDialogTypeFamily.ARB_NODE_ADMIN_TYPE_FAMILY;
import java.util.concurrent.Executor;
import java.util.logging.Logger;
import oracle.kv.impl.async.JavaSerialResponder;
/**
* A responder (server-side) async dialog handler for ArbNodeAdmin.
*/
class ArbNodeAdminResponder extends JavaSerialResponder<ArbNodeAdmin> {
ArbNodeAdminResponder(ArbNodeAdmin server,
Executor executor,
Logger logger) {
super(server, ArbNodeAdmin.class, executor,
ARB_NODE_ADMIN_TYPE_FAMILY, logger);
}
}
|
apache/commons-ognl | 1,105 | src/test/java/org/apache/commons/ognl/test/objects/FormComponentImpl.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.commons.ognl.test.objects;
/**
*/
public class FormComponentImpl
extends ComponentImpl
implements IFormComponent
{
IForm _form;
public IForm getForm()
{
return _form;
}
public void setForm( IForm form )
{
_form = form;
}
}
|
apache/cxf | 1,100 | rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/custom/service/ServiceException.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.custom.service;
public class ServiceException extends Exception {
private static final long serialVersionUID = 5872308284631632512L;
public ServiceException() {
super("");
}
public ServiceException(String msg) {
super(msg);
}
}
|
apache/deltaspike | 1,080 | deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/builder/result/QueryProcessor.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.data.impl.builder.result;
import jakarta.persistence.Query;
import org.apache.deltaspike.data.impl.handler.CdiQueryInvocationContext;
public interface QueryProcessor
{
Object executeQuery(Query query, CdiQueryInvocationContext context);
}
|
apache/derby | 1,108 | java/org.apache.derby.engine/org/apache/derby/iapi/sql/compile/CodeGeneration.java | /*
Derby - Class org.apache.derby.iapi.sql.compile.CodeGeneration
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.derby.iapi.sql.compile;
/**
* This is a simple interface that houses externally visible
* statics for code generation.
*/
public interface CodeGeneration
{
String GENERATED_PACKAGE_PREFIX = "org.apache.derby.exe.";
}
|
apache/directory-kerby | 1,090 | kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/type/kdc/EncTgsRepPart.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.kerberos.kerb.type.kdc;
/**
EncTGSRepPart ::= [APPLICATION 26] EncKDCRepPart
*/
public class EncTgsRepPart extends EncKdcRepPart {
public static final int TAG = 26;
public EncTgsRepPart() {
super(TAG);
}
}
|
apache/druid | 1,092 | indexing-service/src/main/java/org/apache/druid/indexing/common/task/SegmentAllocatorForBatch.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.indexing.common.task;
import org.apache.druid.segment.realtime.appenderator.SegmentAllocator;
/**
*
*/
public interface SegmentAllocatorForBatch extends SegmentAllocator
{
/**
*
* @return
*/
SequenceNameFunction getSequenceNameFunction();
}
|
apache/druid | 1,109 | processing/src/main/java/org/apache/druid/java/util/metrics/NoopSysMonitor.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.java.util.metrics;
import org.apache.druid.java.util.emitter.service.ServiceEmitter;
public class NoopSysMonitor extends SysMonitor
{
public NoopSysMonitor()
{
super();
}
@Override
public boolean doMonitor(ServiceEmitter emitter)
{
return false;
}
}
|
apache/dubbo | 1,066 | dubbo-remoting/dubbo-remoting-zookeeper-curator5/src/main/java/org/apache/dubbo/remoting/zookeeper/curator5/StateListener.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.remoting.zookeeper.curator5;
public interface StateListener {
int SESSION_LOST = 0;
int CONNECTED = 1;
int RECONNECTED = 2;
int SUSPENDED = 3;
int NEW_SESSION_CREATED = 4;
void stateChanged(int connected);
}
|
apache/eagle | 1,085 | eagle-core/eagle-embed/eagle-embed-hbase/src/test/java/org/apache/eagle/service/hbase/EmbeddedHBaseTest.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
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* 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.eagle.service.hbase;
import org.junit.Test;
import java.io.IOException;
public class EmbeddedHBaseTest extends TestHBaseBase {
@Test
public void testHBaseCreateTable() throws IOException {
hbase.createTable("test_hbase_table","f");
}
} |
apache/eventmesh | 1,063 | eventmesh-connectors/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/config/RedisServerConfig.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.connector.redis.config;
import org.apache.eventmesh.common.config.connector.Config;
import lombok.Data;
@Data
public class RedisServerConfig extends Config {
private boolean sourceEnable;
private boolean sinkEnable;
} |
apache/eventmesh | 1,099 | eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/HeartbeatItem.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.protocol;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class HeartbeatItem {
private String topic;
private String url;
}
|
apache/felix-dev | 1,042 | ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/main/java/org/apache/felix/ipojo/runtime/core/test/services/CheckService.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.felix.ipojo.runtime.core.test.services;
import java.util.Properties;
public interface CheckService {
public static final String foo = "foo";
public boolean check();
public Properties getProps();
}
|
apache/felix-dev | 1,044 | dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/osgi/service/jaxrs/whiteboard/JaxRSWhiteboardConstants.java | /*
* Copyright (c) OSGi Alliance (2017). 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 org.osgi.service.jaxrs.whiteboard;
public class JaxRSWhiteboardConstants {
/**
* Service property specifying that a JAX-RS resource should be processed by
* the whiteboard.
* <p>
* The value of this service property must be of type {@code String} or
* {@link Boolean} and set to "true" or <code>true</code>.
*/
public static final String JAX_RS_RESOURCE = "osgi.jaxrs.resource";
}
|
apache/felix-dev | 1,066 | ipojo/runtime/core-it/ipojo-core-factory-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/FiveInstances.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.felix.ipojo.runtime.core.components;
import org.apache.felix.ipojo.annotations.Component;
import org.apache.felix.ipojo.runtime.core.services.NoService;
@Component(name="FiveInstances")
public class FiveInstances implements NoService {
}
|
apache/felix-dev | 1,080 | ipojo/runtime/core-it/ipojo-core-logger-test/src/test/java/org/apache/felix/ipojo/runtime/core/Common.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.felix.ipojo.runtime.core;
import org.ow2.chameleon.testing.helpers.BaseTest;
/**
* Bootstrap the test from this project
*/
public class Common extends BaseTest {
@Override
public boolean deployTestBundle() {
return false;
}
}
|
apache/felix-dev | 1,114 | ipojo/manipulator/manipulator/src/test/java/test/InterfaceWithStatic.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 test;
public interface InterfaceWithStatic {
static InterfaceWithStatic ofString(String string) {
return new InterfaceWithStatic() {
@Override
public String getString() {
return string;
}
};
}
String getString();
}
|
apache/fesod | 1,107 | fesod-examples/src/test/java/org/apache/fesod/excel/demo/read/DemoDataAnother.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.fesod.excel.demo.read;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
@Getter
@Setter
@EqualsAndHashCode
@ToString
public class DemoDataAnother {
private String strA;
private String strB;
private String strC;
}
|
apache/fineract | 1,065 | fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/FixedDepositAccountInterestCalculationService.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.portfolio.savings.service;
import java.util.HashMap;
import org.apache.fineract.infrastructure.core.api.JsonQuery;
public interface FixedDepositAccountInterestCalculationService {
HashMap calculateInterest(JsonQuery query);
}
|
apache/fineract | 1,084 | fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/PreClosureInterestCalculationRule.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 PreClosureInterestCalculationRule {
TILL_PRE_CLOSE_DATE(1), //
TILL_REST_FREQUENCY_DATE(2); //
public final Integer value;
PreClosureInterestCalculationRule(Integer value) {
this.value = value;
}
}
|
apache/flink | 1,095 | flink-core/src/test/java/org/apache/flink/api/common/operators/util/TestIOData.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.api.common.operators.util;
public class TestIOData {
public static final String[] NAMES = {"Peter", "Bob", "Liddy", "Alexander", "Stan"};
public static final String[] RICH_NAMES = {
"Peter01", "Bob01", "Liddy01", "Alexander01", "Stan01"
};
}
|
apache/flink | 1,104 | flink-rpc/flink-rpc-akka/src/main/java/org/apache/flink/runtime/rpc/pekko/ControlMessages.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.rpc.pekko;
/** Control messages for the {@link PekkoRpcActor}. */
public enum ControlMessages {
START, // Start processing incoming messages
STOP, // Stop processing messages and drop all newly incoming messages
TERMINATE, // Terminate the RpcActor
}
|
apache/flink | 1,124 | flink-core/src/main/java/org/apache/flink/types/ResettableValue.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.types;
import org.apache.flink.annotation.Public;
@Public
public interface ResettableValue<T extends Value> extends Value {
/**
* Sets the encapsulated value to another value
*
* @param value the new value of the encapsulated value
*/
void setValue(T value);
}
|
apache/geaflow | 1,062 | geaflow/geaflow-core/geaflow-runtime/geaflow-operator/src/main/java/org/apache/geaflow/operator/base/window/OneInputOperator.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.operator.base.window;
import org.apache.geaflow.operator.Operator;
public interface OneInputOperator<T> extends Operator {
/**
* Process element value.
*/
void processElement(T value) throws Exception;
}
|
apache/geaflow | 1,080 | geaflow-console/app/common/dal/src/main/java/org/apache/geaflow/console/common/dal/mapper/AuthorizationMapper.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.mapper;
import org.apache.geaflow.console.common.dal.entity.AuthorizationEntity;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface AuthorizationMapper extends GeaflowBaseMapper<AuthorizationEntity> {
}
|
apache/geode-examples | 1,113 | queries/src/test/java/org/apache/geode_examples/queries/ExampleTest.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_examples.queries;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
import java.util.Map;
public class ExampleTest {
@Test
public void testCreateEmployeeData() {
Map<Integer, EmployeeData> data = Example.createEmployeeData();
assertEquals(14, data.size());
}
}
|
apache/geode | 1,084 | geode-wan/src/main/java/org/apache/geode/cache/wan/internal/WanCopyRegionFunctionServiceAlreadyRunningException.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.wan.internal;
import java.io.Serializable;
public class WanCopyRegionFunctionServiceAlreadyRunningException extends Exception
implements Serializable {
public WanCopyRegionFunctionServiceAlreadyRunningException(String message) {
super(message);
}
}
|
apache/geode | 1,089 | geode-core/src/distributedTest/java/org/apache/geode/internal/cache/CacheClosingDistributionMessageObserver.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.internal.cache;
import org.apache.geode.cache.Cache;
public class CacheClosingDistributionMessageObserver extends OnRequestImageMessageObserver {
public CacheClosingDistributionMessageObserver(String regionName, Cache cache) {
super(regionName, cache::close);
}
}
|
apache/giraph | 1,111 | giraph-core/src/main/java/org/apache/giraph/bsp/checkpoints/CheckpointStatus.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.giraph.bsp.checkpoints;
/**
* Enum represents possible checkpoint state.
*/
public enum CheckpointStatus {
/** Do nothing, no checkpoint required */
NONE,
/** Regular checkpoint */
CHECKPOINT,
/** Do checkpoint and then halt further computation */
CHECKPOINT_AND_HALT
}
|
apache/gobblin | 1,104 | gobblin-modules/gobblin-http/src/main/java/org/apache/gobblin/http/ResponseHandler.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.http;
import org.apache.gobblin.net.Request;
/**
* An interface to handle a response
*
* @param <RQ> type of raw request
* @param <RP> type of response
*/
public interface ResponseHandler<RQ, RP> {
ResponseStatus handleResponse(Request<RQ> request, RP response);
}
|
apache/hadoop-common | 1,069 | hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/view/BlockForTest.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.yarn.webapp.view;
import java.io.PrintWriter;
public class BlockForTest extends HtmlBlock.Block {
public BlockForTest(HtmlBlock htmlBlock, PrintWriter out, int level,
boolean wasInline) {
htmlBlock.super(out, level, wasInline);
}
}
|
apache/hadoop-common | 1,082 | hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/Clock.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.yarn.util;
import org.apache.hadoop.classification.InterfaceAudience.Public;
import org.apache.hadoop.classification.InterfaceStability.Stable;
/**
* A simple clock interface that gives you time.
*/
@Public
@Stable
public interface Clock {
long getTime();
} |
apache/hadoop-common | 1,085 | hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azure/TestNativeAzureFileSystemMocked.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.azure;
public class TestNativeAzureFileSystemMocked extends
NativeAzureFileSystemBaseTest {
@Override
protected AzureBlobStorageTestAccount createTestAccount() throws Exception {
return AzureBlobStorageTestAccount.createMock();
}
}
|
apache/hadoop | 1,048 | hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/MockEventHandler.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;
import org.apache.hadoop.yarn.event.Event;
import org.apache.hadoop.yarn.event.EventHandler;
public class MockEventHandler implements EventHandler<Event> {
@Override
public void handle(Event event) {
}
}
|
apache/hadoop | 1,077 | hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/statistics/impl/AbstractIOStatisticsImpl.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.statistics.impl;
import org.apache.hadoop.fs.statistics.IOStatistics;
/**
* Base implementation in case common methods/fields need to be added
* in future.
*/
public abstract class AbstractIOStatisticsImpl implements IOStatistics {
}
|
apache/hadoop | 1,096 | hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/filter/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.
*/
/**
* Builtin metrics filters (to be used in metrics config files)
*/
@InterfaceAudience.Public
@InterfaceStability.Evolving
package org.apache.hadoop.metrics2.filter;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability; |
apache/hadoop | 1,097 | hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/PathOperationException.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;
/** ENOTSUP */
public class PathOperationException extends PathExistsException {
static final long serialVersionUID = 0L;
/** @param path for the exception */
public PathOperationException(String path) {
super(path, "Operation not supported");
}
} |
apache/hive | 1,113 | llap-common/src/java/org/apache/hadoop/hive/llap/security/LlapTokenLocalClient.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.hive.llap.security;
import java.io.IOException;
import org.apache.hadoop.security.token.Token;
public interface LlapTokenLocalClient {
Token<LlapTokenIdentifier> createToken(
String appId, String user, boolean isSignatureRequired) throws IOException;
void close();
} |
apache/hive | 1,134 | ql/src/java/org/apache/hadoop/hive/ql/parse/rewrite/Rewriter.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.hive.ql.parse.rewrite;
import org.apache.hadoop.hive.ql.Context;
import org.apache.hadoop.hive.ql.parse.ParseUtils;
import org.apache.hadoop.hive.ql.parse.SemanticException;
public interface Rewriter<T> {
ParseUtils.ReparseResult rewrite(Context context, T rewriteData) throws SemanticException;
}
|
apache/hop | 1,117 | plugins/misc/projects/src/main/java/org/apache/hop/projects/util/Defaults.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.hop.projects.util;
public class Defaults {
public static final String VARIABLE_HOP_PROJECT_NAME = "HOP_PROJECT_NAME";
public static final String VARIABLE_HOP_ENVIRONMENT_NAME = "HOP_ENVIRONMENT_NAME";
public static final String EXTENSION_POINT_PROJECT_ACTIVATED = "ProjectActivated";
}
|
apache/ignite-3 | 1,087 | modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/fsm/ExecutionPhaseHandler.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.sql.engine.exec.fsm;
/**
* Handler of execution phase.
*
* <p>Encapsulates actions required to be done in order to move query from one phase to another.
*/
@FunctionalInterface
interface ExecutionPhaseHandler {
Result handle(Query query);
}
|
apache/ignite-3 | 1,090 | modules/network/src/testFixtures/java/org/apache/ignite/internal/network/recovery/AllIdsAreStale.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.network.recovery;
import java.util.UUID;
/**
* {@link StaleIdDetector} that reports all IDs as stale.
*/
public class AllIdsAreStale implements StaleIdDetector {
@Override
public boolean isIdStale(UUID nodeId) {
return true;
}
}
|
apache/ignite | 1,076 | modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheTxNearEnabledRandomOperationsTest.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.processors.cache;
/**
*
*/
public class CrossCacheTxNearEnabledRandomOperationsTest extends CrossCacheTxRandomOperationsTest {
/** {@inheritDoc} */
@Override protected boolean nearCacheEnabled() {
return true;
}
}
|
apache/ignite | 1,093 | modules/core/src/main/java/org/apache/ignite/internal/management/baseline/BaselineRemoveCommandArg.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.baseline;
import org.apache.ignite.internal.management.api.CliConfirmArgument;
/** */
@CliConfirmArgument
public class BaselineRemoveCommandArg extends BaselineAddCommandArg {
/** */
private static final long serialVersionUID = 0;
}
|
apache/ignite | 1,120 | modules/clients/src/test/java/org/apache/ignite/qa/QaJdbcTestSuite.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.qa;
import org.apache.ignite.qa.query.WarningOnBigQueryResultsTest;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
/**
* JDBC driver test suite.
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({
WarningOnBigQueryResultsTest.class,
})
public class QaJdbcTestSuite {
}
|
apache/incubator-gluten | 1,098 | backends-clickhouse/src/test/java/org/apache/hadoop/mapred/UserDefineTextInputFormat.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.mapred;
import java.io.IOException;
public class UserDefineTextInputFormat extends org.apache.hadoop.mapred.TextInputFormat {
@Override
public InputSplit[] getSplits(JobConf job, int numSplits) throws IOException {
return super.getSplits(job, numSplits);
}
}
|
apache/incubator-heron | 1,090 | heron/uploaders/tests/java/org/apache/heron/uploader/localfs/LocalFileSystemConstantsTest.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.heron.uploader.localfs;
final class LocalFileSystemConstantsTest {
public static final String TEST_DATA_PATH =
"/org_apache_heron/heron/uploaders/tests/java/org/apache/heron/uploader/localfs/testdata";
private LocalFileSystemConstantsTest() {
}
}
|
apache/incubator-heron | 1,109 | heron/api/src/java/org/apache/heron/api/metric/CumulativeCountMetric.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.heron.api.metric;
/**
* This is a different kind of counter that value is not
* reset after fetched.
*/
public class CumulativeCountMetric extends CountMetric {
@Override
public Long getValueAndReset() {
// Return value without resetting.
return getValue();
}
}
|
apache/incubator-kie-drools | 1,050 | drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/generator/drlxparse/ParseResultVoidVisitor.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.drools.model.codegen.execmodel.generator.drlxparse;
@FunctionalInterface
public interface ParseResultVoidVisitor {
void onSuccess(DrlxParseSuccess drlxParseResult);
default void onFail(DrlxParseFail failure) {
}
}
|
apache/incubator-kie-drools | 1,065 | drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/facts/ClassA.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.drools.mvel.integrationtests.facts;
public class ClassA implements InterfaceA {
private ClassB b = null;
public ClassB getB() {
return b;
}
public void setB(final InterfaceB b) {
this.b = (ClassB) b;
}
}
|
apache/incubator-kie-drools | 1,087 | kie-internal/src/main/java/org/kie/internal/runtime/CommandBasedStatefulKnowledgeSession.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.kie.internal.runtime;
import org.kie.api.runtime.ExecutableRunner;
import org.kie.api.runtime.KieSession;
public interface CommandBasedStatefulKnowledgeSession extends StatefulKnowledgeSession {
ExecutableRunner getRunner();
KieSession getKieSession();
}
|
apache/incubator-kie-drools | 1,095 | drools-kiesession/src/main/java/org/drools/kiesession/debug/NetworkNodeVisitor.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.drools.kiesession.debug;
import java.util.Collection;
import org.drools.base.common.NetworkNode;
public interface NetworkNodeVisitor {
void visit(NetworkNode parent,
Collection<NetworkNode> nodeStack,
StatefulKnowledgeSessionInfo info);
}
|
apache/incubator-kie-drools | 1,101 | kie-internal/src/main/java/org/kie/internal/process/CorrelationKeyFactory.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.kie.internal.process;
import java.util.List;
import org.kie.api.internal.utils.KieService;
public interface CorrelationKeyFactory extends KieService {
CorrelationKey newCorrelationKey(String businessKey);
CorrelationKey newCorrelationKey(List<String> businessKeys);
}
|
apache/incubator-kie-drools | 1,104 | drools-beliefs/src/main/java/org/drools/beliefs/graph/impl/GraphStore.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.drools.beliefs.graph.impl;
import org.drools.beliefs.graph.GraphNode;
public interface GraphStore<T> extends Iterable<GraphNode<T>> {
public GraphNode<T> addNode();
public GraphNode<T> removeNode(int id);
public GraphNode<T> getNode(int id);
public int size();
}
|
apache/incubator-kie-kogito-apps | 1,042 | data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/mapper/JobEntityMapperIT.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.kie.kogito.index.postgresql.mapper;
import org.kie.kogito.index.jpa.mapper.AbstractJobEntityMapperIT;
import io.quarkus.test.junit.QuarkusTest;
@QuarkusTest
class JobEntityMapperIT extends AbstractJobEntityMapperIT {
}
|
apache/incubator-kie-kogito-apps | 1,062 | jobs-service/jobs-service-internal-api/src/main/java/org/kie/kogito/jobs/service/validation/RecipientValidator.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.kie.kogito.jobs.service.validation;
import org.kie.kogito.jobs.service.api.Recipient;
public interface RecipientValidator {
boolean accept(Recipient<?> recipient);
void validate(Recipient<?> recipient, ValidatorContext context);
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.