repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/tomcat
1,182
java/org/apache/tomcat/websocket/WsContainerProvider.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.tomcat.websocket; import jakarta.websocket.ContainerProvider; import jakarta.websocket.WebSocketContainer; @aQute.bnd.annotation.spi.ServiceProvider(value = ContainerProvider.class) public class WsContainerProvider extends ContainerProvider { @Override protected WebSocketContainer getContainer() { return new WsWebSocketContainer(); } }
apache/tomee
1,156
container/openejb-core/src/test/java/org/apache/openejb/mbeans/Inheritance.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.ManagedOperation; @MBean public class Inheritance extends Parent { @ManagedOperation @Description("just an op") public String returnValue() { return "yes - no"; } }
apache/tomee
1,160
container/openejb-core/src/main/java/org/apache/openejb/junit/Configuration.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.junit; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) @Deprecated // use org.apache.openejb.testing.Configuration public @interface Configuration { }
apache/uima-uimaj
1,165
jVinci/src/main/java/org/apache/vinci/transport/VNSException.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.vinci.transport; import java.io.IOException; /** * Special exception type thrown by VinciClient/VinciServer when VNS itself reports an error. */ public class VNSException extends IOException { private static final long serialVersionUID = -9150424759390586749L; public VNSException(String message) { super(message); } }
apache/usergrid
1,118
stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/consistency/TimeServiceImpl.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; import java.time.Instant; /** * Simple time service to get the current system time. */ public class TimeServiceImpl implements TimeService{ @Override public long getCurrentTime() { return Instant.now().toEpochMilli(); } }
apache/wicket
1,136
testing/wicket-threadtest/src/test/java/org/apache/wicket/threadtest/tester/Command.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.wicket.threadtest.tester; /** * Command interface. * * @author eelcohillenius */ public interface Command { /** * Execute one iteration. * * @param runner * command runner that executes this command * * @throws Exception */ void execute(CommandRunner runner) throws Exception; }
apache/wicket
1,137
wicket-core-tests/src/test/java/org/apache/wicket/markup/html/header/BasePanel.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.wicket.markup.html.header; import org.apache.wicket.markup.html.panel.Panel; /** * * @author Matheus */ public class BasePanel extends Panel { private static final long serialVersionUID = 1L; /** * Creates a new instance of BasePanel * * @param id */ BasePanel(String id) { super(id); } }
apache/xmlgraphics-batik
1,123
batik-codec/src/main/java/org/apache/batik/ext/awt/image/codec/imageio/ImageIOPNGImageWriter.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.batik.ext.awt.image.codec.imageio; /** * ImageWriter that encodes PNG images using Image I/O. * * @version $Id$ */ public class ImageIOPNGImageWriter extends ImageIOImageWriter { /** * Main constructor. */ public ImageIOPNGImageWriter() { super("image/png"); } }
apache/xmlgraphics-fop
1,159
fop-core/src/test/java/org/apache/fop/render/afp/AFPTestSuite.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. */ /* $Id$ */ package org.apache.fop.render.afp; import org.junit.runner.RunWith; import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; /** * Test suite for FOP's AFP output. */ @RunWith(Suite.class) @SuiteClasses({ NoOperationTestCase.class, AFPRendererConfiguratorTestCase.class }) public class AFPTestSuite { }
google/android-classyshark
1,142
ClassySharkWS/src/com/google/classyshark/gui/panel/tree/NodeInfo.java
/* * Copyright 2015 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.classyshark.gui.panel.tree; import java.util.regex.Matcher; import java.util.regex.Pattern; public class NodeInfo { public String fullname; public NodeInfo(String fullClassName) { this.fullname = fullClassName; } public String toString() { return extractClassName(fullname); } public static String extractClassName (String fullname) { Pattern p = Pattern.compile(".*?([^.]+)$"); Matcher m = p.matcher(fullname); return (m.find()) ? m.group(1) : ""; } }
google/binnavi
1,139
src/main/java/com/google/security/zynamics/zylib/gui/zygraph/realizers/ECommentPlacement.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.zylib.gui.zygraph.realizers; public enum ECommentPlacement { ABOVE_LINE, BEHIND_LINE; public static int getOrdinal(final ECommentPlacement placement) { return placement == ECommentPlacement.ABOVE_LINE ? 0 : 1; } public static ECommentPlacement valueOf(final int ordinal) { if (ordinal == 0) { return ECommentPlacement.ABOVE_LINE; } else if (ordinal == 1) { return ECommentPlacement.BEHIND_LINE; } throw new IllegalStateException("Error: Unknown ordinal value."); } }
google/binnavi
1,147
src/test/java/com/google/security/zynamics/binnavi/ZyGraph/ZyGraphViewSettingsFactory.java
/* Copyright 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.security.zynamics.binnavi.ZyGraph; import com.google.security.zynamics.binnavi.ZyGraph.LayoutStyle; import com.google.security.zynamics.binnavi.ZyGraph.ZyGraphViewSettings; import com.google.security.zynamics.binnavi.config.CallGraphSettingsConfigItem; public class ZyGraphViewSettingsFactory { public static ZyGraphViewSettings get() { final ZyGraphViewSettings settings = new ZyGraphViewSettings(new CallGraphSettingsConfigItem()); settings.getLayoutSettings().setDefaultGraphLayout(LayoutStyle.CIRCULAR); return settings; } }
google/closure-compiler
1,139
src/com/google/javascript/jscomp/parsing/parser/trees/MemberLookupExpressionTree.java
/* * Copyright 2011 The Closure Compiler Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.javascript.jscomp.parsing.parser.trees; import com.google.javascript.jscomp.parsing.parser.util.SourceRange; public class MemberLookupExpressionTree extends ParseTree { public final ParseTree operand; public final ParseTree memberExpression; public MemberLookupExpressionTree(SourceRange location, ParseTree operand, ParseTree memberExpression) { super(ParseTreeType.MEMBER_LOOKUP_EXPRESSION, location); this.operand = operand; this.memberExpression = memberExpression; } }
google/compile-testing
1,157
src/main/java/com/google/testing/compile/CompilationSubjectFactory.java
/* * Copyright (C) 2016 Google, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.testing.compile; import com.google.common.truth.FailureMetadata; import com.google.common.truth.Subject; import com.google.common.truth.Truth; import org.jspecify.annotations.Nullable; /** A {@link Truth} subject factory for a {@link Compilation}. */ final class CompilationSubjectFactory implements Subject.Factory<CompilationSubject, Compilation> { @Override public CompilationSubject createSubject( FailureMetadata failureMetadata, @Nullable Compilation that) { return new CompilationSubject(failureMetadata, that); } }
google/copybara
1,162
java/com/google/copybara/doc/annotations/DocSignaturePrefix.java
/* * Copyright (C) 2018 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.doc.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Adds a custom prefix to the signature example and reference in the generated Markdown */ @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE}) public @interface DocSignaturePrefix { /** * When generating documentation use varPrefix + "." + method/field for generating the docs. * For example "ctx.origin" */ String value(); }
google/graphicsfuzz
1,142
ast/src/main/java/com/graphicsfuzz/common/ast/decl/PrecisionDeclaration.java
/* * Copyright 2018 The GraphicsFuzz Project 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.graphicsfuzz.common.ast.decl; import com.graphicsfuzz.common.ast.visitors.IAstVisitor; public class PrecisionDeclaration extends Declaration { private String text; public PrecisionDeclaration(String text) { this.text = text; } @Override public String getText() { return text; } @Override public void accept(IAstVisitor visitor) { visitor.visitPrecisionDeclaration(this); } @Override public PrecisionDeclaration clone() { return new PrecisionDeclaration(text); } }
google/j2cl
1,116
junit/generator/javatests/com/google/j2cl/junit/integration/stacktrace/data/ExceptionWithCauseStacktraceTest.java
/* * Copyright 2020 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 org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @RunWith(JUnit4.class) public class ExceptionWithCauseStacktraceTest extends StacktraceTestBase { @Test public void test() { try { method(); } catch (RuntimeException e) { throw new RuntimeException("__the_message__!", e); } } public void method() { throw new RuntimeException(new NullPointerException("root cause\nOn two lines")); } }
google/j2cl
1,132
transpiler/javatests/com/google/j2cl/integration/java/allsimplebridges/Tester261.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; public class Tester261 { abstract static class C1<T> { C1() {} public abstract String get(T value); } static class C2 extends C1<String> { C2() {} @Override public String get(String value) { return "C2.get"; } } @SuppressWarnings("unchecked") public static void test() { C2 s = new C2(); assertTrue(s.get("").equals("C2.get")); assertTrue(((C1) s).get("").equals("C2.get")); } }
google/j2objc
1,161
jre_emul/misc_tests/com/google/j2objc/net/IosHttpURLConnectionTest.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 com.google.j2objc.net; import java.io.IOException; import javax.net.ssl.SSLException; import junit.framework.TestCase; /** * Unit tests for {@link IosHttpURLConnection}. */ public class IosHttpURLConnectionTest extends TestCase { /** * This test fails when reflection is stripped if SSLException is not annotated with * ReflectionSupport (https://github.com/google/j2objc/issues/1032). */ public void testSecureConnectionException() { IOException exception = IosHttpURLConnection.secureConnectionException("Test"); assertTrue(exception instanceof SSLException); } }
google/nomulus
1,171
core/src/main/java/google/registry/reporting/icann/QueryBuilder.java
// Copyright 2017 The Nomulus Authors. 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 google.registry.reporting.icann; import com.google.common.collect.ImmutableMap; import org.joda.time.YearMonth; /** Interface defining the necessary methods to construct ICANN reporting SQL queries. */ public interface QueryBuilder { /** Returns a map from an intermediary view's table name to the query that generates it. */ ImmutableMap<String, String> getViewQueryMap(YearMonth yearMonth); /** Returns a query that retrieves the overall report from the previously generated view. */ String getReportQuery(YearMonth yearMonth); }
googleapis/discovery-artifact-manager
1,116
toolkit/src/main/java/com/google/api/codegen/viewmodel/UnpagedListCallableMethodDetailView.java
/* Copyright 2016 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.codegen.viewmodel; import com.google.auto.value.AutoValue; @AutoValue public abstract class UnpagedListCallableMethodDetailView { public abstract String resourceListGetFunction(); public static Builder newBuilder() { return new AutoValue_UnpagedListCallableMethodDetailView.Builder(); } @AutoValue.Builder public abstract static class Builder { public abstract Builder resourceListGetFunction(String name); public abstract UnpagedListCallableMethodDetailView build(); } }
hibernate/hibernate-ogm
1,092
infinispan-remote/src/main/java/org/hibernate/ogm/datastore/infinispanremote/options/navigation/impl/InfinispanRemoteEntityContextImpl.java
/* * Hibernate OGM, Domain model persistence for NoSQL datastores * * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. */ package org.hibernate.ogm.datastore.infinispanremote.options.navigation.impl; import org.hibernate.ogm.datastore.infinispanremote.options.navigation.InfinispanRemoteEntityContext; import org.hibernate.ogm.datastore.infinispanremote.options.navigation.InfinispanRemotePropertyContext; import org.hibernate.ogm.datastore.keyvalue.options.navigation.spi.BaseKeyValueStoreEntityContext; import org.hibernate.ogm.options.navigation.spi.ConfigurationContext; /** * Converts Infinispan Remote entity-level options. * * @author Gunnar Morling */ public abstract class InfinispanRemoteEntityContextImpl extends BaseKeyValueStoreEntityContext<InfinispanRemoteEntityContext, InfinispanRemotePropertyContext> implements InfinispanRemoteEntityContext { public InfinispanRemoteEntityContextImpl(ConfigurationContext context) { super( context ); } }
hibernate/hibernate-orm
1,053
hibernate-core/src/test/java/org/hibernate/orm/test/propertyref/inheritence/union/Account.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.propertyref.inheritence.union; /** * @author Gavin King */ public class Account { private String accountId; private Customer customer; private Person person; private char type; /** * @return Returns the user. */ public Customer getCustomer() { return customer; } /** * @param user The user to set. */ public void setCustomer(Customer user) { this.customer = user; } /** * @return Returns the accountId. */ public String getAccountId() { return accountId; } /** * @param accountId The accountId to set. */ public void setAccountId(String accountId) { this.accountId = accountId; } /** * @return Returns the type. */ public char getType() { return type; } /** * @param type The type to set. */ public void setType(char type) { this.type = type; } public Person getPerson() { return person; } public void setPerson(Person person) { this.person = person; } }
hibernate/hibernate-orm
1,083
hibernate-core/src/test/java/org/hibernate/orm/test/manytomany/Attachment.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.manytomany; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; import jakarta.persistence.ManyToMany; import java.util.Set; /** * @author Chris Cranford */ @Entity public class Attachment { @Id @GeneratedValue private Integer id; @ManyToMany private Set<Advertisement> advertisements; private String fileName; private String deleted = "false"; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Set<Advertisement> getAdvertisements() { return advertisements; } public void setAdvertisements(Set<Advertisement> advertisements) { this.advertisements = advertisements; } public String getFileName() { return fileName; } public void setFileName(String fileName) { this.fileName = fileName; } public String getDeleted() { return deleted; } public void setDeleted(String deleted) { this.deleted = deleted; } }
hibernate/hibernate-orm
1,101
hibernate-core/src/main/java/org/hibernate/id/enhanced/AbstractOptimizer.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.id.enhanced; import org.hibernate.HibernateException; /** * Common support for {@link Optimizer} implementations. * * @author Steve Ebersole */ public abstract class AbstractOptimizer implements Optimizer { protected final Class<?> returnClass; protected final int incrementSize; /** * Construct an optimizer * * @param returnClass The expected id class. * @param incrementSize The increment size */ AbstractOptimizer(Class<?> returnClass, int incrementSize) { if ( returnClass == null ) { throw new HibernateException( "return class is required" ); } this.returnClass = returnClass; this.incrementSize = incrementSize; } /** * Getter for property 'returnClass'. This is the Java * class which is used to represent the id (e.g. {@link Long}). * * @return Value for property 'returnClass'. */ public final Class<?> getReturnClass() { return returnClass; } @Override public final int getIncrementSize() { return incrementSize; } }
hibernate/hibernate-search
1,083
integrationtest/backend/lucene/src/test/java/org/hibernate/search/integrationtest/backend/lucene/testsupport/util/LuceneTckTestRunner.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.integrationtest.backend.lucene.testsupport.util; import org.junit.platform.suite.api.IncludeClassNamePatterns; import org.junit.platform.suite.api.SelectPackages; import org.junit.platform.suite.api.Suite; import org.junit.platform.suite.api.SuiteDisplayName; /** * Helper for running specific TCK tests against the Lucene backend from the IDE. * <p> * Adapt the {@code @IncludeClassNamePatterns}/{@code @SelectPackages} annotation as needed * to run a single test or an entire test package. * * @author Gunnar Morling */ @Suite @SuiteDisplayName("Lucene TCK tests Runner") // Defines a "root" package, subpackages are included. Use Include/Exclude ClassNamePatterns annotations to limit the executed tests: @SelectPackages("org.hibernate.search.integrationtest.backend.tck") // Default class pattern does not include IT tests, hence we want to customize it a bit: @IncludeClassNamePatterns({ ".*Test", ".*IT" }) public class LuceneTckTestRunner { }
hibernate/hibernate-validator
1,071
engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/hv/pl/NIPValidator.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.validator.internal.constraintvalidators.hv.pl; import java.util.List; import org.hibernate.validator.constraints.pl.NIP; /** * Validator for {@link NIP}. * * @author Marko Bekhta */ public class NIPValidator extends PolishNumberValidator<NIP> { private static final int[] WEIGHTS_NIP = { 6, 5, 7, 2, 3, 4, 5, 6, 7 }; @Override public void initialize(NIP constraintAnnotation) { super.initialize( 0, Integer.MAX_VALUE, -1, true ); } @Override protected int[] getWeights(List<Integer> digits) { return WEIGHTS_NIP; } @Override protected boolean checkTwoDigitModuloResult(char checkDigit) { // From https://pl.wikipedia.org/wiki/Numer_identyfikacji_podatkowej: // > NIP jest tak generowany, aby nigdy w wyniku tego dzielenia, jako reszta, nie uzyskać liczby 10 // // which means that the way NIP is generated the checksum can never be 10, so if we got here, we've got an invalid NIP: return false; } }
hibernate/hibernate-validator
1,105
engine/src/test/java/org/hibernate/validator/test/constraints/boolcomposition/localconstrval/SmallString.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.validator.test.constraints.boolcomposition.localconstrval; import static java.lang.annotation.RetentionPolicy.RUNTIME; import static org.hibernate.validator.constraints.CompositionType.ALL_FALSE; import java.lang.annotation.Retention; import jakarta.validation.Constraint; import jakarta.validation.Payload; import jakarta.validation.constraints.Size; import org.hibernate.validator.constraints.ConstraintComposition; /** * Test mode for HV-390. * * Composed annotation with both boolean operators and local constraintValidator. * It checks in a very complicated way whether a string is strictly shorter than 11 chars. * * @author Federico Mancini * @author Dag Hovland */ @Constraint(validatedBy = SmallStringValidator.class) @ConstraintComposition(ALL_FALSE) @Size(min = 10, max = 10) @Retention(RUNTIME) public @interface SmallString { String message() default "Not a small string"; Class<?>[] groups() default { }; Class<? extends Payload>[] payload() default { }; }
hibernate/hibernate-validator
1,112
integrationtest/wildfly/src/test/java/org/hibernate/validator/integration/cdi/constraint/Pingable.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.validator.integration.cdi.constraint; import static java.lang.annotation.ElementType.ANNOTATION_TYPE; import static java.lang.annotation.ElementType.CONSTRUCTOR; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.Target; import jakarta.validation.Constraint; import jakarta.validation.Payload; /** * @author Hardy Ferentschik */ @Documented @Constraint(validatedBy = { PingableValidator.class }) @Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER }) @Retention(RUNTIME) public @interface Pingable { String message() default "{org.hibernate.validator.test.constraint.Pingable.message}"; Class<?>[] groups() default { }; Class<? extends Payload>[] payload() default { }; String host(); }
openjdk/jdk8
1,165
langtools/test/tools/javac/diags/examples/ProcCantFindClass/ProcCantFindClass.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.proc.cant.find.class // options: -processor AnnoProc -proc:only UnknownClass // run: simple
openjdk/jdk8
1,169
langtools/test/com/sun/javadoc/testProfiles/pkgDeprecated/package-info.java
/* * Copyright (c) 2013, 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. */ /** * Deprecated package. * * @deprecated This package is <b>Deprecated</b>. Use pkg1. */ package pkgDeprecated;
openjdk/jdk8
1,171
jdk/test/sun/security/provider/PolicyFile/getinstance/NoArgPermission.java
/* * Copyright (c) 2001, 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. */ public class NoArgPermission extends java.security.BasicPermission { public NoArgPermission() { super("none"); } }
openjdk/jdk8
1,175
langtools/test/tools/javac/diags/examples/PrintRounds/PrintRounds.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.misc.x.print.rounds // options: -processor AnnoProc -XprintRounds // run: backdoor class PrintRounds { }
openjdk/jdk8
1,178
langtools/test/tools/javac/diags/examples/CantResolveLocation.java
/* * Copyright (c) 2010, 2011, 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.cant.resolve.location // key: compiler.misc.location class CantResolveLocation { Unknown y; }
openjdk/jdk8
1,179
langtools/test/tools/javac/diags/examples/EnclClassRequired.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.encl.class.required class Base { class Nested { } } class EnclClassRequired extends Base.Nested { }
openjdk/jdk8
1,181
langtools/test/tools/javadoc/generics/throwsGeneric/pkg1/A.java
/* * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package pkg1; public interface A<T extends Throwable> { void m1() throws T; <U extends Throwable> void m2() throws U; }
openjdk/jdk8
1,192
langtools/test/tools/javac/annotations/pos/ClassB.java
/* * Copyright (c) 2004, 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. */ class ClassB implements ClassA { public Class f() { return null; } public Class<ClassA> annotationType() { return ClassA.class; } }
openjdk/jdk8
1,203
langtools/test/tools/jdeps/m/Foo.java
/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package m; public class Foo extends Bar implements c.I { public void foo() throws e.E { } public void run() { setF(new f.F()); } }
openjdk/skara
1,182
metrics/src/main/java/org/openjdk/skara/metrics/Exporter.java
/* * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.skara.metrics; import java.util.List; public interface Exporter { String export(List<Metric> metrics); }
oracle-samples/oracle-db-examples
1,114
java/23ai-springboot3-jdbc/src/main/java/com/oracle/dev/springdata/jdbc/EmployeeNotFoundException.java
/* Copyright (c) 2024, Oracle and/or its affiliates. This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package com.oracle.dev.springdata.jdbc; class EmployeeNotFoundException extends RuntimeException { private static final long serialVersionUID = 7768215094663842819L; EmployeeNotFoundException(Long id) { super("Could not find employee " + id); } }
oracle/coherence
1,115
prj/coherence-concurrent/src/main/java/com/oracle/coherence/concurrent/config/processors/ThreadFactoryProcessor.java
/* * Copyright (c) 2021, 2024, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * https://oss.oracle.com/licenses/upl. */ package com.oracle.coherence.concurrent.config.processors; import com.oracle.coherence.concurrent.config.builders.ThreadFactoryBuilder; import com.tangosol.config.ConfigurationException; import com.tangosol.config.xml.ElementProcessor; import com.tangosol.config.xml.ProcessingContext; import com.tangosol.config.xml.XmlSimpleName; import com.tangosol.run.xml.XmlElement; /** * An {@link ElementProcessor} for {@code thread-factory} elements. * * @author rl 11.26.21 * @since 21.12 */ @XmlSimpleName("thread-factory") public class ThreadFactoryProcessor implements ElementProcessor<ThreadFactoryBuilder> { // ----- ElementProcessor interface ------------------------------------- public ThreadFactoryBuilder process(ProcessingContext context, XmlElement xmlElement) throws ConfigurationException { return context.inject(new ThreadFactoryBuilder(), xmlElement); } }
oracle/coherence
1,126
prj/coherence-concurrent/src/main/java/com/oracle/coherence/concurrent/executor/util/DayOfMonthPredicate.java
/* * Copyright (c) 2016, 2021, 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.oracle.coherence.concurrent.executor.util; import java.util.List; /** * A Predicate whose rules are in a plain array of integer values. When asked to validate a value, this ValueMatcher * checks if it is in the array and, if not, checks whether the last-day-of-month setting applies. * * @author lh * @since 21.12 */ class DayOfMonthPredicate extends IntArrayPredicate { // ----- constructors --------------------------------------------------- /** * Builds the ValueMatcher. * * @param listIntegers a {@link List} of {@link Integer} elements, one for every value accepted by the matcher. * The match() method will return true only if its parameter will be one of this list or * the last-day-of-month setting applies. */ public DayOfMonthPredicate(List<Integer> listIntegers) { super(listIntegers); } }
oracle/coherence
1,139
prj/test/functional/repository/src/main/java/repository/AsyncPeopleRepository.java
/* * Copyright (c) 2000, 2022, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * https://oss.oracle.com/licenses/upl. */ package repository; import com.oracle.coherence.repository.AbstractAsyncRepository; import com.oracle.coherence.repository.Accelerated; import com.tangosol.net.AsyncNamedMap; import data.repository.Person; /** * Simple test async repository implementation. * * @since 21.06 */ @Accelerated // tag::doc[] public class AsyncPeopleRepository extends AbstractAsyncRepository<String, Person> { private final AsyncNamedMap<String, Person> people; public AsyncPeopleRepository(AsyncNamedMap<String, Person> people) { this.people = people; } protected AsyncNamedMap<String, Person> getMap() // <1> { return people; } protected String getId(Person entity) // <2> { return entity.getSsn(); } protected Class<? extends Person> getEntityType() // <3> { return Person.class; } } // end::doc[]
oracle/coherence
1,145
prj/coherence-rest/src/main/java/com/tangosol/coherence/rest/query/QueryEngine.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.coherence.rest.query; import java.util.Map; /** * The QueryEngine interface provides a pluggable mechanism for producing * queries that can be executed against a NamedCache. * * @author ic 2011.11.25 * * @see CoherenceQueryLanguageEngine */ public interface QueryEngine { /** * Prepares a Query for execution by replacing any parameter placeholders * with the appropriate values from the parameter map. * * @param sQuery query expression * @param mapParams parameter values used to resolve parameters from * query expression * * @return a Query instance ready for execution */ public Query prepareQuery(String sQuery, Map<String, Object> mapParams); // ---- constants ------------------------------------------------------- /** * The name of the default (CohQL) query engine. */ public static final String DEFAULT = "DEFAULT"; }
oracle/coherence
1,159
prj/coherence-core/src/main/java/com/tangosol/util/fsm/StateExitAction.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; /** * A {@link StateExitAction} encapsulates the actions to be performed by * a {@link FiniteStateMachine} when leaving a known state. * <p> * A {@link StateExitAction} for a particular state will be executed * prior to a {@link FiniteStateMachine} entering a new state. * * @param <S> the type of the state * * @author Brian Oliver * @since Coherence 12.2.1 */ public interface StateExitAction<S extends Enum<S>> { /** * Performs the necessary actions when a {@link FiniteStateMachine} * exits a particular state. * * @param state the state of the {@link FiniteStateMachine} prior to * changing state * @param event the {@link Event} that triggered the action * @param context the {@link ExecutionContext} for the action */ public void onExitState(S state, Event<S> event, ExecutionContext context); }
oracle/nosql
1,151
kvmain/src/main/java/com/sleepycat/je/rep/elections/LearnerStatDefinition.java
/*- * Copyright (C) 2002, 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 com.sleepycat.je.rep.elections; import com.sleepycat.je.utilint.StatDefinition; /** * Per-stat Metadata for each Learner statistics. */ public class LearnerStatDefinition { public static final String GROUP_NAME = "Learner"; public static final String GROUP_DESC = "stats related to the learner of the election"; public static final String N_MASTER_LEARNED = "nMasterLearned"; public static final String N_MASTER_LEARNED_DESC = "Number of times learner discovered the master"; public static StatDefinition MASTER_LEARNED = new StatDefinition (N_MASTER_LEARNED, N_MASTER_LEARNED_DESC); }
apache/cxf
1,160
rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLQueryException.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.frontend; import org.apache.cxf.common.i18n.Message; import org.apache.cxf.common.i18n.UncheckedException; public class WSDLQueryException extends UncheckedException { private static final long serialVersionUID = -3254386739668987981L; public WSDLQueryException(Message msg, Throwable t) { super(msg, t); } }
apache/directmemory
1,140
directmemory-tests/src/test/java/org/apache/directmemory/test/StandardSerializerTest.java
package org.apache.directmemory.test; /* * 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. */ import org.apache.directmemory.serialization.StandardSerializer; /** * @author Olivier Lamy */ public class StandardSerializerTest extends AbstractSerializerTest { @Override public String getSerializerClassName() { return StandardSerializer.class.getName(); } }
apache/dubbo-samples
1,099
3-extensions/registry/dubbo-samples-default-config/src/main/java/org/apache/dubbo/samples/multi/registry/impl/DemoServiceImpl.java
/* * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.dubbo.samples.multi.registry.impl; import org.apache.dubbo.samples.multi.registry.api.DemoService; public class DemoServiceImpl implements DemoService { @Override public String get(String name) { return "get: " + name; } }
apache/eventmesh
1,104
eventmesh-connectors/eventmesh-connector-lark/src/main/java/org/apache/eventmesh/connector/lark/config/LarkConnectServerConfig.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.lark.config; import org.apache.eventmesh.common.config.connector.Config; import lombok.Data; import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode(callSuper = true) public class LarkConnectServerConfig extends Config { private boolean sinkEnable; }
apache/eventmesh
1,129
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/metrics/MetricInstrumentUnit.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.runtime.metrics; public class MetricInstrumentUnit { private MetricInstrumentUnit() { } public static final String SINGLETON = "1"; public static final String TPS = "tps"; public static final String MILLISECONDS = "ms"; public static final String PERCENT = "%"; }
apache/eventmesh
1,133
eventmesh-common/src/main/java/org/apache/eventmesh/common/config/connector/wechat/WeChatSinkConfig.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.config.connector.wechat; import org.apache.eventmesh.common.config.connector.SinkConfig; import lombok.Data; import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode(callSuper = true) public class WeChatSinkConfig extends SinkConfig { private SinkConnectorConfig sinkConnectorConfig; }
apache/falcon
1,167
oozie/src/main/java/org/apache/falcon/logging/TaskLogURLRetriever.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.falcon.logging; import org.apache.hadoop.conf.Configurable; import java.io.IOException; import java.util.List; /** * Interface to abstract hadoop version specific task log url retrieval differences. */ public interface TaskLogURLRetriever extends Configurable { List<String> retrieveTaskLogURL(String jobId) throws IOException; }
apache/fineract
1,115
fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditReportReadPlatformService.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.fineract.infrastructure.creditbureau.service; import java.util.Collection; import org.apache.fineract.infrastructure.creditbureau.data.CreditReportData; public interface CreditReportReadPlatformService { Collection<CreditReportData> retrieveCreditReportDetails(Long creditBureauId); }
apache/fineract
1,131
fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeReadPlatformService.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.fineract.infrastructure.codes.service; import java.util.Collection; import org.apache.fineract.infrastructure.codes.data.CodeData; public interface CodeReadPlatformService { Collection<CodeData> retrieveAllCodes(); CodeData retrieveCode(Long codeId); CodeData retriveCode(String codeName); }
apache/fineract
1,132
fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/SchedulerDetailRepository.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.fineract.infrastructure.jobs.domain; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; public interface SchedulerDetailRepository extends JpaRepository<SchedulerDetail, Long>, JpaSpecificationExecutor<SchedulerDetail> { }
apache/flex-utilities
1,096
flex-maven-tools/flex-sdk-converter/converters/base/src/main/java/org/apache/flex/utilities/converter/exceptions/ConverterException.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.flex.utilities.converter.exceptions; public class ConverterException extends Exception { public ConverterException(String message) { super(message); } public ConverterException(String message, Throwable cause) { super(message, cause); } }
apache/flink
1,128
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResourceManagerPartitionTrackerFactory.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.io.network.partition; /** Factory for {@link ResourceManagerPartitionTracker}. */ @FunctionalInterface public interface ResourceManagerPartitionTrackerFactory { ResourceManagerPartitionTracker get( TaskExecutorClusterPartitionReleaser taskExecutorClusterPartitionReleaser); }
apache/flink
1,129
flink-filesystems/flink-s3-fs-hadoop/src/test/java/org/apache/flink/fs/s3hadoop/S5CmdOnHadoopS3FileSystemITCase.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.fs.s3hadoop; import org.apache.flink.fs.s3.common.HAJobRunOnMinioS3StoreITCase; import org.apache.flink.fs.s3.common.S5CmdOnMinioITCase; /** Runs the {@link HAJobRunOnMinioS3StoreITCase} on the Hadoop S3 file system. */ public class S5CmdOnHadoopS3FileSystemITCase extends S5CmdOnMinioITCase {}
apache/flink
1,129
flink-filesystems/flink-s3-fs-presto/src/test/java/org/apache/flink/fs/s3presto/S5CmdOnPrestoS3FileSystemITCase.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.fs.s3presto; import org.apache.flink.fs.s3.common.HAJobRunOnMinioS3StoreITCase; import org.apache.flink.fs.s3.common.S5CmdOnMinioITCase; /** Runs the {@link HAJobRunOnMinioS3StoreITCase} on the Presto S3 file system. */ public class S5CmdOnPrestoS3FileSystemITCase extends S5CmdOnMinioITCase {}
apache/flink
1,144
flink-runtime/src/main/java/org/apache/flink/runtime/broadcast/MaterializationExpiredException.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.broadcast; /** * Indicates that the {@link BroadcastVariableMaterialization} has materialized the broadcast * variable at some point but discarded it already. */ public class MaterializationExpiredException extends Exception { private static final long serialVersionUID = 7476456353634121934L; }
apache/geaflow
1,126
geaflow/geaflow-state/geaflow-state-common/src/main/java/org/apache/geaflow/state/key/KeyValueTrait.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.state.key; public interface KeyValueTrait<K, V> { /** * Returns the current value associated with the given key. */ V get(K key); /** * Override the value. */ void put(K key, V value); /** * Delete the key. */ void remove(K key); }
apache/geode
1,152
geode-management/src/main/java/org/apache/geode/management/configuration/IndexType.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.management.configuration; /** * Public ENUM to indicate type of Index on a Geode {@link Region} used by the Management API. * * @see Index * * @since Geode 1.12 */ public enum IndexType { KEY, RANGE, // this is used to represent deprecated index types not supported by the management API. @Deprecated HASH_DEPRECATED }
apache/gobblin
1,153
gobblin-api/src/main/java/org/apache/gobblin/typedconfig/compiletime/StringRegex.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.typedconfig.compiletime; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target({ElementType.FIELD, ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) public @interface StringRegex { String value(); }
apache/grails-core
1,165
grails-converters/src/main/groovy/grails/encoders/XMLEncoder.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 * * 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 grails.encoders; import grails.converters.XML; import org.grails.encoder.impl.BasicXMLEncoder; public class XMLEncoder extends BasicXMLEncoder { @Override protected Object encodeAsXmlObject(Object o) { if (o instanceof XML) { return o; } else { return new XML(o); } } }
apache/grails-core
1,165
grails-encoder/src/main/groovy/org/grails/encoder/Decoder.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 * * 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 org.grails.encoder; /** * interface for decoder methods * * @author Lari Hotari * @since 2.3 */ public interface Decoder extends CodecIdentifierProvider { /** * Decode given input object * * @param o * the input object * @return the decoded object */ Object decode(Object o); }
apache/hadoop-mapreduce
1,178
src/java/org/apache/hadoop/mapreduce/TaskType.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; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability; /** * Enum for map, reduce, job-setup, job-cleanup, task-cleanup task types. */ @InterfaceAudience.Public @InterfaceStability.Stable public enum TaskType { MAP, REDUCE, JOB_SETUP, JOB_CLEANUP, TASK_CLEANUP }
apache/hadoop
1,098
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/service/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. */ /** * Package org.apache.hadoop.yarn.server.service contains service related * classes. */ @Private @Unstable package org.apache.hadoop.yarn.server.service; import org.apache.hadoop.classification.InterfaceAudience.Private; import org.apache.hadoop.classification.InterfaceStability.Unstable;
apache/hadoop
1,134
hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/scheduler/CapacitySchedulerMetrics.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.sls.scheduler; import org.apache.hadoop.classification.InterfaceAudience.Private; import org.apache.hadoop.classification.InterfaceStability.Unstable; @Private @Unstable public class CapacitySchedulerMetrics extends SchedulerMetrics { public CapacitySchedulerMetrics() { super(); } }
apache/harmony
1,149
classlib/modules/awt/src/main/java/common/org/apache/harmony/awt/text/TextFieldKit.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. */ /** * @author Evgeniya G. Maenkova */ package org.apache.harmony.awt.text; import java.awt.Insets; import javax.swing.BoundedRangeModel; public interface TextFieldKit { int getHorizontalAlignment(); BoundedRangeModel getHorizontalVisibility(); boolean echoCharIsSet(); char getEchoChar(); Insets getInsets(); }
apache/harmony
1,155
classlib/modules/swing/src/main/java/common/javax/swing/event/TreeModelListener.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. */ /** * @author Anton Avtamonov */ package javax.swing.event; import java.util.EventListener; public interface TreeModelListener extends EventListener { void treeNodesChanged(TreeModelEvent e); void treeNodesInserted(TreeModelEvent e); void treeNodesRemoved(TreeModelEvent e); void treeStructureChanged(TreeModelEvent e); }
apache/harmony
1,155
classlib/modules/swing/src/main/java/common/javax/swing/MutableComboBoxModel.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. */ /** * @author Anton Avtamonov */ package javax.swing; public interface MutableComboBoxModel extends ComboBoxModel { public void addElement(final Object elem); public void insertElementAt(final Object elem, final int index); public void removeElement(final Object elem); public void removeElementAt(final int index); }
apache/hbase
1,156
hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/TwoPhaseProcedure.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.hbase.procedure2; import org.apache.yetus.audience.InterfaceAudience; import org.apache.yetus.audience.InterfaceStability; @InterfaceAudience.Private @InterfaceStability.Evolving public abstract class TwoPhaseProcedure<TEnvironment> extends Procedure<TEnvironment> { // TODO (e.g. used by ACLs/VisibilityTags updates) }
apache/hbase
1,162
hbase-common/src/main/java/org/apache/hadoop/hbase/util/TimeMeasurable.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.hbase.util; import org.apache.yetus.audience.InterfaceAudience; /** * Methods that implement this interface can be measured elapsed time. It works together with * {@link MovingAverage} to take effect. */ @InterfaceAudience.Private public interface TimeMeasurable<T> { /** * Measure elapsed time. */ T measure(); }
apache/hop
1,179
ui/src/main/java/org/apache/hop/ui/hopgui/CanvasListener.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.ui.hopgui; import org.eclipse.swt.widgets.Listener; public class CanvasListener { private static final ISingletonProvider PROVIDER; static { PROVIDER = (ISingletonProvider) ImplementationLoader.newInstance(CanvasListener.class); } public static final Listener getInstance() { return (Listener) PROVIDER.getInstanceInternal(); } }
apache/hudi
1,140
hudi-utilities/src/main/java/org/apache/hudi/utilities/exception/HoodieReadFromSourceException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hudi.utilities.exception; import org.apache.hudi.exception.HoodieException; public class HoodieReadFromSourceException extends HoodieException { public HoodieReadFromSourceException(String msg) { super(msg); } public HoodieReadFromSourceException(String msg, Throwable e) { super(msg, e); } }
apache/hudi
1,140
hudi-utilities/src/main/java/org/apache/hudi/utilities/exception/HoodieSchemaProviderException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hudi.utilities.exception; import org.apache.hudi.exception.HoodieException; public class HoodieSchemaProviderException extends HoodieException { public HoodieSchemaProviderException(String msg, Throwable e) { super(msg, e); } public HoodieSchemaProviderException(String msg) { super(msg); } }
apache/iceberg
1,153
spark/v3.4/spark/src/main/java/org/apache/iceberg/spark/source/HasIcebergCatalog.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.iceberg.spark.source; import org.apache.iceberg.catalog.Catalog; import org.apache.spark.sql.connector.catalog.TableCatalog; public interface HasIcebergCatalog extends TableCatalog { /** * Returns the underlying {@link org.apache.iceberg.catalog.Catalog} backing this Spark Catalog */ Catalog icebergCatalog(); }
apache/iceberg
1,153
spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/HasIcebergCatalog.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.iceberg.spark.source; import org.apache.iceberg.catalog.Catalog; import org.apache.spark.sql.connector.catalog.TableCatalog; public interface HasIcebergCatalog extends TableCatalog { /** * Returns the underlying {@link org.apache.iceberg.catalog.Catalog} backing this Spark Catalog */ Catalog icebergCatalog(); }
apache/iceberg
1,153
spark/v4.0/spark/src/main/java/org/apache/iceberg/spark/source/HasIcebergCatalog.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.iceberg.spark.source; import org.apache.iceberg.catalog.Catalog; import org.apache.spark.sql.connector.catalog.TableCatalog; public interface HasIcebergCatalog extends TableCatalog { /** * Returns the underlying {@link org.apache.iceberg.catalog.Catalog} backing this Spark Catalog */ Catalog icebergCatalog(); }
apache/ignite-3
1,139
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/exp/RangeIterable.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.exp; /** * Iterable over range conditions. */ public interface RangeIterable<RowT> extends Iterable<RangeCondition<RowT>> { /** * Multi bounds condition. * * @return {@code True} if iterable can have more than one item. */ public boolean multiBounds(); }
apache/ignite-3
1,145
modules/cli/src/main/java/org/apache/ignite/internal/cli/core/repl/ConnectionLostEvent.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ignite.internal.cli.core.repl; import org.apache.ignite.internal.cli.event.Event; import org.apache.ignite.internal.cli.event.EventType; /** * Connection lost event. */ public class ConnectionLostEvent implements Event { @Override public EventType eventType() { return EventType.CONNECTION_LOST; } }
apache/ignite-extensions
1,101
modules/ml-ext/ml/spark-model-parser/src/test/java/org/apache/ignite/ml/sparkmodelparser/IgniteMLSparkModelParserTestSuite.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.ml.sparkmodelparser; import org.junit.runner.RunWith; import org.junit.runners.Suite; /** Test suite for all module tests. */ @RunWith(Suite.class) @Suite.SuiteClasses({ SparkModelParserTest.class }) public class IgniteMLSparkModelParserTestSuite { // No-op. }
apache/ignite
1,118
modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryEvictsMultiThreadedSelfTest.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; /** * Multi-threaded tests for cache queries. */ public class IgniteCacheQueryEvictsMultiThreadedSelfTest extends IgniteCacheQueryMultiThreadedSelfTest { /** {@inheritDoc} */ @Override protected boolean evictsEnabled() { return true; } }
apache/ignite
1,128
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridReservable.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.distributed.dht; /** * Reservations support. */ public interface GridReservable { /** * Reserves. * * @return {@code true} If reserved successfully. */ public boolean reserve(); /** * Releases. */ public void release(); }
apache/ignite
1,128
modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/GridP2PTestObjectWithStaticInitializer.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.tests.p2p; /** * Test object with static initializer. */ public class GridP2PTestObjectWithStaticInitializer { /** * Static initializer. */ static { new GridP2PTestObject(); } /** * Test Object. */ public static class GridP2PTestObject { } }
apache/impala
1,173
fe/src/main/java/org/apache/impala/common/ParseException.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.impala.common; /** * Thrown for errors encountered when parsing a SQL statement. */ public class ParseException extends AnalysisException { public ParseException(String msg, Throwable cause) { super(msg, cause); } public ParseException(String msg) { super(msg); } public ParseException(Throwable cause) { super(cause); } }
apache/incubator-brooklyn
1,088
brooklyn-server/utils/rt-osgi/src/test/dependencies/osgi/entities/src/main/java/org/apache/brooklyn/test/osgi/entities/SimpleApplication.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.brooklyn.test.osgi.entities; import org.apache.brooklyn.api.entity.ImplementedBy; import org.apache.brooklyn.core.entity.StartableApplication; @ImplementedBy(SimpleApplicationImpl.class) public interface SimpleApplication extends StartableApplication { }
apache/incubator-datalab
1,127
services/datalab-model/src/main/java/com/epam/datalab/dto/computational/CheckInactivityStatusDTO.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package com.epam.datalab.dto.computational; import com.epam.datalab.dto.StatusBaseDTO; import lombok.Data; @Data public class CheckInactivityStatusDTO extends StatusBaseDTO<CheckInactivityStatusDTO> { private String exploratoryName; private String computationalName; private long lastActivityUnixTime; }
apache/incubator-datalab
1,132
services/self-service/src/main/java/com/epam/datalab/backendapi/service/UserRoleService.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package com.epam.datalab.backendapi.service; import com.epam.datalab.backendapi.resources.dto.UserRoleDTO; import java.util.List; public interface UserRoleService { List<UserRoleDTO> getUserRoles(); void createRole(UserRoleDTO dto); void updateRole(UserRoleDTO dto); void removeRole(String roleId); }
apache/incubator-datalab
1,135
services/datalab-model/src/main/java/com/epam/datalab/dto/imagemetadata/TemplateDTO.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package com.epam.datalab.dto.imagemetadata; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; import java.util.List; @Data @AllArgsConstructor @NoArgsConstructor public class TemplateDTO { @JsonProperty private String version; @JsonProperty private List<ApplicationDto> applications; }
apache/incubator-hugegraph-computer
1,112
computer/computer-test/src/main/java/org/apache/hugegraph/computer/core/sort/sorting/SortingTestSuite.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.hugegraph.computer.core.sort.sorting; import org.junit.runner.RunWith; import org.junit.runners.Suite; @RunWith(Suite.class) @Suite.SuiteClasses({ InputsSortingTest.HeapInputsSortingTest.class, InputsSortingTest.LoserTreeInputsSortingTest.class }) public class SortingTestSuite { }
apache/incubator-hugegraph
1,128
hugegraph-pd/hg-pd-client/src/main/java/org/apache/hugegraph/pd/pulse/PulseServerNotice.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.hugegraph.pd.pulse; public interface PulseServerNotice<T> { /** * @throws RuntimeException when failed to send ack-message to pd-server */ void ack(); long getNoticeId(); /** * Return a response object of gRPC stream. * * @return */ T getContent(); }
apache/incubator-kie-kogito-runtimes
1,052
quarkus/extensions/kogito-quarkus-rules-extension/kogito-quarkus-rules/src/main/java/org/kie/kogito/core/rules/incubation/quarkus/support/QuarkusRuleUnitIdFactory.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.core.rules.incubation.quarkus.support; import org.kie.kogito.incubation.rules.RuleUnitIds; import jakarta.enterprise.context.ApplicationScoped; @ApplicationScoped class QuarkusRuleUnitIdFactory extends RuleUnitIds { }
apache/incubator-kie-kogito-runtimes
1,113
api/kogito-api-incubation-common/src/main/java/org/kie/kogito/incubation/common/ReferenceContext.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.incubation.common; /** * This represents a computational context. * It may not converted to other computational contexts. * For that, use DataContext * * FIXME this will become the "real" data context: DataContext will be renamed. * */ public interface ReferenceContext { }
apache/incubator-kie-kogito-runtimes
1,139
jbpm/jbpm-tests/src/main/java/org/jbpm/bpmn2/objects/Account.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.jbpm.bpmn2.objects; public class Account { private Person person; public Person getPerson() { return person; } public void setPerson(Person person) { this.person = person; } @Override public String toString() { return "Account [person=" + person + "]"; } }
apache/incubator-kie-optaplanner
1,121
core/optaplanner-core-impl/src/main/java/org/optaplanner/core/config/score/director/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. */ @XmlSchema( namespace = SolverConfig.XML_NAMESPACE, elementFormDefault = XmlNsForm.QUALIFIED) package org.optaplanner.core.config.score.director; import jakarta.xml.bind.annotation.XmlNsForm; import jakarta.xml.bind.annotation.XmlSchema; import org.optaplanner.core.config.solver.SolverConfig;
apache/incubator-myriad
1,131
myriad-scheduler/src/main/java/org/apache/myriad/scheduler/event/ResourceOffersEventFactory.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.myriad.scheduler.event; import com.lmax.disruptor.EventFactory; /** * resource offer event factory */ public class ResourceOffersEventFactory implements EventFactory<ResourceOffersEvent> { @Override public ResourceOffersEvent newInstance() { return new ResourceOffersEvent(); } }
apache/incubator-retired-wave
1,117
wave/src/main/java/org/waveprotocol/wave/client/wavepanel/impl/toolbar/color/OnColorChooseListener.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.waveprotocol.wave.client.wavepanel.impl.toolbar.color; /** * The listener interface for receiving onColorChoose events. * * @author vjrj@ourproject.org (Vicente J. Ruiz Jurado) */ public interface OnColorChooseListener { void onColorChoose(String color); void onNoneColorChoose(); }
apache/incubator-seata-samples
1,075
xa-sample/springboot-feign-seata-xa/springboot-feign-seata-order/src/main/java/org/apache/seata/service/OrderService.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.seata.service; public interface OrderService { /** * 创建订单 * * @param userId 用户ID * @param commodityCode 商品编号 * @param orderCount 订购数量 */ void create(String userId, String commodityCode, int orderCount); }