repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
apache/tomee | 1,152 | server/openejb-common-cli/src/main/java/org/apache/openejb/server/cli/command/ExitCommand.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES 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.server.cli.command;
// just to get it in the help
@Command(name = "exit", usage = "exit", description = "exit from the cli")
public class ExitCommand extends AbstractCommand {
@Override
public void execute(String cmd) {
throw new UnsupportedOperationException("shouldn't be called directly");
}
}
|
apache/tomee | 1,164 | container/openejb-core/src/main/java/org/apache/openejb/OpenEJBRuntimeException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES 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;
public class OpenEJBRuntimeException extends RuntimeException {
public OpenEJBRuntimeException(final String str) {
super(str);
}
public OpenEJBRuntimeException(final String str, final Throwable e) {
super(str, e);
}
public OpenEJBRuntimeException(final Exception e) {
super(e);
}
}
|
apache/tomee | 1,168 | container/mbean-annotation-api/src/main/java/javax/management/ManagedAttribute.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package javax.management;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = ElementType.METHOD)
@Documented
public @interface ManagedAttribute {
}
|
apache/tomee | 1,168 | container/mbean-annotation-api/src/main/java/javax/management/ManagedOperation.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package javax.management;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = ElementType.METHOD)
@Documented
public @interface ManagedOperation {
}
|
apache/usergrid | 1,146 | stack/services/src/main/java/org/apache/usergrid/security/shiro/credentials/AdminUserAccessToken.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.usergrid.security.shiro.credentials;
public class AdminUserAccessToken extends AbstractAccessTokenCredentials implements AdminUserCredentials {
/**
* Needed for Jackson. Do not remove
*/
public AdminUserAccessToken() {}
public AdminUserAccessToken( String token ) {
super( token );
}
}
|
apache/wicket | 1,147 | wicket-core-tests/src/test/java/org/apache/wicket/markup/html/header/MyPage.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.wicket.markup.html.header;
import org.apache.wicket.markup.html.WebPage;
/**
*
* @author Matheus
*/
public class MyPage extends WebPage
{
private static final long serialVersionUID = 1L;
/**
* Creates a new instance of MyPage
*/
public MyPage()
{
add(new PanelA("panelA"));
add(new PanelB("panelB"));
}
}
|
apache/wicket | 1,172 | wicket-util/src/main/java/org/apache/wicket/util/NullProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES 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.util;
import java.util.function.Supplier;
/**
* Provider that provides {@code null}s. Convenient to have to avoid a double {@code null} check for
* the provider and its provided instance.
*
* @author igor.vaynberg
* @param <T>
*/
public class NullProvider<T> implements Supplier<T>
{
@Override
public T get()
{
return null;
}
}
|
apache/zeppelin | 1,157 | zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/ParametersRequest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES 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.zeppelin.rest.message;
import java.util.Map;
/**
* ParametersRequest rest api request message.
*/
public class ParametersRequest {
private final Map<String, Object> params;
public ParametersRequest(Map<String, Object> params) {
this.params = params;
}
public Map<String, Object> getParams() {
return params;
}
}
|
google/closure-templates | 1,164 | java/src/com/google/template/soy/shared/restricted/SoyPureFunction.java | /*
* Copyright 2011 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.template.soy.shared.restricted;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
* Annotation for a Soy function that's pure (e.g. can be preevaluated during optimization).
*
* <p>A pure function is one that's idempotent: if you evaluate a pure function with a given set of
* arguments it will always return the same value.
*/
@Target(TYPE)
@Retention(RUNTIME)
public @interface SoyPureFunction {}
|
google/gapid | 1,179 | gapic/src/main/com/google/gapid/glviewer/gl/GlObject.java | /*
* Copyright (C) 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.gapid.glviewer.gl;
/**
* Base class for OpenGL objects owned by a {@link Renderer}.
*/
public abstract class GlObject {
private final Renderer owner;
private boolean deleted = false;
GlObject(Renderer owner) {
this.owner = owner;
}
/**
* Frees the underlying object.
* Once deleted the object should no longer be used.
*/
public void delete() {
if (!deleted) {
owner.unregister(this);
deleted = true;
release();
}
}
/** Delete the underlying OpenGL object */
protected abstract void release();
}
|
google/guava | 1,164 | android/guava-testlib/test/com/google/common/testing/RelationshipTesterTest.java | /*
* Copyright (C) 2012 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.common.testing;
import com.google.common.testing.RelationshipTester.Item;
import com.google.common.testing.RelationshipTester.ItemReporter;
import junit.framework.TestCase;
import org.jspecify.annotations.NullUnmarked;
/**
* Tests for {@link RelationshipTester}.
*
* @author Ben Yu
*/
@NullUnmarked
public class RelationshipTesterTest extends TestCase {
public void testNulls() {
new ClassSanityTester()
.setDefault(ItemReporter.class, /* itemReporter */ Item::toString)
.testNulls(RelationshipTester.class);
}
}
|
google/j2cl | 1,142 | transpiler/javatests/com/google/j2cl/integration/java/allsimplebridges/Tester120.java | /*
* Copyright 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package allsimplebridges;
import static com.google.j2cl.integration.testing.Asserts.assertTrue;
public class Tester120 {
static interface I1 {
String get(String value);
}
static class C1<T> {
C1() {}
public String get(T value) {
return "C1.get";
}
}
static class C2 extends C1<String> implements I1 {
C2() {}
}
@SuppressWarnings("unchecked")
public static void test() {
C2 s = new C2();
assertTrue(((C1) s).get("").equals("C1.get"));
assertTrue(((I1) s).get("").equals("C1.get"));
}
}
|
google/j2objc | 1,157 | jre_emul/android/platform/libcore/luni/src/main/java/android/system/Int32Ref.java | /*
* Copyright (C) 2017 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 android.system;
import libcore.util.Objects;
import android.compat.annotation.UnsupportedAppUsage;
/**
* @hide
* A signed 32bit integer reference suitable for passing to lower-level system calls.
*/
@libcore.api.CorePlatformApi
public class Int32Ref {
@UnsupportedAppUsage
@libcore.api.CorePlatformApi
public int value;
@libcore.api.CorePlatformApi
public Int32Ref(int value) {
this.value = value;
}
@Override public String toString() {
return Objects.toString(this);
}
}
|
google/MOE | 1,166 | client/src/main/java/com/google/devtools/moe/client/dvcs/DvcsDraftRevision.java | /*
* Copyright (c) 2011 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.devtools.moe.client.dvcs;
import com.google.devtools.moe.client.codebase.LocalWorkspace;
import com.google.devtools.moe.client.writer.DraftRevision;
/**
* A DraftRevision for DVCSes, i.e. a clone to disk with locally staged or committed changes.
*/
public class DvcsDraftRevision implements DraftRevision {
private final LocalWorkspace revClone;
public DvcsDraftRevision(LocalWorkspace revClone) {
this.revClone = revClone;
}
@Override
public String getLocation() {
return revClone.getLocalTempDir().getAbsolutePath();
}
}
|
googleads/googleads-mobile-unity | 1,084 | source/plugin/Assets/Plugins/Android/GoogleMobileAdsPlugin.androidlib/src/main/java/com/google/unity/ads/decagon/UnityInterstitialAdCallback.java | /*
* Copyright (C) 2025 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.unity.ads.decagon;
import com.google.android.libraries.ads.mobile.sdk.common.LoadAdError;
/**
* An interface form of {@link InterstitialAdCallback} that can be implemented via {@code
* AndroidJavaProxy} in Unity to receive ad events synchronously.
*/
public interface UnityInterstitialAdCallback
extends UnityFullScreenContentCallback, UnityPaidEventListener {
void onInterstitialAdLoaded();
void onInterstitialAdFailedToLoad(LoadAdError error);
}
|
googleapis/google-cloud-java | 1,052 | java-cloudcommerceconsumerprocurement/proto-google-cloud-cloudcommerceconsumerprocurement-v1/src/main/java/com/google/cloud/commerce/consumer/procurement/v1/UnassignResponseOrBuilder.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/commerce/consumer/procurement/v1/license_management_service.proto
// Protobuf Java Version: 3.25.8
package com.google.cloud.commerce.consumer.procurement.v1;
public interface UnassignResponseOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.commerce.consumer.procurement.v1.UnassignResponse)
com.google.protobuf.MessageOrBuilder {}
|
googlearchive/caja | 1,175 | src/com/google/caja/service/UnsupportedContentTypeException.java | //Copyright (C) 2008 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.caja.service;
/**
* Thrown by cajoling service when it is requested to retrieve content
* for which there is no associated checker.
*
* Only the cajoling service should catch this exception.
*
* @author jasvir@gmail.com (Jasvir Nagra)
*/
public class UnsupportedContentTypeException extends Exception {
private static final long serialVersionUID = -6268704959998061330L;
public UnsupportedContentTypeException() {
this("Unknown content type requested");
}
public UnsupportedContentTypeException(String msg) {
super(msg);
}
} |
googlemaps/google-maps-services-java | 1,164 | src/main/java/com/google/maps/model/TransitMode.java | /*
* Copyright 2015 Google Inc. All rights reserved.
*
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package com.google.maps.model;
import com.google.maps.internal.StringJoin.UrlValue;
import java.util.Locale;
/** You may specify transit mode when requesting transit directions or distances. */
public enum TransitMode implements UrlValue {
BUS,
SUBWAY,
TRAIN,
TRAM,
/** Indicates preferred travel by train, tram, light rail and subway. */
RAIL;
@Override
public String toString() {
return name().toLowerCase(Locale.ENGLISH);
}
@Override
public String toUrlValue() {
return name().toLowerCase(Locale.ENGLISH);
}
}
|
googlesamples/android-testdpc | 1,160 | src/main/java/com/afwsamples/testdpc/search/PreferenceCrawler.java | package com.afwsamples.testdpc.search;
import android.content.Context;
import android.util.TimingLogger;
import java.util.ArrayList;
import java.util.List;
/**
* Crawl indexable fragments to index all their preferences. Run adb shell setprop
* log.tag.PreferenceCrawler_Timer VERBOSE to see timing log. At the time of writing, nexus 5x
* spends 27ms to finish crawling.
*/
public class PreferenceCrawler {
private Context mContext;
private static final String TAG = "PreferenceCrawler_Timer";
public PreferenceCrawler(Context context) {
mContext = context;
}
public List<PreferenceIndex> doCrawl() {
final TimingLogger logger = new TimingLogger(TAG, "doCrawl");
List<PreferenceIndex> indexablePreferences = new ArrayList<>();
List<BaseIndexableFragment> indexableFragments = IndexableFragments.values();
for (BaseIndexableFragment indexableFragment : indexableFragments) {
indexablePreferences.addAll(indexableFragment.index(mContext));
logger.addSplit("processed " + indexableFragment.fragmentName);
}
logger.addSplit("Finish crawling");
logger.dumpToLog();
return indexablePreferences;
}
}
|
hibernate/hibernate-orm | 1,089 | hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/sequence/GaussDBSequenceSupport.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.community.dialect.sequence;
import org.hibernate.MappingException;
import org.hibernate.community.dialect.GaussDBDialect;
import org.hibernate.dialect.sequence.SequenceSupport;
/**
* Sequence support for {@link GaussDBDialect}.
*
* @author liubao
*
* Notes: Original code of this class is based on PostgreSQLAggregateSupport.
*/
public class GaussDBSequenceSupport implements SequenceSupport {
public static final SequenceSupport INSTANCE = new GaussDBSequenceSupport();
@Override
public String getSelectSequenceNextValString(String sequenceName) {
return "nextval('" + sequenceName + "')";
}
@Override
public String getSelectSequencePreviousValString(String sequenceName) throws MappingException {
return "currval('" + sequenceName + "')";
}
@Override
public boolean sometimesNeedsStartingValue() {
return true;
}
@Override
public String getDropSequenceString(String sequenceName) {
return "drop sequence if exists " + sequenceName;
}
}
|
hibernate/hibernate-orm | 1,091 | hibernate-core/src/test/java/org/hibernate/orm/test/annotations/fetchprofile/Customer6.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.annotations.fetchprofile;
import org.hibernate.annotations.FetchProfile;
import org.hibernate.orm.test.annotations.fetchprofile.mappedby.Address;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
import jakarta.persistence.OneToOne;
@Entity
@FetchProfile(name = "customer-with-address", fetchOverrides = {
@FetchProfile.FetchOverride(entity = Customer6.class, association = "address")
})
public class Customer6 {
@Id
@GeneratedValue
private long id;
private String name;
@OneToOne(fetch = FetchType.LAZY)
private Address address;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Address getAddress() {
return address;
}
public void setAddress(Address address) {
this.address = address;
}
}
|
openjdk/jdk8 | 1,175 | langtools/test/com/sun/javadoc/testLinkOption/java/lang/StringBuilderChild.java | /*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package java.lang;
/**
* @author Jamie Ho
*/
public abstract class StringBuilderChild extends AbstractStringBuilder {
}
|
openjdk/jdk8 | 1,182 | langtools/test/tools/javac/annotations/6365854/evolve/TestAnnotation.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 test.annotation;
import java.lang.annotation.*;
@Retention(RetentionPolicy.RUNTIME)
public @interface TestAnnotation {
}
|
openjdk/jdk8 | 1,189 | jdk/test/java/beans/XMLEncoder/6380849/BeanPersistenceDelegate.java | /*
* Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.beans.DefaultPersistenceDelegate;
public class BeanPersistenceDelegate
extends DefaultPersistenceDelegate {
}
|
openjdk/jdk8 | 1,190 | langtools/test/tools/javac/diags/examples/LambdaNotSupported.java | /*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// key: compiler.err.lambda.not.supported.in.source
// options: -source 7 -Xlint:-options
class LambdaNotSupported {
S s = ()->{};
}
|
openjdk/jdk8 | 1,192 | langtools/test/tools/javac/diags/examples/RefAmbiguous.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.ref.ambiguous
class X {
void m(int i, double d) { }
void m(double d, int m) { }
{
m(1, 2);
}
}
|
openjdk/jdk8 | 1,198 | langtools/test/tools/javac/diags/examples/MrefStat.java | /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// key: compiler.note.mref.stat
// options: -XDdumpLambdaToMethodStats
class MrefStat {
Runnable r = MrefStat::m;
static void m() { }
}
|
openjdk/jdk8 | 1,199 | jdk/test/java/rmi/transport/readTimeout/TestIface.java | /*
* Copyright (c) 1999, 2008, 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.
*/
import java.rmi.*;
public interface TestIface
extends Remote
{
public String testCall(String ign)
throws RemoteException;
}
|
openjdk/skara | 1,166 | bots/pr/src/main/java/org/openjdk/skara/bots/pr/MergePullRequestReviewConfiguration.java | /*
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.skara.bots.pr;
enum MergePullRequestReviewConfiguration {
ALWAYS,
NEVER,
JCHECK
}
|
oracle/coherence | 1,142 | prj/coherence-core/src/main/java/com/tangosol/internal/util/SimpleQueryContext.java | /*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
package com.tangosol.internal.util;
import com.tangosol.net.BackingMapContext;
import com.tangosol.util.QueryContext;
/**
* Simple QueryContext implementation.
*
* @since Coherence 3.7.1
*
* @author tb 2011.05.26
*/
public class SimpleQueryContext
implements QueryContext
{
// ----- Constructors ---------------------------------------------------
/**
* Construct a SimpleQueryContext.
*
* @param ctx the backing map context
*/
public SimpleQueryContext(BackingMapContext ctx)
{
m_ctx = ctx;
}
// ----- QueryContext interface -----------------------------------------
/**
* {@inheritDoc}
*/
public BackingMapContext getBackingMapContext()
{
return m_ctx;
}
// ----- data members ---------------------------------------------------
/**
* The backing map context.
*/
private final BackingMapContext m_ctx;
}
|
oracle/coherence | 1,159 | prj/coherence-core/src/main/java/com/oracle/coherence/common/base/Associated.java | /*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
package com.oracle.coherence.common.base;
/**
* The Associated interface facilitates the creation of a very generic
* <a href="http://en.wikipedia.org/wiki/Equivalence_relation">
* equivalence relation</a> between different objects and allows to group them
* based on the equality of the "association key" object returned by the
* {@link #getAssociatedKey} method.
*
* @param <T> the type of associated key
*
* @author gg 2012.03.11
*
* @see Associator
*/
public interface Associated<T>
{
/**
* Determine the host key (or base) object to which this object is associated.
* <p>
* <b>Note:</b> It's expected that the returned object is suitable to be used
* as an immutable identity (e.g. a key in a Map).
* <br>
* <b>Note 2:</b> Circular associations are not permitted.
*
* @return the host key that for this object, or null if this object has no
* association
*/
public T getAssociatedKey();
} |
oracle/coherence | 1,165 | prj/coherence-core/src/main/java/com/tangosol/config/xml/ElementProcessor.java | /*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
package com.tangosol.config.xml;
import com.tangosol.config.ConfigurationException;
import com.tangosol.run.xml.XmlElement;
/**
* An {@link ElementProcessor} is responsible for processing {@link XmlElement} content
* to return a strongly-typed value.
*
* @param <T> the type of value that will be returned by the {@link ElementProcessor}
*
* @author bo 2011.06.14
* @since Coherence 12.1.2
*/
public interface ElementProcessor<T>
{
/**
* Process an {@link XmlElement} to return a specific type of value.
*
* @param context the {@link ProcessingContext} in which the
* {@link XmlElement} is being processed
* @param xmlElement the {@link XmlElement} to process
*
* @throws ConfigurationException when a configuration problem was encountered
*
* @return a value of type T
*/
public T process(ProcessingContext context, XmlElement xmlElement)
throws ConfigurationException;
}
|
oracle/fastr | 1,162 | com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_isR.java | /*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* This program 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 for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 51
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Copyright (c) 2014, Purdue University
* Copyright (c) 2014, 2018, Oracle and/or its affiliates
*
* All rights reserved.
*/
package com.oracle.truffle.r.test.builtins;
import org.junit.Test;
import com.oracle.truffle.r.test.TestBase;
// Checkstyle: stop line length check
public class TestBuiltin_isR extends TestBase {
@Test
public void testisR1() {
assertEval("argv <- list();do.call('is.R', argv)");
}
}
|
apache/ctakes | 1,150 | ctakes-coreference/src/main/java/org/apache/ctakes/coreference/util/AnnotOffsetComparator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES 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.ctakes.coreference.util;
import org.apache.uima.jcas.tcas.Annotation;
import java.util.Comparator;
public class AnnotOffsetComparator implements Comparator<Annotation> {
public int compare (Annotation a1, Annotation a2) {
int ret = a1.getBegin() - a2.getBegin();
return ret==0 ? a1.getEnd()-a2.getEnd() : ret;
}
}
|
apache/cxf | 1,152 | services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSNotFoundException.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES 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.xkms.exception;
public class XKMSNotFoundException extends XKMSException {
private static final long serialVersionUID = 868729742068991785L;
public XKMSNotFoundException(String arg0) {
super(arg0);
}
public XKMSNotFoundException(String arg0, Throwable arg1) {
super(arg0, arg1);
}
}
|
apache/cxf | 1,153 | systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestFastInfoset2.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.cxf.systest.jaxrs.jaxws;
import org.apache.cxf.annotations.FastInfoset;
import org.apache.cxf.systest.jaxrs.Book;
@FastInfoset(force = true)
public class BookStoreSoapRestFastInfoset2 extends BookStoreSoapRestImpl {
@Override
public Book addFastinfoBook(Book book) {
return super.addFastinfoBook(book);
}
}
|
apache/cxf | 1,154 | systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/handler/HelloWorld.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.cxf.systest.ws.security.handler;
import jakarta.jws.WebMethod;
import jakarta.jws.WebParam;
import jakarta.jws.WebService;
@WebService(name = "HelloWorld", targetNamespace = "http://cxf.apache.org/wsse/handler/helloworld")
public interface HelloWorld {
@WebMethod
String sayHello(@WebParam(name = "toWhom") String to);
}
|
apache/cxf | 1,165 | systests/transport-hc5/src/test/java/org/apache/cxf/systest/hc5/jaxrs/RETRIEVE.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.cxf.systest.hc5.jaxrs;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import jakarta.ws.rs.HttpMethod;
@Target({ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@HttpMethod("RETRIEVE")
public @interface RETRIEVE {
}
|
apache/deltaspike | 1,129 | deltaspike/modules/jpa/impl/src/test/java/org/apache/deltaspike/test/jpa/api/transactional/aggregation/BeanA.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.deltaspike.test.jpa.api.transactional.aggregation;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;
import jakarta.persistence.EntityManager;
@ApplicationScoped
public class BeanA
{
@Inject
private EntityManager entityManager;
public void doA()
{
}
}
|
apache/deltaspike | 1,129 | deltaspike/modules/jpa/impl/src/test/java/org/apache/deltaspike/test/jpa/api/transactional/aggregation/BeanB.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.deltaspike.test.jpa.api.transactional.aggregation;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;
import jakarta.persistence.EntityManager;
@ApplicationScoped
public class BeanB
{
@Inject
private EntityManager entityManager;
public void doB()
{
}
}
|
apache/dolphinscheduler | 1,108 | dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/models/tenant/BootstrapTenant.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES 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.dolphinscheduler.e2e.models.tenant;
public class BootstrapTenant implements ITenant {
@Override
public String getTenantCode() {
return System.getProperty("user.name");
}
@Override
public String getDescription() {
return "bootstrap tenant";
}
}
|
apache/drill | 1,141 | exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/text/reader/StreamFinishedPseudoException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.drill.exec.store.easy.text.reader;
@SuppressWarnings("serial")
class StreamFinishedPseudoException extends RuntimeException {
public static final StreamFinishedPseudoException INSTANCE =
new StreamFinishedPseudoException();
private StreamFinishedPseudoException() {
super("", null, false, true);
}
}
|
apache/dubbo | 1,136 | dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/api/connection/ConnectionHandler.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.remoting.api.connection;
public interface ConnectionHandler {
/**
* when server close connection gracefully.
*
* @param channel Channel
*/
void onGoAway(Object channel);
/**
* reconnect
*
* @param channel Channel
*/
void reconnect(Object channel);
}
|
apache/eagle | 1,120 | eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/sorter/StreamTimeClockListener.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eagle.alert.engine.sorter;
public interface StreamTimeClockListener {
/**
* StreamTimeClockListener onTick callback.
*
* @param streamTime
* @param globalSystemTime
* @see StreamWindow
*/
void onTick(StreamTimeClock streamTime, long globalSystemTime);
} |
apache/eagle | 1,131 | eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/spi/DataStorageServiceProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES 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.spi;
import org.apache.eagle.storage.DataStorage;
/**
* @since 3/20/15
*/
public interface DataStorageServiceProvider<T extends DataStorage> {
/**
* @return unique storage type
*/
String getType();
/**
*
* @return storage instance
*/
T getStorage();
} |
apache/felix-dev | 1,080 | ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/main/java/org/apache/felix/ipojo/runtime/core/test/components/exceptions/NoServiceException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.felix.ipojo.runtime.core.test.components.exceptions;
/**
* Class used to test the 'exception' attribute.
*/
public class NoServiceException extends RuntimeException {
public NoServiceException(String message) {
super(message);
}
}
|
apache/felix-dev | 1,169 | scr/src/main/java/org/apache/felix/scr/impl/inject/ActivatorParameter.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.felix.scr.impl.inject;
public final class ActivatorParameter extends BaseParameter
{
private final int m_reason;
public ActivatorParameter(ScrComponentContext componentContext, int reason)
{
super(componentContext);
this.m_reason = reason;
}
public int getReason()
{
return m_reason;
}
} |
apache/fineract | 1,115 | fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/data/request/FinancialActivityAccRequest.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES 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.accounting.financialactivityaccount.data.request;
import java.io.Serial;
import java.io.Serializable;
public record FinancialActivityAccRequest(Long financialActivityId, Long glAccountId) implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
}
|
apache/fineract | 1,130 | fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/service/WorkingDaysWritePlatformService.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES 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.organisation.workingdays.service;
import org.apache.fineract.infrastructure.core.api.JsonCommand;
import org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
public interface WorkingDaysWritePlatformService {
CommandProcessingResult updateWorkingDays(JsonCommand command);
}
|
apache/fineract | 1,140 | fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/domain/CustomJobParameterRepository.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.infrastructure.jobs.domain;
import java.util.Optional;
import java.util.Set;
import org.apache.fineract.infrastructure.jobs.data.JobParameterDTO;
public interface CustomJobParameterRepository {
Long save(Set<JobParameterDTO> customJobParameters);
Optional<CustomJobParameter> findById(Long Id);
}
|
apache/fineract | 1,142 | fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/data/request/AccountRuleRequest.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES 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.accounting.rule.data.request;
import java.io.Serial;
import java.io.Serializable;
public record AccountRuleRequest(String name, Long officeId, Long accountToDebit, Long accountToCredit,
String description) implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
}
|
apache/flex-utilities | 1,124 | FlexPMD/flex-pmd-java/as3-parser-api/src/main/java/com/adobe/ac/pmd/parser/exceptions/NullTokenException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES 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.adobe.ac.pmd.parser.exceptions;
/**
* @author xagnetti
*/
@SuppressWarnings("serial")
public class NullTokenException extends TokenException
{
/**
* @param fileName
*/
public NullTokenException( final String fileName )
{
super( "null token in "
+ fileName + "." );
}
}
|
apache/flink-connector-kafka | 1,128 | flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/dynamic/source/GetMetadataUpdateEvent.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES 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.connector.kafka.dynamic.source;
import org.apache.flink.annotation.Internal;
import org.apache.flink.api.connector.source.SourceEvent;
/** Event to signal to enumerator that a reader needs to know the current metadata. */
@Internal
public class GetMetadataUpdateEvent implements SourceEvent {}
|
apache/flink | 1,159 | flink-runtime/src/test/java/org/apache/flink/runtime/util/jartestprogram/UtilFunction.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.flink.runtime.util.jartestprogram;
import org.apache.flink.api.common.functions.FilterFunction;
/** Static factory for a lambda filter function. */
public class UtilFunction {
@SuppressWarnings("Convert2MethodRef")
public static FilterFunction<String> getWordFilter() {
return (v) -> WordFilter.filter(v);
}
}
|
apache/geode | 1,135 | geode-web/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/GcCommandOverHttpDistributedTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.apache.geode.management.internal.cli.commands;
import org.apache.geode.test.junit.rules.GfshCommandRule;
public class GcCommandOverHttpDistributedTest extends GcCommandDistributedTestBase {
@Override
public void before() throws Exception {
gfsh.connectAndVerify(locator.getHttpPort(), GfshCommandRule.PortType.http);
}
}
|
apache/geode | 1,161 | geode-core/src/main/java/org/apache/geode/cache/query/internal/aggregate/SumDistinct.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.apache.geode.cache.query.internal.aggregate;
/**
* Computes the sum of distinct values for replicated region based queries.
*/
public class SumDistinct extends DistinctAggregator {
@Override
public Object terminate() {
double sum = 0;
for (Object o : distinct) {
sum += ((Number) o).doubleValue();
}
return downCast(sum);
}
}
|
apache/groovy | 1,197 | src/main/java/groovy/beans/DefaultPropertyWriter.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package groovy.beans;
import org.codehaus.groovy.runtime.InvokerHelper;
public class DefaultPropertyWriter implements PropertyWriter {
public static final PropertyWriter INSTANCE = new DefaultPropertyWriter();
@Override
public void write(Object owner, String propertyName, Object value) {
InvokerHelper.setProperty(owner, propertyName, value);
}
}
|
apache/hadoop-common | 1,082 | hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/job/event/JobSetupCompletedEvent.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.mapreduce.v2.app.job.event;
import org.apache.hadoop.mapreduce.v2.api.records.JobId;
public class JobSetupCompletedEvent extends JobEvent {
public JobSetupCompletedEvent(JobId jobID) {
super(jobID, JobEventType.JOB_SETUP_COMPLETED);
}
}
|
apache/harmony | 1,162 | classlib/modules/swing/src/main/java/common/javax/swing/plaf/metal/MetalMenuBarUI.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @author Alexander T. Simbirtsev
*/
package javax.swing.plaf.metal;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicMenuBarUI;
public class MetalMenuBarUI extends BasicMenuBarUI {
public static ComponentUI createUI(final JComponent c) {
return new MetalMenuBarUI();
}
}
|
apache/harmony | 1,167 | classlib/support/src/test/java/tests/support/Support_ServerSocket.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package tests.support;
import java.io.IOException;
/**
* The interface for a generic server socket.
*
*/
public interface Support_ServerSocket {
public Support_Socket accept() throws IOException;
public void setTimeout(int timeout);
public void setPort(int port);
public void open() throws IOException;
public void close() throws IOException;
}
|
apache/hawq | 1,130 | src/pl/pljava/src/java/pljava/org/postgresql/pljava/internal/ResultSetPicker.java | /*
* Copyright (c) 2004, 2005, 2006 TADA AB - Taby Sweden
* Distributed under the terms shown in the file COPYRIGHT
* found in the root directory of this distribution or at
* http://eng.tada.se/osprojects/COPYRIGHT.html
*/
package org.postgresql.pljava.internal;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.postgresql.pljava.ResultSetHandle;
import org.postgresql.pljava.ResultSetProvider;
import org.postgresql.pljava.jdbc.SingleRowWriter;
public class ResultSetPicker implements ResultSetProvider
{
private final ResultSetHandle m_resultSetHandle;
private final ResultSet m_resultSet;
public ResultSetPicker(ResultSetHandle resultSetHandle)
throws SQLException
{
m_resultSetHandle = resultSetHandle;
m_resultSet = resultSetHandle.getResultSet();
}
public boolean assignRowValues(ResultSet receiver, int currentRow)
throws SQLException
{
if(m_resultSet == null || !m_resultSet.next())
return false;
((SingleRowWriter)receiver).copyRowFrom(m_resultSet);
return true;
}
public void close()
throws SQLException
{
m_resultSet.close();
m_resultSetHandle.close();
}
}
|
apache/hawq | 1,131 | src/pl/pljava/src/java/examples/org/postgresql/example/UsingPropertiesAsResultSet.java | /*
* Copyright (c) 2004, 2005 TADA AB - Taby Sweden
* Distributed under the terms shown in the file COPYRIGHT
* found in the root folder of this project or at
* http://eng.tada.se/osprojects/COPYRIGHT.html
*/
package org.postgresql.example;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.postgresql.pljava.ResultSetHandle;
/**
* This implementation uses another function that returns a set of a complex
* type and returns the ResultSet produced by a query.
*
* @author Thomas Hallgren
*/
public class UsingPropertiesAsResultSet implements ResultSetHandle
{
private PreparedStatement m_statement;
public ResultSet getResultSet() throws SQLException
{
m_statement = DriverManager.getConnection("jdbc:default:connection").prepareStatement("SELECT * FROM propertyExample()");
return m_statement.executeQuery();
}
public void close()
throws SQLException
{
m_statement.close();
m_statement = null;
}
public static ResultSetHandle getProperties()
throws SQLException
{
return new UsingPropertiesAsResultSet();
}
}
|
apache/hbase | 1,176 | hbase-metrics-api/src/main/java/org/apache/hadoop/hbase/metrics/Metric.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hbase.metrics;
import org.apache.hadoop.hbase.HBaseInterfaceAudience;
import org.apache.yetus.audience.InterfaceAudience;
import org.apache.yetus.audience.InterfaceStability;
/**
* Parent interface for all metrics.
*/
@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
@InterfaceStability.Evolving
public interface Metric {
}
|
apache/hive | 1,105 | standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesExtRequestFields.java | /**
* Autogenerated by Thrift Compiler (0.16.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hive.metastore.api;
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.16.0)")
public enum GetTablesExtRequestFields implements org.apache.thrift.TEnum {
ACCESS_TYPE(1),
PROCESSOR_CAPABILITIES(2),
ALL(2147483647);
private final int value;
private GetTablesExtRequestFields(int value) {
this.value = value;
}
/**
* Get the integer value of this enum value, as defined in the Thrift IDL.
*/
public int getValue() {
return value;
}
/**
* Find a the enum type by its integer value, as defined in the Thrift IDL.
* @return null if the value is not found.
*/
@org.apache.thrift.annotation.Nullable
public static GetTablesExtRequestFields findByValue(int value) {
switch (value) {
case 1:
return ACCESS_TYPE;
case 2:
return PROCESSOR_CAPABILITIES;
case 2147483647:
return ALL;
default:
return null;
}
}
}
|
apache/hop | 1,147 | plugins/tech/google/src/main/java/org/apache/hop/pipeline/transforms/googleanalytics/GoogleAnalyticsData.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.hop.pipeline.transforms.googleanalytics;
import org.apache.hop.core.row.IRowMeta;
import org.apache.hop.pipeline.transform.BaseTransformData;
import org.apache.hop.pipeline.transform.ITransformData;
public class GoogleAnalyticsData extends BaseTransformData implements ITransformData {
public IRowMeta outputMeta;
}
|
apache/hop | 1,175 | engine/src/main/java/org/apache/hop/core/auth/IAuthenticationConsumerType.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hop.core.auth;
import org.apache.hop.core.auth.core.IAuthenticationConsumer;
/**
* The IAuthenticationProvider interface specifies the operations needed to interact with an
* authentication method.
*/
public interface IAuthenticationConsumerType {
String getDisplayName();
Class<? extends IAuthenticationConsumer<?, ?>> getConsumerClass();
}
|
apache/iggy | 1,147 | foreign/java/java-sdk/src/main/java/org/apache/iggy/client/blocking/http/error/IggyHttpException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES 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.iggy.client.blocking.http.error;
public class IggyHttpException extends RuntimeException {
private final IggyHttpError error;
public IggyHttpException(IggyHttpError error) {
super(error.reason());
this.error = error;
}
public IggyHttpError getError() {
return error;
}
}
|
apache/ignite-3 | 1,116 | modules/cli/src/integrationTest/java/org/apache/ignite/internal/cli/commands/recovery/partitions/reset/ItResetPartitionsCommandTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.internal.cli.commands.recovery.partitions.reset;
/** Test class for {@link ResetPartitionsCommand}. */
public class ItResetPartitionsCommandTest extends ItResetPartitionsTest {
@Override
protected Class<?> getCommandClass() {
return ResetPartitionsCommand.class;
}
}
|
apache/ignite-3 | 1,118 | modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/network/raft/SnapshotRequestMessage.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES 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.partition.replicator.network.raft;
import java.util.UUID;
import org.apache.ignite.internal.network.NetworkMessage;
/**
* Base interface for snapshot request messages.
*/
public interface SnapshotRequestMessage extends NetworkMessage {
/** Snapshot id. */
UUID id();
}
|
apache/ignite-3 | 1,172 | modules/cli/src/main/java/org/apache/ignite/internal/cli/core/call/Call.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.internal.cli.core.call;
/**
* Call that represents an action that can be performed given an input.
* It can be rest call, dictionary lookup or whatever.
*
* @param <IT> Input for the call.
* @param <OT> Output of the call.
*/
@FunctionalInterface
public interface Call<IT extends CallInput, OT> {
CallOutput<OT> execute(IT input);
}
|
apache/ignite | 1,127 | modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalDeletionArchiveFsyncTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.internal.processors.cache.persistence.db.wal;
import org.apache.ignite.configuration.WALMode;
/**
*
*/
public class WalDeletionArchiveFsyncTest extends WalDeletionArchiveAbstractTest {
/** {@inheritDoc} */
@Override protected WALMode walMode() {
return WALMode.FSYNC;
}
}
|
apache/ignite | 1,138 | modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/CheckpointLockStateChecker.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.internal.processors.cache.persistence;
/**
* Interface for perform checking that checkpoint lock is held by current track
*/
public interface CheckpointLockStateChecker {
/**
* @return true if checkpoint lock is held by current thread
*/
public boolean checkpointLockIsHeldByThread();
}
|
apache/ignite | 1,144 | modules/core/src/main/java/org/apache/ignite/internal/processors/platform/memory/PlatformOutputStream.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES 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.platform.memory;
import org.apache.ignite.internal.binary.streams.BinaryOutputStream;
/**
* Interop output stream.
*/
public interface PlatformOutputStream extends BinaryOutputStream {
/**
* Synchronize output stream with underlying memory
*/
public void synchronize();
}
|
apache/ignite | 1,146 | modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntryPredicateHasValue.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.internal.processors.cache;
/**
*
*/
public class CacheEntryPredicateHasValue extends CacheEntryPredicateAdapter {
/** */
private static final long serialVersionUID = 0L;
/** {@inheritDoc} */
@Override public boolean apply(GridCacheEntryEx e) {
return peekVisibleValue(e) != null;
}
}
|
apache/ignite | 1,148 | modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/ClientConnectorConfigurationEx.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES 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.odbc;
import org.apache.ignite.configuration.ClientConnectorConfiguration;
/**
* Extended client connector configuration. Needed to distinguish between default and non-default configurations.
*/
public class ClientConnectorConfigurationEx extends ClientConnectorConfiguration {
// No-op.
}
|
apache/incubator-atlas | 1,157 | catalog/src/main/java/org/apache/atlas/catalog/exception/CatalogException.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.atlas.catalog.exception;
/**
* Base checked catalog exception.
*/
public class CatalogException extends Exception {
private int status;
public CatalogException(String message, int status) {
super(message);
this.status = status;
}
public int getStatus() {
return status;
}
}
|
apache/incubator-datalab | 1,149 | services/datalab-model/src/main/java/com/epam/datalab/model/systeminfo/DiskInfo.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.epam.datalab.model.systeminfo;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Builder;
import lombok.Getter;
@Builder
@Getter
public class DiskInfo {
@JsonProperty
private String serialNumber;
@JsonProperty
private long usedByteSpace;
@JsonProperty
private long totalByteSpace;
}
|
apache/incubator-datalab | 1,151 | services/datalab-webapp-common/src/main/java/com/epam/datalab/cloud/CloudModule.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.epam.datalab.cloud;
import com.google.inject.AbstractModule;
import com.google.inject.Injector;
import io.dropwizard.setup.Environment;
public abstract class CloudModule extends AbstractModule {
@Override
protected void configure() {
}
public abstract void init(Environment environment, Injector injector);
}
|
apache/incubator-gluten | 1,168 | gluten-ut/common/src/test/java/org/apache/spark/tags/ExtendedSQLTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES 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.spark.tags;
import org.scalatest.TagAnnotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@TagAnnotation
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.TYPE})
public @interface ExtendedSQLTest {}
|
apache/incubator-hugegraph | 1,138 | hugegraph-commons/hugegraph-common/src/main/java/org/apache/hugegraph/license/LicenseManager.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with this
* work for additional information regarding copyright ownership. The ASF
* licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES 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.license;
public interface LicenseManager {
LicenseParams installLicense() throws Exception;
void uninstallLicense() throws Exception;
LicenseParams verifyLicense() throws Exception;
interface VerifyCallback {
void onVerifyLicense(LicenseParams params) throws Exception;
}
}
|
apache/incubator-kie-drools | 1,142 | kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/lang/ast/infixexecutors/InfixExecutor.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES 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.dmn.feel.lang.ast.infixexecutors;
import org.kie.dmn.feel.lang.EvaluationContext;
import org.kie.dmn.feel.lang.ast.InfixOpNode;
public interface InfixExecutor {
Object evaluate(final Object left, final Object right, EvaluationContext ctx);
Object evaluate(InfixOpNode infixNode, EvaluationContext ctx);
}
|
apache/incubator-kie-drools | 1,142 | kie-dmn/kie-dmn-feel/src/test/java/org/kie/dmn/feel/runtime/functions/TodayFunctionTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES 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.dmn.feel.runtime.functions;
import java.time.LocalDate;
import org.junit.jupiter.api.Test;
class TodayFunctionTest {
private static final TodayFunction todayFunction = TodayFunction.INSTANCE;
@Test
void invoke() {
FunctionTestUtil.assertResult(todayFunction.invoke(), LocalDate.now());
}
} |
apache/incubator-kie-drools | 1,148 | drools-drl/drools-drl-ast/src/main/java/org/drools/drl/ast/dsl/UnitDescrBuilder.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES 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.drl.ast.dsl;
import org.drools.drl.ast.descr.UnitDescr;
public interface UnitDescrBuilder
extends
DescrBuilder<PackageDescrBuilder, UnitDescr> {
/**
* Sets the unit target
*
* @param target the unit class
* @return itself
*/
UnitDescrBuilder target( String target );
}
|
apache/incubator-kie-drools | 1,152 | drools-examples/src/main/java/org/drools/games/adventures/model/Room.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES 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.games.adventures.model;
public class Room extends Thing {
public Room(String name) {
super(name, false);
}
public Room(long id, String name) {
super(id, name, false);
}
@Override
public String toString() {
return "Room{id=" + getId() +", name=" + getName() + "} ";
}
}
|
apache/incubator-kie-drools | 1,155 | kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/api/dmndi/Color.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES 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.dmn.model.api.dmndi;
import org.kie.dmn.model.api.DMNModelInstrumentedBase;
public interface Color extends DMNModelInstrumentedBase {
public int getRed();
public void setRed(int value);
public int getGreen();
public void setGreen(int value);
public int getBlue();
public void setBlue(int value);
}
|
apache/incubator-kie-drools | 1,160 | kie-api/src/main/java/org/kie/api/event/process/SLAViolatedEvent.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES 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.api.event.process;
import org.kie.api.runtime.process.NodeInstance;
/**
* An event when a SLA has been violated.
*/
public interface SLAViolatedEvent
extends
ProcessEvent {
/**
* The node instance this event is related to.
*
* @return the node instance
*/
NodeInstance getNodeInstance();
}
|
apache/incubator-kie-kogito-apps | 1,126 | jitexecutor/jitexecutor-runner/src/test/java/org/kie/kogito/jitexecutor/runner/BPMNValidatorResourceIT.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES 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.jitexecutor.runner;
import org.kie.kogito.jitexecutor.bpmn.api.BPMNValidatorResourceTest;
import io.quarkus.test.junit.QuarkusIntegrationTest;
@QuarkusIntegrationTest
public class BPMNValidatorResourceIT extends BPMNValidatorResourceTest {
// Execute the same tests but in native mode.
}
|
apache/incubator-kie-kogito-apps | 1,126 | jobs-service/jobs-service-common/src/main/java/org/kie/kogito/jobs/service/scheduler/JobScheduler.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES 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.scheduler;
import java.time.ZonedDateTime;
import java.util.Optional;
import org.kie.kogito.jobs.service.model.JobDetails;
public interface JobScheduler<T, C> {
T schedule(JobDetails job);
C cancel(String jobId);
Optional<ZonedDateTime> scheduled(String jobId);
}
|
apache/incubator-kie-kogito-examples | 1,106 | serverless-workflow-examples/serverless-workflow-fault-tolerance/src/main/java/org/kie/kogito/examples/EchoResponse.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES 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.examples;
public class EchoResponse {
public String id;
public String echo;
public String createdAt;
public EchoResponse(String id, String echo, String createdAt) {
this.id = id;
this.echo = echo;
this.createdAt = createdAt;
}
}
|
apache/incubator-kie-kogito-runtimes | 1,073 | quarkus/extensions/kogito-quarkus-extension-spi/src/main/java/org/kie/kogito/quarkus/extensions/spi/deployment/KogitoDataIndexServiceAvailableBuildItem.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES 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.quarkus.extensions.spi.deployment;
import io.quarkus.builder.item.SimpleBuildItem;
/**
* Signals that a Data Index Service instance is available.
*/
public final class KogitoDataIndexServiceAvailableBuildItem extends SimpleBuildItem {
}
|
apache/incubator-kie-kogito-runtimes | 1,088 | kogito-codegen-modules/kogito-codegen-processes/src/main/java/org/kie/kogito/codegen/process/persistence/marshaller/MarshallerGenerator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES 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.codegen.process.persistence.marshaller;
import java.io.IOException;
import java.util.List;
import com.github.javaparser.ast.CompilationUnit;
public interface MarshallerGenerator {
List<CompilationUnit> generate(String content) throws IOException;
}
|
apache/incubator-kie-optaplanner | 1,084 | core/optaplanner-core-impl/src/test/java/org/optaplanner/core/config/solver/testutil/corruptedmove/factory/TestdataCorruptedEntityUndoMoveFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES 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.optaplanner.core.config.solver.testutil.corruptedmove.factory;
public class TestdataCorruptedEntityUndoMoveFactory extends AbstractTestdataCorruptedUndoMoveTotalMappingFactory {
public TestdataCorruptedEntityUndoMoveFactory() {
super(true);
}
}
|
apache/incubator-kie-optaplanner | 1,133 | optaplanner-examples/src/main/java/org/optaplanner/examples/tsp/domain/location/DistanceType.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES 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.optaplanner.examples.tsp.domain.location;
public enum DistanceType {
/**
* Requires that all {@link Location} instances are of type {@link AirLocation}.
*/
AIR_DISTANCE,
/**
* Requires that all {@link Location} instances are of type {@link RoadLocation}.
*/
ROAD_DISTANCE;
}
|
apache/incubator-kie-optaplanner | 1,138 | optaplanner-benchmark/src/main/java/org/optaplanner/benchmark/config/ranking/package-info.java |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
@XmlSchema(
namespace = PlannerBenchmarkConfig.XML_NAMESPACE,
elementFormDefault = XmlNsForm.QUALIFIED)
package org.optaplanner.benchmark.config.ranking;
import jakarta.xml.bind.annotation.XmlNsForm;
import jakarta.xml.bind.annotation.XmlSchema;
import org.optaplanner.benchmark.config.PlannerBenchmarkConfig;
|
apache/incubator-myriad | 1,162 | myriad-scheduler/src/test/java/org/apache/myriad/MultiBindingsUsage.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.myriad;
import java.util.Map;
import javax.inject.Inject;
import org.apache.myriad.scheduler.TaskFactory;
/**
* Helper class to test multibindings
*/
public class MultiBindingsUsage {
@Inject
private Map<String, TaskFactory> taskFactoryMap;
public Map<String, TaskFactory> getMap() {
return taskFactoryMap;
}
}
|
apache/incubator-retired-wave | 1,126 | wave/src/test/java/org/waveprotocol/wave/model/adt/ObservableBasicMapWithObservableBasicMapImplTest.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES 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.model.adt;
/**
* Tests for the {@link ObservableBasicMapImpl} class.
*
*/
public class ObservableBasicMapWithObservableBasicMapImplTest extends ObservableBasicMapTestBase {
@Override
protected void createMap() {
map = new ObservableBasicMapImpl<String, Integer>();
}
}
|
apache/incubator-retired-wave | 1,163 | wave/src/main/java/org/waveprotocol/wave/client/editor/impl/HtmlView.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.waveprotocol.wave.client.editor.impl;
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.Node;
import com.google.gwt.dom.client.Text;
import org.waveprotocol.wave.model.document.util.ReadableDocumentView;
/** Convenience type alias */
public interface HtmlView extends ReadableDocumentView<Node, Element, Text> { }
|
apache/inlong | 1,140 | inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/sink/hive/HiveColumnInfo.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES 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.manager.pojo.sink.hive;
import lombok.Data;
/**
* Hive column info
*/
@Data
public class HiveColumnInfo {
private String name;
private String type;
private String desc;
private String format;
private String oldColumnName;
private boolean isPartition;
private String exampleData;
}
|
apache/inlong | 1,149 | inlong-common/src/main/java/org/apache/inlong/common/pojo/sortstandalone/SortClusterConfig.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES 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.common.pojo.sortstandalone;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Deprecated
public class SortClusterConfig {
String clusterName;
List<SortTaskConfig> sortTasks;
}
|
apache/jackrabbit-oak | 1,156 | oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/backup/FileStoreRestore.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES 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.jackrabbit.oak.backup;
import java.io.File;
import java.io.IOException;
import org.apache.jackrabbit.oak.segment.file.InvalidFileStoreVersionException;
public interface FileStoreRestore {
void restore(File source, File destination) throws IOException, InvalidFileStoreVersionException;
void restore(File source);
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.