repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
apache/tomcat | 1,138 | java/jakarta/transaction/HeuristicMixedException.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 jakarta.transaction;
import java.io.Serial;
public class HeuristicMixedException extends Exception {
@Serial
private static final long serialVersionUID = 2345014349685956666L;
public HeuristicMixedException() {
super();
}
public HeuristicMixedException(String msg) {
super(msg);
}
}
|
apache/tomcat | 1,149 | java/org/apache/el/parser/BooleanNode.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.el.parser;
import jakarta.el.ELException;
import org.apache.el.lang.EvaluationContext;
public abstract class BooleanNode extends SimpleNode {
public BooleanNode(int i) {
super(i);
}
@Override
public Class<?> getType(EvaluationContext ctx) throws ELException {
return Boolean.class;
}
}
|
apache/tomcat80 | 1,144 | test/org/apache/el/parser/TestAstChoice.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.el.parser;
import javax.el.ELProcessor;
import org.junit.Assert;
import org.junit.Test;
public class TestAstChoice {
@Test
public void test01() {
ELProcessor processor = new ELProcessor();
Object result = processor.eval("null?1:2");
Assert.assertEquals(Long.valueOf(2), result);
}
}
|
apache/tomee | 1,108 | container/openejb-core/src/main/java/org/apache/openejb/cipher/SafePasswordCipherBase.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.cipher;
public abstract class SafePasswordCipherBase implements SafePasswordCipher {
@Override
public String decrypt(final char[] encryptedPassword) {
throw new UnsupportedOperationException(getClass().getName() + " doesn't support String decryption");
}
}
|
apache/trafodion | 1,077 | docs/spj_guide/src/resources/source/numMonthlyOrders.java | // The MONTHLYORDERS procedure accepts an integer representing the month
// and returns the number of orders during that month to an output parameter.
//
// See http://trafodion.apache.org/docs/spj_guide/index.html#monthlyorders-procedure
// for more documentation.
public static void numMonthlyOrders( int month
, int[] numOrders
) throws SQLException
{
if ( month < 1 || month > 12 )
{
throw new SQLException( "Invalid value for month. "
+ "Retry the CALL statement "
+ "using a number from 1 to 12 "
+ "to represent the month."
, "38001"
) ;
}
Connection conn =
DriverManager.getConnection( "jdbc:default:connection" ) ;
PreparedStatement getNumOrders =
conn.prepareStatement( "SELECT COUNT( month( order_date ) ) "
+ "FROM trafodion.sales.orders "
+ "WHERE month( order_date ) = ?"
) ;
getNumOrders.setInt( 1, month ) ;
ResultSet rs = getNumOrders.executeQuery() ;
rs.next() ;
numOrders[0] = rs.getInt(1) ;
rs.close() ;
conn.close();
}
|
apache/wicket | 1,096 | wicket-core-tests/src/test/java/org/apache/wicket/markupFragments/MyBorder.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.markupFragments;
import org.apache.wicket.markup.html.border.Border;
/**
*
*/
public class MyBorder extends Border
{
private static final long serialVersionUID = 1L;
/**
* Construct.
*
* @param id
*/
public MyBorder(String id)
{
super(id);
}
}
|
apache/wicket | 1,108 | wicket-core-tests/src/test/java/org/apache/wicket/markup/IEConditionalCommentsPage.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;
import org.apache.wicket.markup.html.WebPage;
/**
* A page with just markup to test that IE conditional comments are properly preserved by
* MarkupParser
*/
public class IEConditionalCommentsPage extends WebPage
{
private static final long serialVersionUID = 1L;
}
|
apache/xmlgraphics-fop | 1,120 | fop-core/src/test/java/org/apache/fop/BasicDriverTestSuite.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;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
/**
* Test suite for basic functionality of FOP's Driver API.
*/
@RunWith(Suite.class)
@SuiteClasses(BasicDriverTestCase.class)
public class BasicDriverTestSuite {
}
|
google/binnavi | 1,082 | src/main/java/com/google/security/zynamics/zylib/gui/zygraph/editmode/actions/CDefaultNodePressedMiddleAction.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.editmode.actions;
import com.google.security.zynamics.zylib.gui.zygraph.editmode.IStateAction;
import com.google.security.zynamics.zylib.yfileswrap.gui.zygraph.editmode.states.CNodePressedMiddleState;
import java.awt.event.MouseEvent;
public class CDefaultNodePressedMiddleAction implements IStateAction<CNodePressedMiddleState> {
@Override
public void execute(final CNodePressedMiddleState state, final MouseEvent event) {
}
}
|
google/ExoPlayer | 1,093 | library/muxer/src/androidTest/java/com/google/android/exoplayer2/muxer/AndroidMuxerTestUtil.java | /*
* Copyright 2023 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.exoplayer2.muxer;
/** Utilities for muxer test cases. */
/* package */ final class AndroidMuxerTestUtil {
private static final String DUMP_FILE_OUTPUT_DIRECTORY = "muxerdumps";
private static final String DUMP_FILE_EXTENSION = "dump";
private AndroidMuxerTestUtil() {}
public static String getExpectedDumpFilePath(String originalFileName) {
return DUMP_FILE_OUTPUT_DIRECTORY + '/' + originalFileName + '.' + DUMP_FILE_EXTENSION;
}
}
|
google/j2cl | 1,085 | junit/generator/javatests/com/google/j2cl/junit/apt/JUnit4TestCaseWithNonStaticParameterizedMethod.java | /*
* Copyright 2022 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.j2cl.junit.apt;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
/** A simple Unit test to test processing in {@link J2clTestingProcessingStepTest}. */
@RunWith(Parameterized.class)
public class JUnit4TestCaseWithNonStaticParameterizedMethod {
@Parameters
public Object[][] data() {
return new Object[][] {{"0", 0}, {"1", 1}};
}
@Test
public void test() {}
}
|
google/j2cl | 1,090 | transpiler/javatests/com/google/j2cl/integration/java/allsimplebridges/Tester497.java | /*
* Copyright 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package allsimplebridges;
import static com.google.j2cl.integration.testing.Asserts.assertTrue;
import jsinterop.annotations.JsType;
public class Tester497 {
@JsType
static class C1<T> {
C1() {}
public String get(T value) {
return "C1.get";
}
}
@SuppressWarnings("rawtypes")
static class C2 extends C1 {
C2() {}
}
@SuppressWarnings("unchecked")
public static void test() {
C2 s = new C2();
assertTrue(((C1) s).get("").equals("C1.get"));
}
}
|
google/j2objc | 1,118 | annotations/src/main/java/com/google/j2objc/annotations/UsedByReflection.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.annotations;
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.TYPE;
import java.lang.annotation.Target;
/**
* Annotation used for marking types, methods and fields that are called by reflection. Useful for
* keeping components that would otherwise be removed by tree_shaker.
*/
@Target({TYPE, METHOD, CONSTRUCTOR, FIELD})
public @interface UsedByReflection {}
|
google/nomulus | 1,124 | core/src/main/java/google/registry/model/eppinput/package-info.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.
@XmlSchema(
namespace = "urn:ietf:params:xml:ns:epp-1.0",
xmlns = @XmlNs(prefix = "", namespaceURI = "urn:ietf:params:xml:ns:epp-1.0"),
elementFormDefault = XmlNsForm.QUALIFIED)
@XmlAccessorType(XmlAccessType.FIELD)
package google.registry.model.eppinput;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlNs;
import jakarta.xml.bind.annotation.XmlNsForm;
import jakarta.xml.bind.annotation.XmlSchema;
|
google/santa-tracker-android | 1,083 | presentquest/src/main/java/com/google/android/apps/santatracker/presentquest/util/Distance.java | /*
* Copyright (C) 2017 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.android.apps.santatracker.presentquest.util;
import android.location.Location;
import com.google.android.gms.maps.model.LatLng;
/** Util for calculating distance between two latlngs. */
public class Distance {
public static int between(LatLng a, LatLng b) {
float[] distance = new float[1];
Location.distanceBetween(a.longitude, a.latitude, b.longitude, b.latitude, distance);
return (int) distance[0];
}
}
|
googleapis/google-cloud-java | 1,028 | java-service-usage/proto-google-cloud-service-usage-v1beta1/src/main/java/com/google/api/serviceusage/v1beta1/ImportAdminQuotaPoliciesMetadataOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/serviceusage/v1beta1/serviceusage.proto
// Protobuf Java Version: 3.25.8
package com.google.api.serviceusage.v1beta1;
public interface ImportAdminQuotaPoliciesMetadataOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.api.serviceusage.v1beta1.ImportAdminQuotaPoliciesMetadata)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/google-cloud-java | 1,029 | java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/AnnotateAssessmentResponseOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto
// Protobuf Java Version: 3.25.8
package com.google.recaptchaenterprise.v1;
public interface AnnotateAssessmentResponseOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse)
com.google.protobuf.MessageOrBuilder {}
|
googlearchive/gwt-google-apis | 1,084 | language/language/src/com/google/gwt/language/client/translation/ContentType.java | /*
* Copyright 2009 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.gwt.language.client.translation;
/**
* Content type of the text to be translated.
*/
public enum ContentType {
HTML("html"), // Comments keep Eclipse formatter from putting on one line
TEXT("text");
private String value;
private ContentType(String value) {
this.value = value;
}
/**
* Get the text value associated with enum member.
*
* @return string containing enum value.
*/
public String getValue() {
return this.value;
}
}
|
hibernate/hibernate-ogm | 1,026 | integrationtest/src/test/java/org/hibernate/ogm/test/integration/neo4j/remote/controller/RemoteNeo4jResourceLocalCleaner.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.test.integration.neo4j.remote.controller;
import javax.annotation.PreDestroy;
import javax.ejb.Singleton;
import javax.ejb.Startup;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.PersistenceUnit;
/**
* @author Davide D'Alto
*/
@Singleton
@Startup
public class RemoteNeo4jResourceLocalCleaner {
@PersistenceUnit
private EntityManagerFactory factory;
@PreDestroy
public void deleteAll() {
EntityManager entityManager = factory.createEntityManager();
try {
entityManager.getTransaction().begin();
entityManager.createNativeQuery( "MATCH (n) DETACH DELETE (n)" ).executeUpdate();
entityManager.getTransaction().commit();
}
finally {
entityManager.close();
}
}
}
|
hibernate/hibernate-orm | 1,036 | hibernate-core/src/test/java/org/hibernate/orm/test/jpa/JpaComplianceStub.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.jpa;
import org.hibernate.jpa.spi.JpaCompliance;
/**
* Stubbed impl of JpaCompliance
*
* @author Steve Ebersole
*/
public class JpaComplianceStub implements JpaCompliance {
@Override
public boolean isJpaQueryComplianceEnabled() {
return false;
}
@Override
public boolean isJpaTransactionComplianceEnabled() {
return false;
}
@Override
public boolean isJpaCascadeComplianceEnabled() {
return false;
}
@Override
public boolean isJpaClosedComplianceEnabled() {
return false;
}
@Override
public boolean isJpaProxyComplianceEnabled() {
return false;
}
@Override
public boolean isJpaCacheComplianceEnabled() {
return false;
}
@Override
public boolean isGlobalGeneratorScopeEnabled() {
return false;
}
@Override
public boolean isJpaOrderByMappingComplianceEnabled() {
return false;
}
@Override
public boolean isLoadByIdComplianceEnabled() {
return false;
}
}
|
hibernate/hibernate-orm | 1,048 | hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/uuid/time2/Book.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.mapping.identifier.uuid.time2;
import org.hibernate.annotations.UuidGenerator;
import jakarta.persistence.Basic;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
import static org.hibernate.annotations.UuidGenerator.Style.TIME;
/**
* @author Steve Ebersole
*/
//tag::example-identifiers-generators-uuid-implicit[]
@Entity
public class Book {
@Id
@GeneratedValue
@UuidGenerator(style = TIME)
private String id;
@Basic
private String name;
//end::example-identifiers-generators-uuid-implicit[]
protected Book() {
// for Hibernate use
}
public Book(String name) {
this.name = name;
}
public String getId() {
return id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
//tag::example-identifiers-generators-uuid-implicit[]
}
//end::example-identifiers-generators-uuid-implicit[]
|
hibernate/hibernate-orm | 1,049 | hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/GaussDBCallableStatementSupport.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.community.dialect;
import org.hibernate.procedure.internal.StandardCallableStatementSupport;
import org.hibernate.procedure.spi.ProcedureParameterImplementor;
import org.hibernate.sql.exec.spi.JdbcCallParameterRegistration;
/**
* GaussDB implementation of CallableStatementSupport.
*
* @author liubao
*
* Notes: Original code of this class is based on OracleCallableStatementSupport.
*/
public class GaussDBCallableStatementSupport extends StandardCallableStatementSupport {
public static final StandardCallableStatementSupport INSTANCE = new GaussDBCallableStatementSupport(
true );
private GaussDBCallableStatementSupport(boolean supportsProcedures) {
super( supportsProcedures );
}
@Override
protected void appendNameParameter(
StringBuilder buffer,
ProcedureParameterImplementor parameter,
JdbcCallParameterRegistration registration) {
buffer.append( parameter.getName() ).append( " => ?" );
}
}
|
hibernate/hibernate-orm | 1,051 | hibernate-core/src/test/java/org/hibernate/orm/test/jpa/ejb3configuration/ExceptionInterceptor.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.jpa.ejb3configuration;
import org.hibernate.CallbackException;
import org.hibernate.Interceptor;
import org.hibernate.type.Type;
/**
* @author Emmanuel Bernard
*/
public class ExceptionInterceptor implements Interceptor {
public static final String EXCEPTION_MESSAGE = "Interceptor enabled";
protected boolean allowSave = false;
public ExceptionInterceptor() {
this.allowSave = false;
}
public ExceptionInterceptor(boolean allowSave) {
this.allowSave = allowSave;
}
@Override
public boolean onLoad(Object entity, Object id, Object[] state, String[] propertyNames, Type[] types)
throws CallbackException {
throw new IllegalStateException( EXCEPTION_MESSAGE );
}
@Override
public boolean onPersist(Object entity, Object id, Object[] state, String[] propertyNames, Type[] types)
throws CallbackException {
if (allowSave) return false;
throw new IllegalStateException( EXCEPTION_MESSAGE );
}
}
|
hibernate/hibernate-search | 1,029 | integrationtest/v5migrationhelper/orm/src/test/java/org/hibernate/search/test/embedded/State.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.test.embedded;
import jakarta.persistence.CascadeType;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
import jakarta.persistence.OneToOne;
import org.hibernate.search.annotations.DocumentId;
import org.hibernate.search.annotations.Field;
/**
* @author Hardy Ferentschik
*/
@Entity
public class State {
@Id
@DocumentId
@GeneratedValue
private Integer id;
@Field
private String name;
@OneToOne(mappedBy = "state", cascade = CascadeType.ALL)
private StateCandidate candidate;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public StateCandidate getCandidate() {
return candidate;
}
public void setCandidate(StateCandidate candidate) {
this.candidate = candidate;
}
}
|
hibernate/hibernate-search | 1,030 | documentation/src/test/java/org/hibernate/search/documentation/mapper/orm/binding/identifierbridge/compatible/Magazine.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.documentation.mapper.orm.binding.identifierbridge.compatible;
import jakarta.persistence.EmbeddedId;
import jakarta.persistence.Entity;
import org.hibernate.search.mapper.pojo.bridge.mapping.annotation.IdentifierBridgeRef;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.DocumentId;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.FullTextField;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.Indexed;
@Entity
@Indexed
public class Magazine {
@EmbeddedId
@DocumentId(
identifierBridge = @IdentifierBridgeRef(type = BookOrMagazineIdBridge.class)
)
private BookOrMagazineId id = new BookOrMagazineId();
@FullTextField(analyzer = "english")
private String title;
public BookOrMagazineId getId() {
return id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
}
|
hibernate/hibernate-search | 1,031 | backend/elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/orchestration/impl/ElasticsearchBatchedWork.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.backend.elasticsearch.orchestration.impl;
import java.util.concurrent.CompletableFuture;
import org.hibernate.search.backend.elasticsearch.work.impl.IndexingWork;
import org.hibernate.search.engine.backend.orchestration.spi.BatchedWork;
import org.hibernate.search.util.common.impl.Futures;
class ElasticsearchBatchedWork<T> implements BatchedWork<ElasticsearchBatchedWorkProcessor> {
private final IndexingWork<T> work;
private final CompletableFuture<T> future;
ElasticsearchBatchedWork(IndexingWork<T> work, CompletableFuture<T> future) {
this.work = work;
this.future = future;
}
@Override
public void submitTo(ElasticsearchBatchedWorkProcessor delegate) {
delegate.submit( work ).whenComplete( Futures.copyHandler( future ) );
}
@Override
public void markAsFailed(Throwable t) {
future.completeExceptionally( t );
}
String getQueuingKey() {
return work.getQueuingKey();
}
}
|
hibernate/hibernate-search | 1,042 | documentation/src/test/java/org/hibernate/search/documentation/mapper/orm/binding/identifierbridge/simple/BookIdBridge.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.documentation.mapper.orm.binding.identifierbridge.simple;
import org.hibernate.search.mapper.pojo.bridge.IdentifierBridge;
import org.hibernate.search.mapper.pojo.bridge.runtime.IdentifierBridgeFromDocumentIdentifierContext;
import org.hibernate.search.mapper.pojo.bridge.runtime.IdentifierBridgeToDocumentIdentifierContext;
//tag::include[]
public class BookIdBridge implements IdentifierBridge<BookId> { // <1>
@Override
public String toDocumentIdentifier(BookId value,
IdentifierBridgeToDocumentIdentifierContext context) { // <2>
return value.getPublisherId() + "/" + value.getPublisherSpecificBookId();
}
@Override
public BookId fromDocumentIdentifier(String documentIdentifier,
IdentifierBridgeFromDocumentIdentifierContext context) { // <3>
String[] split = documentIdentifier.split( "/" );
return new BookId( Long.parseLong( split[0] ), Long.parseLong( split[1] ) );
}
}
//end::include[]
|
hibernate/hibernate-search | 1,053 | backend/lucene/src/main/java/org/hibernate/search/backend/lucene/document/impl/LuceneIndexEntryFactory.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.backend.lucene.document.impl;
import org.hibernate.search.backend.lucene.document.model.impl.LuceneIndexModel;
import org.hibernate.search.backend.lucene.multitenancy.impl.MultiTenancyStrategy;
import org.hibernate.search.engine.backend.work.execution.spi.DocumentContributor;
public class LuceneIndexEntryFactory {
private final LuceneIndexModel model;
private final MultiTenancyStrategy multiTenancyStrategy;
public LuceneIndexEntryFactory(LuceneIndexModel model, MultiTenancyStrategy multiTenancyStrategy) {
this.model = model;
this.multiTenancyStrategy = multiTenancyStrategy;
}
public LuceneIndexEntry create(String tenantId, String id, String routingKey,
DocumentContributor documentContributor) {
LuceneRootDocumentBuilder builder = new LuceneRootDocumentBuilder(
model, multiTenancyStrategy
);
documentContributor.contribute( builder );
return builder.build( tenantId, id, routingKey );
}
}
|
hibernate/hibernate-shards | 1,117 | src/main/java/org/hibernate/shards/query/SetCommentEvent.java | /**
* Copyright (C) 2007 Google Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
package org.hibernate.shards.query;
import org.hibernate.Query;
/**
* @author Maulik Shah
*/
public class SetCommentEvent implements QueryEvent {
private final String comment;
public SetCommentEvent(String comment) {
this.comment = comment;
}
public void onEvent(Query query) {
query.setComment(comment);
}
}
|
openjdk/jdk8 | 1,130 | langtools/test/com/sun/javadoc/testMemberInheritence/inheritDist/C.java | /*
* Copyright (c) 2005, 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 inheritDist;
public class C implements B {
public void m1() {}
}
|
openjdk/jdk8 | 1,134 | langtools/test/tools/javadoc/generics/tparamTagOnType/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;
/**
* @param <T> the type parameter
*/
public interface A<T> {
}
|
openjdk/jdk8 | 1,135 | langtools/test/tools/javac/diags/examples/UnclosedCharLiteral.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.unclosed.char.lit
class UnclosedCharLit {
char c = 'a;
}
|
openjdk/jdk8 | 1,136 | langtools/test/com/sun/javadoc/testLinkTaglet/checkPkg/A.java | /*
* Copyright (c) 2005, 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 checkPkg;
/**
* 6280605
*/
public class A {
public void m(){}
}
|
openjdk/jdk8 | 1,136 | langtools/test/tools/javac/crossPackageImpl/CrossPackageImplB.java | /*
* Copyright (c) 2002, 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 b;
public abstract class CrossPackageImplB extends a.CrossPackageImplA {
}
|
openjdk/jdk8 | 1,139 | langtools/test/tools/javac/diags/examples/InterfaceExpected.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.intf.expected.here
class InterfaceExpected implements String { }
|
openjdk/jdk8 | 1,140 | langtools/test/tools/javac/diags/examples/GenericThrowable.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.generic.throwable
class GenericThrowable<T> extends Exception { }
|
openjdk/jdk8 | 1,146 | langtools/test/tools/javac/ClassCycle/ClassCycle2b.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.
*/
/*
* Auxiliary source file for ClassCycle2a.
*/
class ClassCycle2b extends ClassCycle2a {}
|
oracle/coherence | 1,087 | prj/coherence-json/src/main/java/com/oracle/coherence/io/json/genson/stream/ValueType.java | /*
* Copyright (c) 2020, Oracle and/or its affiliates.
*
* Copyright 2011-2014 Genson - Cepoi Eugen
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use
* this file except in compliance with the License.
*
* 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.coherence.io.json.genson.stream;
import java.util.List;
import java.util.Map;
public enum ValueType {
ARRAY(List.class),
OBJECT(Map.class),
STRING(String.class),
CHAR(Character.class),
INTEGER(Long.class),
DOUBLE(Double.class),
BOOLEAN(Boolean.class),
NULL(null);
private Class<?> clazz;
ValueType(Class<?> clazz) {
this.clazz = clazz;
}
public void setDefaultClass(Class<?> clazz) {
this.clazz = clazz;
}
public Class<?> toClass() {
return clazz;
}
}
|
oracle/json-in-db | 1,119 | JdbcExamples/src/main/java/movie/GetAllJsonObject.java | package movie;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import movie.model.Movie;
import oracle.sql.json.OracleJsonObject;
import oracle.ucp.jdbc.PoolDataSource;
import oracle.ucp.jdbc.PoolDataSourceFactory;
/**
* Gets each movie as an instance of OracleJsonObject and
* prints the name and genre fields.
*/
public class GetAllJsonObject {
public static void main(String[] args) throws Exception {
PoolDataSource pool = PoolDataSourceFactory.getPoolDataSource();
pool.setURL(String.join("", args));
pool.setConnectionFactoryClassName("oracle.jdbc.pool.OracleDataSource");
try (Connection con = pool.getConnection()) {
PreparedStatement read = con.prepareStatement("SELECT data FROM movie");
ResultSet rs = read.executeQuery();
while(rs.next()) {
OracleJsonObject movie = rs.getObject(1, OracleJsonObject.class);
System.out.println(movie.getString("name") + "\t (" + movie.getString("genre") + ")");
}
rs.close();
read.close();
}
}
}
|
apache/commons-jcs | 1,106 | commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/Asserts.java | package org.apache.commons.jcs3.jcache;
import java.util.Objects;
/*
* 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.
*/
public class Asserts
{
public static void assertNotNull(final Object value, final String name)
{
Objects.requireNonNull(name, () -> name + " is null");
}
private Asserts()
{
// no-op
}
}
|
apache/commons-text | 1,125 | src/main/java/org/apache/commons/text/similarity/Tokenizer.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.apache.commons.text.similarity;
import java.util.function.Function;
/**
* A tokenizer. Can produce arrays of tokens from a given type.
*
* @param <T> The type to tokenize.
* @param <R> The return array element type.
* @since 1.0
*/
interface Tokenizer<T, R> extends Function<T, R[]> {
// empty
}
|
apache/commons-text | 1,129 | src/main/java/org/apache/commons/text/matcher/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
*
* 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.
*/
/**
* <p>
* Provides algorithms for matching up strings for use with a {@link org.apache.commons.text.StringSubstitutor
* StringSubstitutor}. The main class here is {@link org.apache.commons.text.matcher.StringMatcherFactory
* StringMatcherFactory}.
* </p>
*
* @since 1.3
*/
package org.apache.commons.text.matcher;
|
apache/cxf | 1,115 | core/src/main/java/org/apache/cxf/interceptor/security/AuthenticationException.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.interceptor.security;
public class AuthenticationException extends SecurityException {
private static final long serialVersionUID = -823479120896894071L;
public AuthenticationException() {
}
public AuthenticationException(String reason) {
super(reason);
}
}
|
apache/directory-kerby | 1,090 | kerby-kerb/kerb-kdc-test/src/test/java/org/apache/kerby/kerberos/kerb/server/KeytabLoginTest.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
package org.apache.kerby.kerberos.kerb.server;
import org.junit.jupiter.api.Test;
public class KeytabLoginTest extends LoginTestBase {
@Test
public void testLogin() throws Exception {
checkSubject(super.loginServiceUsingKeytab());
}
} |
apache/doris-manager | 1,085 | manager/manager/src/main/java/org/apache/doris/stack/model/request/monitor/ClusterMonitorReq.java | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.doris.stack.model.request.monitor;
import lombok.Data;
import java.util.List;
@Data
public class ClusterMonitorReq {
private Long start;
private Long end;
private Integer pointNum;
private String quantile;
private List<String> nodes;
}
|
apache/drill | 1,102 | exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/HasDistributionAffinity.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.drill.exec.planner.physical;
import org.apache.drill.exec.planner.fragment.DistributionAffinity;
/**
* Implement this interface if a Prel has distribution affinity requirements.
*/
public interface HasDistributionAffinity {
DistributionAffinity getDistributionAffinity();
}
|
apache/druid | 1,112 | server/src/main/java/org/apache/druid/client/CoordinatorSegmentWatcherConfig.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.druid.client;
import com.fasterxml.jackson.annotation.JsonProperty;
public class CoordinatorSegmentWatcherConfig
{
@JsonProperty
private boolean awaitInitializationOnStart = true;
public boolean isAwaitInitializationOnStart()
{
return awaitInitializationOnStart;
}
}
|
apache/druid | 1,118 | processing/src/main/java/org/apache/druid/common/utils/ByteUtils.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.druid.common.utils;
public final class ByteUtils
{
public static byte checkedCast(int value)
{
byte result = (byte) value;
if (result != value) {
throw new IllegalArgumentException("Out of range: " + value);
}
return result;
}
private ByteUtils()
{
}
}
|
apache/dubbo-hessian-lite | 1,092 | hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/java8/OffsetTimeSerializer.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.alibaba.com.caucho.hessian.io.java8;
import com.alibaba.com.caucho.hessian.io.AbstractSerializer;
public class OffsetTimeSerializer<T> extends AbstractSerializer {
@Override
public Object writeReplace(Object obj) {
return new OffsetTimeHandle(obj);
}
}
|
apache/dubbo-hessian-lite | 1,092 | hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/java8/ZoneOffsetSerializer.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.alibaba.com.caucho.hessian.io.java8;
import com.alibaba.com.caucho.hessian.io.AbstractSerializer;
public class ZoneOffsetSerializer<T> extends AbstractSerializer {
@Override
public Object writeReplace(Object obj) {
return new ZoneOffsetHandle(obj);
}
}
|
apache/dubbo | 1,110 | dubbo-cluster/src/test/java/org/apache/dubbo/rpc/cluster/merger/IntFindFirstMerger.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.rpc.cluster.merger;
import org.apache.dubbo.rpc.cluster.Merger;
import java.util.Arrays;
public class IntFindFirstMerger implements Merger<Integer> {
@Override
public Integer merge(Integer... items) {
return Arrays.stream(items).findFirst().orElse(null);
}
}
|
apache/eagle | 1,082 | eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/PrimaryKeyBuilder.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.eagle.storage.jdbc.conn;
/**
* Primary key builder
*
* @since 3/29/15
*/
public interface PrimaryKeyBuilder<K> {
/**
*
* @param t entity instance
* @param <T> entity type
* @return primary in type of K
*/
<T> K build(T t);
} |
apache/eventmesh | 1,064 | eventmesh-connectors/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/config/KafkaServerConfig.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.kafka.config;
import org.apache.eventmesh.common.config.connector.Config;
import lombok.Data;
@Data
public class KafkaServerConfig extends Config {
private boolean sourceEnable;
private boolean sinkEnable;
}
|
apache/fesod | 1,113 | fesod/src/test/java/org/apache/fesod/excel/exception/ExceptionData.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fesod.excel.exception;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import org.apache.fesod.excel.annotation.ExcelProperty;
/**
*
*/
@Getter
@Setter
@EqualsAndHashCode
public class ExceptionData {
@ExcelProperty("姓名")
private String name;
}
|
apache/fineract | 1,083 | fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/service/LoanAccountTransfersService.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.portfolio.interestpauses.service;
import org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction;
public interface LoanAccountTransfersService {
void updateLoanTransaction(Long loanTransactionId, LoanTransaction newLoanTransaction);
}
|
apache/fineract | 1,103 | fineract-core/src/main/java/org/apache/fineract/commands/handler/NewCommandSourceHandler.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.commands.handler;
import org.apache.fineract.infrastructure.core.api.JsonCommand;
import org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
public interface NewCommandSourceHandler {
CommandProcessingResult processCommand(JsonCommand command);
}
|
apache/flink-cdc | 1,106 | flink-cdc-common/src/main/java/org/apache/flink/cdc/common/function/HashFunction.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.cdc.common.function;
import org.apache.flink.cdc.common.annotation.Internal;
/**
* The hash function used to calculate the hash code from a given event.
*
* @param <T> the type of given event.
*/
@Internal
public interface HashFunction<T> {
int hashcode(T event);
}
|
apache/flink-statefun | 1,090 | statefun-sdk-embedded/src/main/java/org/apache/flink/statefun/sdk/state/TableAccessor.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.statefun.sdk.state;
import java.util.Map;
public interface TableAccessor<K, V> {
void set(K key, V value);
V get(K key);
void remove(K key);
Iterable<Map.Entry<K, V>> entries();
Iterable<K> keys();
Iterable<V> values();
void clear();
}
|
apache/flink | 1,107 | flink-tests/src/test/java/org/apache/flink/test/plugin/jar/pluginb/OtherTestServiceB.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.test.plugin.jar.pluginb;
import org.apache.flink.test.plugin.OtherTestSpi;
/** Implementation of {@link OtherTestSpi}. */
public class OtherTestServiceB implements OtherTestSpi {
@Override
public String otherTestMethod() {
return getClass().getName();
}
}
|
apache/geaflow | 1,087 | geaflow/geaflow-model/src/main/java/org/apache/geaflow/model/graph/IGraphElementWithLabelField.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.model.graph;
public interface IGraphElementWithLabelField {
/**
* Get label.
*
* @return label
*/
String getLabel();
/**
* Set label.
*
* @param label label
*/
void setLabel(String label);
}
|
apache/geaflow | 1,097 | geaflow/geaflow-model/src/main/java/org/apache/geaflow/model/traversal/ITraversalResponse.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.model.traversal;
import java.io.Serializable;
import org.apache.geaflow.model.traversal.TraversalType.ResponseType;
public interface ITraversalResponse<R> extends Serializable {
long getResponseId();
R getResponse();
ResponseType getType();
}
|
apache/gobblin | 1,106 | gobblin-runtime/src/main/java/org/apache/gobblin/runtime/api/JobSpecNotFoundException.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.runtime.api;
import java.net.URI;
/**
* An exception thrown when a JobSpec with a given URI is not found.
*/
public class JobSpecNotFoundException extends SpecNotFoundException {
public JobSpecNotFoundException(URI missingJobSpecURI) {
super(missingJobSpecURI);
}
}
|
apache/gobblin | 1,119 | gobblin-utility/src/main/java/org/apache/gobblin/util/guid/HasGuid.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.util.guid;
import java.io.IOException;
/**
* Represents an object for which we can compute a unique, replicable {@link Guid}.
*/
public interface HasGuid {
/**
* @return the {@link Guid} for this object.
* @throws IOException
*/
public Guid guid() throws IOException;
}
|
apache/hadoop-common | 1,078 | hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/s3/Jets3tS3FileSystemContractTest.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.fs.s3;
import java.io.IOException;
public class Jets3tS3FileSystemContractTest
extends S3FileSystemContractBaseTest {
@Override
FileSystemStore getFileSystemStore() throws IOException {
return new Jets3tFileSystemStore();
}
}
|
apache/hadoop-common | 1,084 | hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/PATHCONF3Request.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.nfs.nfs3.request;
import java.io.IOException;
import org.apache.hadoop.oncrpc.XDR;
/**
* PATHCONF3 Request
*/
public class PATHCONF3Request extends RequestWithHandle {
public PATHCONF3Request(XDR xdr) throws IOException {
super(xdr);
}
}
|
apache/hadoop-common | 1,084 | hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/READLINK3Request.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.nfs.nfs3.request;
import java.io.IOException;
import org.apache.hadoop.oncrpc.XDR;
/**
* READLINK3 Request
*/
public class READLINK3Request extends RequestWithHandle {
public READLINK3Request(XDR xdr) throws IOException {
super(xdr);
}
} |
apache/hadoop | 1,025 | hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/RMAppState.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.resourcemanager.rmapp;
public enum RMAppState {
NEW,
NEW_SAVING,
SUBMITTED,
ACCEPTED,
RUNNING,
FINAL_SAVING,
FINISHING,
FINISHED,
FAILED,
KILLING,
KILLED
}
|
apache/hadoop | 1,063 | hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/CompositeAuthenticationHandler.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. See accompanying LICENSE file.
*/
package org.apache.hadoop.security.authentication.server;
import java.util.Collection;
/**
* Interface to support multiple authentication mechanisms simultaneously.
*
*/
public interface CompositeAuthenticationHandler extends AuthenticationHandler {
/**
* This method returns the token types supported by this authentication
* handler.
*
* @return the token types supported by this authentication handler.
*/
Collection<String> getTokenTypes();
}
|
apache/hadoop | 1,090 | hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/PathIsNotEmptyDirectoryException.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.fs;
/** Generated by rm commands */
public class PathIsNotEmptyDirectoryException extends PathExistsException {
/** @param path for the exception */
public PathIsNotEmptyDirectoryException(String path) {
super(path, "Directory is not empty");
}
} |
apache/hadoop | 1,101 | hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/curator/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.
*/
/**
* This package provides utilities to interact with Curator ZooKeeper.
*/
@InterfaceAudience.Public
@InterfaceStability.Evolving
package org.apache.hadoop.util.curator;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability; |
apache/harmony | 1,110 | drlvm/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/LazyObject2.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.harmony.vm.test.lazyresolution.data;
public class LazyObject2 implements LazyInterface2 {
public static int intStaticField=10;
public void interfaceCall2() {
intStaticField+=10;
}
public void interfaceCall2a() {
intStaticField+=10;
}
} |
apache/harmony | 1,125 | classlib/modules/rmi/src/main/java/java/rmi/UnexpectedException.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 java.rmi;
public class UnexpectedException extends RemoteException {
private static final long serialVersionUID = 1800467484195073863L;
public UnexpectedException(String msg, Exception cause) {
super(msg, cause);
}
public UnexpectedException(String msg) {
super(msg);
}
}
|
apache/hertzbeat | 1,094 | hertzbeat-common/src/main/java/org/apache/hertzbeat/common/support/event/SmsConfigChangeEvent.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hertzbeat.common.support.event;
import org.springframework.context.ApplicationEvent;
/**
* the event for sms config change
*/
public class SmsConfigChangeEvent extends ApplicationEvent {
public SmsConfigChangeEvent(Object source) {
super(source);
}
}
|
apache/ignite-3 | 1,054 | migration-tools/tools/e2e-tests-framework/framework-core/src/main/java/org/apache/ignite/migrationtools/tests/e2e/framework/core/SqlTest.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.migrationtools.tests.e2e.framework.core;
import java.sql.Connection;
import java.sql.SQLException;
/** SqlTest. */
public interface SqlTest {
void test(Connection conn, int numGeneratedExamples) throws SQLException;
}
|
apache/ignite-extensions | 1,080 | modules/ml-ext/ml/src/main/java/org/apache/ignite/ml/selection/paramgrid/HyperParameterTuningStrategy.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.selection.paramgrid;
/**
* The parent abstract class of all hyper-parameter tuning strategies.
*/
public abstract class HyperParameterTuningStrategy {
/**
* Returns the name of strategy.
*/
public abstract String getName();
}
|
apache/ignite | 1,078 | modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/oom/QueryOOMWithoutQueryParallelismTest.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.query.oom;
/**
* Tests for OOME on query.
*/
public class QueryOOMWithoutQueryParallelismTest extends AbstractQueryOOMTest {
/** {@inheritDoc} */
@Override protected int queryParallelism() {
return 1;
}
}
|
apache/ignite | 1,079 | modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcDynamicIndexTransactionalPartitionedNearSelfTest.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.jdbc2;
/** */
public class JdbcDynamicIndexTransactionalPartitionedNearSelfTest extends JdbcDynamicIndexTransactionalPartitionedSelfTest {
/** {@inheritDoc} */
@Override protected boolean nearCache() {
return true;
}
}
|
apache/ignite | 1,095 | modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/CacheDeploymentAlwaysTruePredicate.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;
import org.apache.ignite.lang.IgniteBiPredicate;
/**
*
*/
public class CacheDeploymentAlwaysTruePredicate implements IgniteBiPredicate<Object, Object> {
/** */
@Override public boolean apply(Object o, Object o2) {
return true;
}
}
|
apache/incubator-brooklyn | 1,049 | brooklyn-server/utils/rt-osgi/src/test/dependencies/osgi/entities/src/main/java/org/apache/brooklyn/test/osgi/entities/SimpleEntity.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.Entity;
import org.apache.brooklyn.api.entity.ImplementedBy;
@ImplementedBy(SimpleEntityImpl.class)
public interface SimpleEntity extends Entity {
}
|
apache/incubator-heron | 1,108 | storm-compatibility/v0.10.2/src/java/org/apache/storm/topology/IRichSpout.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.storm.topology;
import org.apache.storm.spout.ISpout;
/**
* When writing topologies using Java, {@link IRichBolt} and {@link IRichSpout} are the main interfaces
* to use to implement components of the topology.
*/
public interface IRichSpout extends ISpout, IComponent {
}
|
apache/incubator-hugegraph | 1,084 | hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/masterelection/Config.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hugegraph.masterelection;
public interface Config {
String node();
String url();
int exceedsFailCount();
long randomTimeoutMillisecond();
long heartBeatIntervalSecond();
int masterDeadTimes();
long baseTimeoutMillisecond();
}
|
apache/incubator-kie-drools | 1,092 | drools-model/drools-canonical-model/src/main/java/org/drools/model/WindowReference.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.drools.model;
import org.drools.model.functions.Predicate1;
public interface WindowReference<T> extends WindowDefinition, DeclarationSource {
Class<T> getPatternType();
Predicate1<T>[] getPredicates();
String getName();
EntryPoint getEntryPoint();
}
|
apache/incubator-kie-kogito-apps | 1,060 | jobs-service/jobs-service-storage-jpa/src/test/java/org/kie/kogito/jobs/service/profiles/H2QuarkusTestProfile.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.kie.kogito.jobs.service.profiles;
import io.quarkus.test.junit.QuarkusTestProfile;
public class H2QuarkusTestProfile implements QuarkusTestProfile {
@Override
public String getConfigProfile() {
return "test-h2";
}
}
|
apache/incubator-kie-kogito-apps | 1,081 | jobs/jobs-common-embedded/src/main/java/org/kie/kogito/app/jobs/api/JobDetailsEventAdapter.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.app.jobs.api;
import org.kie.kogito.event.DataEvent;
import org.kie.kogito.jobs.service.model.JobDetails;
public interface JobDetailsEventAdapter {
boolean accept(JobDetails jobDetails);
DataEvent<byte[]> adapt(JobDetails jobDetails);
}
|
apache/incubator-kie-kogito-runtimes | 1,046 | addons/common/tracing/decision-common/src/main/java/org/kie/kogito/tracing/decision/terminationdetector/TerminationDetector.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.tracing.decision.terminationdetector;
import org.kie.kogito.tracing.decision.event.evaluate.EvaluateEvent;
public interface TerminationDetector {
void add(EvaluateEvent event);
boolean isTerminated();
}
|
apache/incubator-retired-wave | 1,101 | wave/src/main/java/org/waveprotocol/wave/federation/FederationTransport.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.federation;
/**
* Represents a federation transport.
*
* @author tad.glines@gmail.com (Tad Glines)
*/
public interface FederationTransport {
/**
* Perform any post-configuration start-up for the federation subsystem
*/
void startFederation();
}
|
apache/incubator-samoa | 1,101 | samoa-storm/src/main/java/org/apache/samoa/topology/impl/StormTopologyNode.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.samoa.topology.impl;
/**
* Interface to represent a node in samoa-storm topology.
*
* @author Arinto Murdopo
*
*/
interface StormTopologyNode {
void addToTopology(StormTopology topology, int parallelismHint);
StormStream createStream();
String getId();
}
|
apache/incubator-tez | 1,084 | tez-runtime-library/src/main/java/org/apache/tez/runtime/library/shuffle/common/FetchedInputCallback.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.tez.runtime.library.shuffle.common;
public interface FetchedInputCallback {
public void fetchComplete(FetchedInput fetchedInput);
public void fetchFailed(FetchedInput fetchedInput);
public void freeResources(FetchedInput fetchedInput);
}
|
apache/incubator-tuweni | 1,138 | io/src/main/java/org/apache/tuweni/io/package-info.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE
* file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
* to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*
* Classes and utilities for handling file and network IO.
*
* <p>
* These classes are included in the standard Tuweni distribution, or separately when using the gradle dependency
* 'org.apache.tuweni:tuweni-io' (tuweni-io.jar).
*/
@ParametersAreNonnullByDefault
package org.apache.tuweni.io;
import javax.annotation.ParametersAreNonnullByDefault;
|
apache/inlong | 1,085 | inlong-tubemq/tubemq-core/src/main/java/org/apache/inlong/tubemq/corerpc/exception/ServerNotReadyException.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.inlong.tubemq.corerpc.exception;
import java.io.IOException;
public class ServerNotReadyException extends IOException {
private static final long serialVersionUID = -1037907015006723006L;
public ServerNotReadyException(String s) {
super(s);
}
}
|
apache/jclouds | 1,128 | core/src/main/java/org/jclouds/domain/LocationScope.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.jclouds.domain;
/**
* The scope of the location
*
*/
public enum LocationScope {
PROVIDER,
REGION,
ZONE,
/**
* @see <a href="http://dmtf.org/standards/cloud">cimi system docs</a>
*/
SYSTEM,
/**
* E.g. the DMZ segment, secure segment.
*/
NETWORK,
HOST;
}
|
apache/jena | 1,132 | jena-arq/src/main/java/org/apache/jena/sparql/algebra/JoinType.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.jena.sparql.algebra;
public enum JoinType {
INNER /* Normal, plain equijoin*/
, LEFT
//, RIGHT
//, OUTER // Full outer join
//, ANTI // Anti-join: rows in LHS where there is no matching tuple in RHS
//, SEMI // All tuples in LHS where there is a matching tuple in RHS
}
|
apache/juneau | 1,109 | juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/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.
*
***************************************************************************************************************************/
/**
* Remote REST API
*/
package org.apache.juneau.rest.client.remote; |
apache/kylin | 1,113 | src/core-metadata/src/main/java/org/apache/kylin/rest/aspect/WaitForSyncAfterRPC.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.kylin.rest.aspect;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface WaitForSyncAfterRPC {
}
|
apache/kylin | 1,114 | src/core-common/src/main/java/org/apache/kylin/common/event/ModelAddEvent.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.kylin.common.event;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
@Setter
@Getter
@AllArgsConstructor
@ToString
public class ModelAddEvent {
private String project;
private String modelId;
private String modelAlias;
}
|
apache/lens | 1,099 | lens-server-api/src/main/java/org/apache/lens/server/api/driver/QueryDriverStatusUpdateListener.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.lens.server.api.driver;
import org.apache.lens.api.query.QueryHandle;
/**
* This listener has callback method for status update events
*/
public interface QueryDriverStatusUpdateListener {
void onDriverStatusUpdated(QueryHandle handle, DriverQueryStatus status);
}
|
apache/lens | 1,118 | lens-server/src/main/java/org/apache/lens/server/session/SessionApp.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.lens.server.session;
import javax.ws.rs.ApplicationPath;
import org.apache.lens.server.BaseApp;
/**
* The Class SessionApp.
*/
@ApplicationPath("/session")
public class SessionApp extends BaseApp {
@Override
protected Class getResource() {
return SessionResource.class;
}
}
|
apache/linkis | 1,055 | linkis-public-enhancements/linkis-cs-server/src/main/java/org/apache/linkis/cs/highavailable/ContextHAManager.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.linkis.cs.highavailable;
import org.apache.linkis.cs.common.exception.CSErrorException;
/** 动态代理实现持久层HAIDKey和contextID的动态转换 */
public interface ContextHAManager {
<T> T getContextHAProxy(T persistence) throws CSErrorException;
}
|
apache/marmotta | 1,081 | libraries/ldclient/ldclient-core/src/test/java/org/apache/marmotta/ldclient/dummy/DummyEndpoint.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.marmotta.ldclient.dummy;
import org.apache.marmotta.ldclient.api.endpoint.Endpoint;
public class DummyEndpoint extends Endpoint {
public DummyEndpoint() {
super("Dummy", "Dummy", "^http://127.1.2.3", null, 86400l);
setPriority(PRIORITY_HIGH);
}
}
|
apache/maven-plugins | 1,020 | maven-javadoc-plugin/src/it/projects/dependencySource-2/MJAVADOC-280-2-projects/MJAVADOC-280-2-modA/src/main/java/org/apache/maven/plugins/mjavadoc/it/moda/App.java | package org.apache.maven.plugins.mjavadoc.it.moda;
/*
* 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.
*/
/**
* Hello world!
*
*/
public class App
{
public static void main( final String[] args )
{
System.out.println( "Hello World!" );
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.