repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
hibernate/hibernate-orm | 1,084 | hibernate-core/src/test/java/org/hibernate/orm/test/cache/CachedReadOnlyArrayTest.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.cache;
import jakarta.persistence.ElementCollection;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.Immutable;
import org.hibernate.testing.orm.junit.EntityManagerFactoryScope;
import org.hibernate.testing.orm.junit.Jpa;
import org.junit.jupiter.api.Test;
import static org.hibernate.annotations.CacheConcurrencyStrategy.READ_ONLY;
@Jpa(annotatedClasses = CachedReadOnlyArrayTest.Publication.class)
class CachedReadOnlyArrayTest {
@Test
void testReadFromCache(EntityManagerFactoryScope scope) {
scope.inTransaction(em -> {
Publication entity1 = new Publication();
entity1.id = "123l";
em.persist(entity1);
});
scope.inTransaction(em -> em.find(Publication.class, "123l"/*, ReadOnlyMode.READ_ONLY*/));
}
@Immutable
@Entity
@Cache(usage = READ_ONLY)
static class Publication {
@Id
String id;
@ElementCollection
String[] topics;
}
}
|
hibernate/hibernate-orm | 1,094 | hibernate-core/src/main/java/org/hibernate/event/spi/AbstractSessionEvent.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.event.spi;
import org.hibernate.engine.spi.SessionFactoryImplementor;
import java.io.Serializable;
/**
* Base class for events which are generated from a {@linkplain org.hibernate.Session Session}
* ({@linkplain EventSource}).
*
* @author Steve Ebersole
*/
public abstract class AbstractSessionEvent implements Serializable {
protected final EventSource source;
/**
* Constructs an event from the given event session.
*
* @param source The session event source.
*/
public AbstractSessionEvent(EventSource source) {
this.source = source;
}
/**
* Returns the session event source for this event. This is the underlying
* session from which this event was generated.
*
* @return The session event source.
*/
public final EventSource getSession() {
return getEventSource();
}
public final EventSource getEventSource() {
return source.asEventSource();
}
public SessionFactoryImplementor getFactory() {
return source.getFactory();
}
}
|
hibernate/hibernate-orm | 1,157 | hibernate-core/src/main/java/org/hibernate/Internal.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.CONSTRUCTOR;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.PACKAGE;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Marks the annotated Java element as forming part of the <em>internal</em>
* implementation of Hibernate, meaning that clients should expect absolutely
* no guarantees with regard to the binary stability from release to release.
* The user of such an API is embracing the potential for their program to
* break with any point release of Hibernate.
*
* @implNote Defined with {@code RUNTIME} retention so tooling can see it
*
* @author Steve Ebersole
*/
@Target({PACKAGE, TYPE, METHOD, FIELD, CONSTRUCTOR})
@Retention(RUNTIME)
@Documented
public @interface Internal {
}
|
hibernate/hibernate-search | 1,027 | integrationtest/v5migrationhelper/orm/src/test/java/org/hibernate/search/test/configuration/ClassLevelTestPoI.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.test.configuration;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
import org.hibernate.search.spatial.Coordinates;
@Entity
public class ClassLevelTestPoI implements Coordinates {
@Id
@GeneratedValue
private int poiId;
private String name;
private Double latitude;
private Double longitude;
@Override
public Double getLatitude() {
return latitude;
}
@Override
public Double getLongitude() {
return longitude;
}
public int getPoiId() {
return poiId;
}
public void setPoiId(int poiId) {
this.poiId = poiId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public ClassLevelTestPoI(String name, double latitude, double longitude) {
this.name = name;
this.latitude = latitude;
this.longitude = longitude;
}
public ClassLevelTestPoI() {
}
}
|
hibernate/hibernate-search | 1,045 | backend/elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/gson/impl/ObjectPropertyJsonAccessor.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.backend.elasticsearch.gson.impl;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
class ObjectPropertyJsonAccessor extends AbstractCrawlingJsonAccessor<JsonObject> {
private final String propertyName;
public ObjectPropertyJsonAccessor(JsonCompositeAccessor<JsonObject> parentAccessor, String propertyName) {
super( parentAccessor );
this.propertyName = propertyName;
}
@Override
protected JsonElement doGet(JsonObject parent) {
return parent.get( propertyName );
}
@Override
protected void doSet(JsonObject parent, JsonElement newValue) {
parent.add( propertyName, newValue );
}
@Override
protected void appendRuntimeRelativePath(StringBuilder path) {
path.append( "." ).append( propertyName );
}
@Override
protected void appendStaticRelativePath(StringBuilder path, boolean isFirst) {
if ( !isFirst ) {
path.append( "." );
}
path.append( propertyName );
}
}
|
hibernate/hibernate-search | 1,053 | backend/elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/work/spi/ElasticsearchWorkExecutorProvider.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.backend.elasticsearch.work.spi;
import org.hibernate.search.engine.cfg.ConfigurationPropertySource;
import org.hibernate.search.engine.common.execution.spi.SimpleScheduledExecutor;
import org.hibernate.search.engine.environment.thread.spi.ThreadPoolProvider;
import org.hibernate.search.util.common.annotation.Incubating;
@Incubating
public interface ElasticsearchWorkExecutorProvider {
SimpleScheduledExecutor workExecutor(Context context);
interface Context {
/**
* @return A provider of thread pools.
*/
ThreadPoolProvider threadPoolProvider();
/**
* Gives access to various configuration properties that might be useful during executor instantiation.
*/
ConfigurationPropertySource propertySource();
/**
* @return recommended thread name prefix that can be passed to work executor. Recommendation is based on the
* instantiation context.
*/
String recommendedThreadNamePrefix();
}
}
|
hibernate/hibernate-shards | 1,130 | src/test/java/org/hibernate/shards/strategy/ShardStrategyFactoryDefaultMock.java | /**
* Copyright (C) 2007 Google Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
package org.hibernate.shards.strategy;
import org.hibernate.shards.ShardId;
import java.util.List;
/**
* @author maxr@google.com (Max Ross)
*/
public class ShardStrategyFactoryDefaultMock implements ShardStrategyFactory {
public ShardStrategy newShardStrategy(List<ShardId> shardIds) {
throw new UnsupportedOperationException();
}
}
|
openjdk/jdk8 | 1,146 | langtools/test/tools/javac/diags/examples/VarNotIntializedInDefaultConstructor.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.err.var.not.initialized.in.default.constructor
class X {
final int j;
}
|
openjdk/jdk8 | 1,161 | langtools/test/tools/javac/diags/examples/ContinueOutsideLoop.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.cont.outside.loop
class ContinueOutsideLoop {
void m() {
continue;
}
}
|
openjdk/jdk8 | 1,161 | langtools/test/tools/javac/diags/examples/IllegalEnumStaticRef.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.illegal.enum.static.ref
enum IllegalEnumStaticRef {
A() { Object o = B; },
B
}
|
openjdk/jdk8 | 1,161 | langtools/test/tools/javac/diags/examples/WrongNumberTypeArgs.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.wrong.number.type.args
import java.util.*;
class T {
List<Integer,String> list;
}
|
openjdk/jdk8 | 1,162 | jdk/test/com/sun/jdi/redefine/SchemaChange_RedefineSubTarg.java | /*
* Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
class RedefineSubTarg {
int cannot;
String foo(String prev) {
return prev + "Here ";
}
}
|
openjdk/jdk8 | 1,168 | jdk/test/sun/misc/JarIndex/metaInfFilenames/jarB/b/B.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.
*/
package b;
public class B {
public static void hello() {
System.out.println("Hello from b.B");
}
}
|
openjdk/jdk8 | 1,179 | langtools/test/tools/javac/api/6431435/A.java | /*
* Copyright (c) 2006, 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 p.*;
class A { }
class Foo {
class Baz { }
Runnable r = new Runnable() { public void run() { } };
B b;
}
|
openjdk/jtreg | 1,185 | test/bugidtests/InvalidTest.java | /*
* Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 77777777
*/
/*
* @test
* @bug jdk-1234567
*/
/*
* @test
* @bug 15123456
*/
class InvalidTest { }
|
oracle/nosql | 1,141 | kvmain/src/main/java/com/sleepycat/je/rep/subscription/SubscriptionStatus.java | /*-
* Copyright (C) 2002, 2025, Oracle and/or its affiliates. All rights reserved.
*
* This file was distributed by Oracle as part of a version of Oracle NoSQL
* Database made available at:
*
* http://www.oracle.com/technetwork/database/database-technologies/nosqldb/downloads/index.html
*
* Please see the LICENSE file included in the top-level directory of the
* appropriate version of Oracle NoSQL Database for a copy of the license and
* additional information.
*/
package com.sleepycat.je.rep.subscription;
/**
* Subscription status returned to client
*/
public enum SubscriptionStatus {
/* subscription not yet started */
INIT,
/* subscription start successfully and start consume stream */
SUCCESS,
/* requested vlsn is not available */
VLSN_NOT_AVAILABLE,
/* rep group shutdown */
GRP_SHUTDOWN,
/* connection error */
CONNECTION_ERROR,
/* timeout error */
TIMEOUT_ERROR,
/* unknown error */
UNKNOWN_ERROR,
/* security check error: authentication or authorization failure */
SECURITY_CHECK_ERROR,
/* filter change failure */
FILTER_CHANGE_ERROR
}
|
oracle/nosql | 1,149 | kvmain/src/main/java/oracle/kv/impl/param/BooleanParameter.java | /*-
* Copyright (C) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This file was distributed by Oracle as part of a version of Oracle NoSQL
* Database made available at:
*
* http://www.oracle.com/technetwork/database/database-technologies/nosqldb/downloads/index.html
*
* Please see the LICENSE file included in the top-level directory of the
* appropriate version of Oracle NoSQL Database for a copy of the license and
* additional information.
*/
package oracle.kv.impl.param;
public class BooleanParameter extends Parameter {
private static final long serialVersionUID = 1L;
private final boolean value;
public BooleanParameter(String name, Boolean value) {
super(name);
this.value = value;
}
public BooleanParameter(String name, String value) {
this(name, Boolean.valueOf(value));
}
@Override
public boolean asBoolean() {
return value;
}
@Override
public String asString() {
return Boolean.toString(value);
}
@Override
public ParameterState.Type getType() {
return ParameterState.Type.BOOLEAN;
}
}
|
oracle/oci-java-sdk | 1,151 | bmc-common/src/test/java/com/oracle/bmc/OCIDTest.java | /**
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
*/
package com.oracle.bmc;
import static org.junit.Assert.*;
import org.junit.Test;
public class OCIDTest {
@Test
public void validOcid() {
assertTrue(
OCID.isValid(
"ocid1.user.oc1..aaaaaaaaizi8k3lbfv747ul6qwazrutncoe8zciazibypbjtkxaiecoic1dq"));
}
@Test
public void validLegacyOcid() {
assertTrue(
OCID.isValid(
"ocidv1:tenancy:oc1:phx:1829406592360:aaaaaaaab4faaopv32ecohhklpvjq463pu"));
}
@Test
public void invalidOcid() {
assertFalse(OCID.isValid("ocid1.user.oc1."));
assertFalse(OCID.isValid("ocid1.user.oc1.adsfasfsafdf"));
assertFalse(OCID.isValid("ocid1.user.oc1.1354aasdf."));
assertFalse(OCID.isValid("ocid1.user.oc1.1354aasdf.."));
}
}
|
apache/commons-scxml | 1,161 | src/main/java/org/apache/commons/scxml2/io/package-info.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* 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.
*/
/**
* A collection of classes for reading in and writing out SCXML documents, to and from the Commons SCXML Java object model.
* <ul>
* <li>{@code SCXMLReader} is based on StAX based pull parsing and has no external dependencies.</li>
* <li>{@code SCXMLWriter} is based on StAX XML stream writer.</li>
* </ul>
*/
package org.apache.commons.scxml2.io;
|
apache/ctakes | 1,102 | ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/cased/encoder/InMemoryEncoder.java | package org.apache.ctakes.dictionary.cased.encoder;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
/**
* @author SPF , chip-nlp
* @version %I%
* @since 8/18/2020
*/
final public class InMemoryEncoder implements TermEncoder {
private final String _name;
// Map of rare tokens to terms that contain those tokens. Used like "First Word Token Lookup" but faster
private final Map<Long, Collection<TermEncoding>> _encodingMap;
/**
* @param name unique name for dictionary
* @param encodingMap Map with a cui code as key, and TermEncoding Collection as value
*/
public InMemoryEncoder( final String name, final Map<Long, Collection<TermEncoding>> encodingMap ) {
_name = name;
_encodingMap = encodingMap;
}
/**
* {@inheritDoc}
*/
@Override
public String getName() {
return _name;
}
/**
* {@inheritDoc}
*/
@Override
public Collection<TermEncoding> getEncodings( final long cuiCode ) {
return _encodingMap.getOrDefault( cuiCode, Collections.emptyList() );
}
}
|
apache/cxf | 1,111 | systests/microprofile/client/jaxrs/src/test/java/org/apache/cxf/systest/microprofile/rest/client/RestClient.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.microprofile.rest.client;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import org.eclipse.microprofile.rest.client.annotation.RegisterClientHeaders;
@Path("/remote")
@RegisterClientHeaders
public interface RestClient {
@GET
String getAllHeadersToBeSent();
}
|
apache/deltaspike | 1,088 | deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc004/Pages.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.jsf.impl.config.view.navigation.destination.uc004;
import org.apache.deltaspike.core.api.config.view.DefaultErrorView;
interface Pages
{
class Index extends DefaultErrorView
{
}
class Overview extends DefaultErrorView
{
}
}
|
apache/deltaspike | 1,107 | deltaspike/modules/data/impl/src/test/java/org/apache/deltaspike/data/test/java8/util/EntityManagerProducer.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.deltaspike.data.test.java8.util;
import jakarta.enterprise.inject.Produces;
import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext;
public class EntityManagerProducer {
@PersistenceContext
@Produces
private EntityManager entityManager;
}
|
apache/directory-kerby | 1,123 | kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/type/base/MethodData.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
package org.apache.kerby.kerberos.kerb.type.base;
import org.apache.kerby.kerberos.kerb.type.KrbSequenceOfType;
import org.apache.kerby.kerberos.kerb.type.pa.PaDataEntry;
/**
METHOD-DATA ::= SEQUENCE OF PA-DATA
*/
public class MethodData extends KrbSequenceOfType<PaDataEntry> {
}
|
apache/distributedlog | 1,117 | distributedlog-common/src/main/java/org/apache/distributedlog/common/functions/VoidFunctions.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.distributedlog.common.functions;
import java.util.List;
import java.util.function.Function;
/**
* Functions for transforming structures related to {@link Void}.
*/
public class VoidFunctions {
public static final Function<List<Void>, Void> LIST_TO_VOID_FUNC =
list -> null;
}
|
apache/dolphinscheduler | 1,075 | dolphinscheduler-extract/dolphinscheduler-extract-base/src/main/java/org/apache/dolphinscheduler/extract/base/future/InvokeCallback.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.extract.base.future;
/**
* invoke callback
*/
public interface InvokeCallback {
/**
* operation
*
* @param responseFuture responseFuture
*/
void operationComplete(final ResponseFuture responseFuture);
}
|
apache/drill | 1,127 | exec/java-exec/src/test/java/org/apache/drill/exec/store/parquet/WrapAroundCounter.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.parquet;
public class WrapAroundCounter {
int maxVal;
int val;
public WrapAroundCounter(int maxVal) {
this.maxVal = maxVal;
}
public int increment() {
val++;
if (val > maxVal) {
val = 0;
}
return val;
}
public void reset() {
val = 0;
}
}
|
apache/dubbo | 1,105 | dubbo-plugin/dubbo-triple-websocket/src/main/java/org/apache/dubbo/rpc/protocol/tri/websocket/WebSocketConstants.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.rpc.protocol.tri.websocket;
public interface WebSocketConstants {
String TRIPLE_WEBSOCKET_UPGRADE_HEADER_VALUE = "websocket";
String TRIPLE_WEBSOCKET_REMOTE_ADDRESS = "tri.websocket.remote.address";
String TRIPLE_WEBSOCKET_LISTENER = "tri.websocket.listener";
}
|
apache/dubbo | 1,142 | dubbo-compatible/src/test/java/org/apache/dubbo/common/extension/MockDispatcher.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.remoting.ChannelHandler;
import org.apache.dubbo.remoting.Dispatcher;
public class MockDispatcher implements Dispatcher {
@Override
public ChannelHandler dispatch(ChannelHandler handler, URL url) {
return null;
}
}
|
apache/dubbo | 1,142 | dubbo-plugin/dubbo-qos-api/src/main/java/org/apache/dubbo/qos/api/BaseCommand.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.qos.api;
import org.apache.dubbo.common.extension.ExtensionScope;
import org.apache.dubbo.common.extension.SPI;
@SPI(scope = ExtensionScope.FRAMEWORK)
public interface BaseCommand {
default boolean logResult() {
return true;
}
String execute(CommandContext commandContext, String[] args);
}
|
apache/eventmesh | 1,099 | eventmesh-connectors/eventmesh-connector-jdbc/src/main/java/org/apache/eventmesh/connector/jdbc/event/EventHandler.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eventmesh.connector.jdbc.event;
/**
* Represents a handler for snapshot events.
*/
@FunctionalInterface
public interface EventHandler {
/**
* Handles a snapshot event.
*
* @param event The SnapshotEvent to handle.
*/
void handle(Event event);
}
|
apache/felix-dev | 1,069 | ipojo/runtime/composite-it/ipojo-composite-service-providing-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/ServiceProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.felix.ipojo.runtime.core.components;
import org.apache.felix.ipojo.runtime.core.services.Service;
public class ServiceProvider implements Service {
private int i = 0;
public int count() {
i++;
return i;
}
}
|
apache/felix-dev | 1,118 | tools/maven-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/baseline/InfoComparator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.bundleplugin.baseline;
import java.util.Comparator;
import aQute.bnd.differ.Baseline.Info;
final class InfoComparator
implements Comparator<Info>
{
public int compare( Info info1, Info info2 )
{
return info1.packageName.compareTo( info2.packageName );
}
}
|
apache/fesod | 1,143 | fesod/src/test/java/org/apache/fesod/excel/encrypt/EncryptData.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fesod.excel.encrypt;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.apache.fesod.excel.annotation.ExcelProperty;
/**
*
*/
@Getter
@Setter
@EqualsAndHashCode
@ToString
public class EncryptData {
@ExcelProperty("姓名")
private String name;
}
|
apache/fineract | 1,081 | fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanUndoContractTerminationBusinessEvent.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.test.messaging.event.loan.transaction;
public class LoanUndoContractTerminationBusinessEvent extends AbstractLoanTransactionEvent {
@Override
public String getEventName() {
return "LoanUndoContractTerminationBusinessEvent";
}
}
|
apache/fineract | 1,108 | fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/RecalculationCompoundingFrequencyType.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.test.data;
public enum RecalculationCompoundingFrequencyType {
SAME_AS_REPAYMENT(1), //
DAILY(2), //
WEEKLY(3), //
MONTHLY(4); //
public final Integer value;
RecalculationCompoundingFrequencyType(Integer value) {
this.value = value;
}
}
|
apache/fineract | 1,126 | fineract-provider/src/main/java/org/apache/fineract/commands/data/ProcessingResultLookup.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.commands.data;
import java.io.Serial;
import java.io.Serializable;
/**
* Immutable data object for application user data.
*/
public record ProcessingResultLookup(Long id, String processingResult) implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
}
|
apache/flink | 1,113 | flink-table/flink-sql-gateway/src/main/java/org/apache/flink/table/gateway/service/utils/SqlCancelException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.flink.table.gateway.service.utils;
/** Thrown to trigger a canceling of the executing operation. */
public class SqlCancelException extends RuntimeException {
private static final long serialVersionUID = 1L;
public SqlCancelException(String msg) {
super(msg);
}
}
|
apache/fory | 1,143 | java/fory-core/src/test/java/org/apache/fory/collection/Tuple3Test.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fory.collection;
import static org.testng.Assert.*;
import org.testng.annotations.Test;
public class Tuple3Test {
@Test
public void testEquals() {
assertEquals(Tuple3.of(1, "a", 1.1), Tuple3.of(1, "a", 1.1));
assertEquals(Tuple3.of(1, "a", 1.1).hashCode(), Tuple3.of(1, "a", 1.1).hashCode());
}
}
|
apache/geaflow | 1,087 | geaflow/geaflow-core/geaflow-engine/geaflow-cluster/src/main/java/org/apache/geaflow/cluster/failover/FailoverStrategyType.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.geaflow.cluster.failover;
public enum FailoverStrategyType {
/**
* Restart all components.
*/
cluster_fo,
/**
* Component only restarts itself.
*/
component_fo,
/**
* Disable failover.
*/
disable_fo
}
|
apache/geaflow | 1,115 | geaflow-console/app/biz/shared/src/main/java/org/apache/geaflow/console/biz/shared/view/VertexView.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.geaflow.console.biz.shared.view;
import lombok.Getter;
import lombok.Setter;
import org.apache.geaflow.console.common.util.type.GeaflowStructType;
@Setter
@Getter
public class VertexView extends StructView {
public VertexView() {
type = GeaflowStructType.VERTEX;
}
}
|
apache/geode | 1,122 | geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/FilterConfiguration.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.apache.geode.internal.serialization.filter;
/**
* Defines operation to configure a serialization filter.
*/
@FunctionalInterface
public interface FilterConfiguration {
/**
* Returns true if serialization filter was successfully configured.
*/
boolean configure() throws UnableToSetSerialFilterException;
}
|
apache/geode | 1,127 | geode-tcp-server/src/main/java/org/apache/geode/distributed/internal/tcpserver/ShutdownRequest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.apache.geode.distributed.internal.tcpserver;
import org.apache.geode.internal.serialization.BasicSerializable;
/**
* A request to the TCP server to shutdown
*
* @see TcpClient#requestToServer(HostAndPort, Object, int, boolean)
* @see ShutdownResponse
*/
public class ShutdownRequest implements BasicSerializable {
}
|
apache/geode | 1,144 | geode-concurrency-test/src/main/java/org/apache/geode/test/concurrency/Runner.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.test.concurrency;
import java.lang.reflect.Method;
import java.util.List;
/**
* Code that actually runs a single concurrent test method.
*/
public interface Runner {
/*
* Run a test method in a concurrency testing framework and return a list of errors encountered.
*/
List<Throwable> runTestMethod(Method child);
}
|
apache/gobblin | 1,125 | gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagTaskStream.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.gobblin.service.modules.orchestration;
import java.util.Iterator;
import org.apache.gobblin.service.modules.orchestration.task.DagTask;
/**
* An interface to provide abstraction for getting next available {@link DagTask} to process.
*/
public interface DagTaskStream extends Iterator<DagTask> {
}
|
apache/hadoop-common | 1,117 | hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/DecayRpcSchedulerMXBean.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.ipc;
/**
* Provides metrics for Decay scheduler.
*/
public interface DecayRpcSchedulerMXBean {
// Get an overview of the requests in history.
String getSchedulingDecisionSummary();
String getCallVolumeSummary();
int getUniqueIdentityCount();
long getTotalCallVolume();
} |
apache/hadoop-mapreduce | 1,155 | src/examples/org/apache/hadoop/examples/pi/Combinable.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.examples.pi;
/**
* A class is Combinable if its object can be combined with other objects.
* @param <T> The generic type
*/
public interface Combinable<T> extends Comparable<T> {
/**
* Combine this with that.
* @param that Another object.
* @return The combined object.
*/
public T combine(T that);
} |
apache/hadoop | 1,101 | hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/FooterBlock.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.yarn.webapp.view;
import org.apache.hadoop.classification.InterfaceAudience;
@InterfaceAudience.LimitedPrivate({"YARN", "MapReduce"})
public class FooterBlock extends HtmlBlock {
@Override protected void render(Block html) {
html.
div("#footer.ui-widget").__();
}
}
|
apache/hadoop | 1,131 | hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/IpcException.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.ipc;
import java.io.IOException;
/**
* IPC exception is thrown by IPC layer when the IPC
* connection cannot be established.
*/
public class IpcException extends IOException {
private static final long serialVersionUID = 1L;
public IpcException(final String err) {
super(err);
}
}
|
apache/harmony | 1,125 | classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/gif/GIFImageReader.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.harmony.x.imageio.plugins.gif;
import javax.imageio.spi.ImageReaderSpi;
import org.apache.harmony.x.imageio.plugins.AwtImageReader;
public class GIFImageReader extends AwtImageReader {
public GIFImageReader(final ImageReaderSpi imageReaderSpi) {
super(imageReaderSpi);
}
}
|
apache/harmony | 1,138 | classlib/modules/security/src/main/java/common/java/security/interfaces/ECKey.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package java.security.interfaces;
import java.security.spec.ECParameterSpec;
/**
* The base interface for Elliptic Curve (EC) public or private keys.
*/
public interface ECKey {
/**
* Returns the EC key parameters.
*
* @return the EC key parameters.
*/
public ECParameterSpec getParams();
} |
apache/helix | 1,158 | helix-core/src/main/java/org/apache/helix/task/TaskFactory.java | package org.apache.helix.task;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/**
* A factory for {@link Task} objects.
*/
public interface TaskFactory {
/**
* Returns a {@link Task} instance.
* @param context Contextual information for the task, including task and job configurations
* @return A {@link Task} instance.
*/
Task createNewTask(TaskCallbackContext context);
}
|
apache/hive | 1,081 | standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SchemaCompatibility.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 SchemaCompatibility implements org.apache.thrift.TEnum {
NONE(1),
BACKWARD(2),
FORWARD(3),
BOTH(4);
private final int value;
private SchemaCompatibility(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 SchemaCompatibility findByValue(int value) {
switch (value) {
case 1:
return NONE;
case 2:
return BACKWARD;
case 3:
return FORWARD;
case 4:
return BOTH;
default:
return null;
}
}
}
|
apache/hive | 1,166 | ql/src/java/org/apache/hadoop/hive/ql/plan/BaseCopyWork.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hive.ql.plan;
import org.apache.hadoop.hive.ql.metadata.HiveException;
import org.apache.hadoop.hive.ql.plan.DeferredWorkContext;
/*
* Interface for CopyWork, ReplCopyWork and MoveWork
*/
public interface BaseCopyWork {
public void initializeFromDeferredContext(DeferredWorkContext deferredWorkContext) throws HiveException;
}
|
apache/ignite-extensions | 1,135 | modules/ml-ext/ml/src/test/java/org/apache/ignite/ml/svm/SVMTestSuite.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.ml.svm;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
/**
* Test suite for all tests located in org.apache.ignite.ml.svm.* package.
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({
SVMModelTest.class,
SVMBinaryTrainerTest.class,
})
public class SVMTestSuite {
// No-op.
}
|
apache/ignite | 1,119 | modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/TimeoutService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.internal.processors.query.calcite.exec;
import org.apache.ignite.internal.processors.query.calcite.util.Service;
/**
* Service to run tasks with the given timeout.
*/
public interface TimeoutService extends Service {
/** */
public void schedule(Runnable task, long timeout);
}
|
apache/incubator-datalab | 1,121 | services/common/src/main/java/com/epam/datalab/exceptions/ResourceQuoteReachedException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES 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.exceptions;
public class ResourceQuoteReachedException extends DatalabException {
public ResourceQuoteReachedException(String message) {
super(message);
}
public ResourceQuoteReachedException(String message, Exception cause) {
super(message, cause);
}
}
|
apache/incubator-hugegraph | 1,112 | hugegraph-commons/hugegraph-rpc/src/main/java/org/apache/hugegraph/rpc/RpcServiceConfig4Server.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with this
* work for additional information regarding copyright ownership. The ASF
* licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS 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.rpc;
public interface RpcServiceConfig4Server {
<T, S extends T> String addService(Class<T> clazz, S serviceImpl);
<T, S extends T> String addService(String graph, Class<T> clazz, S serviceImpl);
void removeService(String serviceId);
void removeAllService();
}
|
apache/incubator-hugegraph | 1,117 | hugegraph-pd/hg-pd-test/src/main/java/org/apache/hugegraph/pd/grpc/BaseGrpcTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hugegraph.pd.grpc;
import org.apache.hugegraph.pd.common.Useless;
import org.junit.After;
import org.junit.BeforeClass;
@Useless("empty now")
public class BaseGrpcTest {
@BeforeClass
public static void init() {
}
@After
public void teardown() {
// pass
}
}
|
apache/incubator-kie-drools | 1,128 | kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/api/DecisionService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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;
import java.util.List;
public interface DecisionService extends Invocable {
List<DMNElementReference> getOutputDecision();
List<DMNElementReference> getEncapsulatedDecision();
List<DMNElementReference> getInputDecision();
List<DMNElementReference> getInputData();
}
|
apache/incubator-kie-kogito-runtimes | 1,081 | kogito-codegen-modules/kogito-codegen-processes/src/main/resources/class-templates/usertask/UserTaskJavaTemplate.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.usertask.impl;
import java.util.Set;
import org.kie.kogito.Application;
import org.kie.kogito.usertask.impl.DefaultUserTask;
public class UserTaskTemplate extends DefaultUserTask {
public UserTaskTemplate(Application application) {
}
}
|
apache/incubator-kie-kogito-runtimes | 1,132 | jbpm/jbpm-flow/src/main/java/org/jbpm/util/JbpmClassLoaderUtil.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jbpm.util;
public class JbpmClassLoaderUtil {
public static ClassLoader findClassLoader() {
ClassLoader loader = Thread.currentThread().getContextClassLoader();
if (loader == null) {
loader = JbpmClassLoaderUtil.class.getClassLoader();
}
return loader;
}
}
|
apache/incubator-weex | 1,141 | android/sdk/src/main/java/org/apache/weex/performance/IWXAnalyzer.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.weex.performance;
/**
* @author zhongcang
* @date 2018/2/28
*/
public interface IWXAnalyzer {
/**
*
* @param group dataGroup
* @param module dataModule in group
* @param type dataType
* @param data data (json)
*/
void transfer(String group, String module, String type, String data);
} |
apache/iotdb-extras | 1,111 | iotdb-collector/collector-core/src/main/java/org/apache/iotdb/collector/plugin/api/event/CollectorEvent.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.iotdb.collector.plugin.api.event;
import org.apache.iotdb.pipe.api.event.Event;
import org.apache.iotdb.pipe.api.event.dml.insertion.TabletInsertionEvent;
public abstract class CollectorEvent implements Event {
public abstract TabletInsertionEvent toTabletInsertionEvent();
}
|
apache/iotdb | 1,126 | iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/event/SerializableEvent.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.iotdb.commons.pipe.event;
import org.apache.iotdb.pipe.api.event.Event;
import java.io.IOException;
import java.nio.ByteBuffer;
public interface SerializableEvent extends Event {
ByteBuffer serializeToByteBuffer();
void deserializeFromByteBuffer(ByteBuffer buffer) throws IOException;
}
|
apache/jackrabbit-oak | 1,132 | oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/StaticOperandImpl.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.query.ast;
import org.apache.jackrabbit.oak.api.PropertyValue;
/**
* The base class for static operands (literal, bind variables).
*/
public abstract class StaticOperandImpl extends AstElement {
public abstract PropertyValue currentValue();
abstract int getPropertyType();
}
|
apache/jena | 1,119 | jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/main/prefixes/TestPrefixesServiceRDF.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jena.fuseki.main.prefixes;
import org.apache.jena.fuseki.servlets.prefixes.PrefixesRDF;
/** Test the {@link PrefixesRDF} implementation. */
public class TestPrefixesServiceRDF extends AbstractTestPrefixesImpl {
public TestPrefixesServiceRDF() {
super(new PrefixesRDF());
}
}
|
apache/jena | 1,138 | jena-tdb1/src/test/java/org/apache/jena/tdb1/store/nodetable/TestNodeTableStored.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jena.tdb1.store.nodetable;
import org.apache.jena.tdb1.base.file.Location;
import org.apache.jena.tdb1.setup.Build;
public class TestNodeTableStored extends AbstractTestNodeTable
{
@Override
protected NodeTable createEmptyNodeTable()
{
return Build.makeNodeTable(Location.mem()) ;
}
}
|
apache/jena | 1,151 | jena-arq/src/test/java/org/apache/jena/riot/process/TestNormalization.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jena.riot.process;
import org.apache.jena.graph.Node;
import org.apache.jena.riot.process.normalize.NormalizeRDFTerms;
public class TestNormalization extends AbstractTestNormalization {
@Override
protected Node normalize(Node n1) {
Node n2 = NormalizeRDFTerms.normalizeValue(n1);
return n2;
}
}
|
apache/jena | 1,153 | jena-arq/src/main/java/org/apache/jena/riot/system/stream/Locator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jena.riot.system.stream;
import org.apache.jena.atlas.web.TypedInputStream ;
/**
* Interface to things that open TypedStreams from a place
*/
public interface Locator
{
// Open a stream given a name of some kind (not necessarily an IRI).
public TypedInputStream open(String uri) ;
public String getName() ;
}
|
apache/jena | 1,153 | jena-arq/src/main/java/org/apache/jena/sparql/function/library/e.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jena.sparql.function.library;
import org.apache.jena.sparql.expr.NodeValue;
import org.apache.jena.sparql.function.FunctionBase0;
/** Value of e */
public class e extends FunctionBase0
{
static NodeValue value_e = NodeValue.makeDouble(Math.E);
@Override
public NodeValue exec() { return value_e; }
}
|
apache/jena | 1,153 | jena-arq/src/main/java/org/apache/jena/sparql/function/library/pi.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jena.sparql.function.library;
import org.apache.jena.sparql.expr.NodeValue;
import org.apache.jena.sparql.function.FunctionBase0;
/** Value of pi */
public class pi extends FunctionBase0
{
static NodeValue value_pi = NodeValue.makeDouble(Math.PI);
@Override
public NodeValue exec() { return value_pi; }
}
|
apache/kafka | 1,095 | streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBTimeOrderedSessionSchemaWithoutIndexSegmentedBytesStoreTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.kafka.streams.state.internals;
public class RocksDBTimeOrderedSessionSchemaWithoutIndexSegmentedBytesStoreTest extends AbstractDualSchemaRocksDBSegmentedBytesStoreTest {
@Override
SchemaType schemaType() {
return SchemaType.SessionSchemaWithoutIndex;
}
}
|
apache/kafka | 1,135 | server-common/src/main/java/org/apache/kafka/server/share/persister/PartitionErrorData.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.kafka.server.share.persister;
/**
* This interface is implemented by classes used to contain the data for a partition with error data
* in the interface to {@link Persister}.
*/
public interface PartitionErrorData extends PartitionInfoData, PartitionIdData {
short errorCode();
String errorMessage();
}
|
apache/kylin | 1,130 | src/core-job/src/main/java/org/apache/kylin/job/exception/ZkReleaseLockInterruptException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.kylin.job.exception;
public class ZkReleaseLockInterruptException extends RuntimeException {
public ZkReleaseLockInterruptException(String message) {
super(message);
}
public ZkReleaseLockInterruptException(String message, Throwable cause) {
super(message, cause);
}
}
|
apache/kylin | 1,133 | src/core-metadata/src/main/java/org/apache/kylin/measure/bitmap/BitmapCounterFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.kylin.measure.bitmap;
import java.io.IOException;
import java.nio.ByteBuffer;
public interface BitmapCounterFactory {
BitmapCounter newBitmap();
BitmapCounter newBitmap(long... values);
BitmapCounter newBitmap(long counter);
BitmapCounter newBitmap(ByteBuffer in) throws IOException;
}
|
apache/lens | 1,127 | lens-server-api/src/main/java/org/apache/lens/server/api/query/comparators/FIFOQueryComparator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.lens.server.api.query.comparators;
import org.apache.lens.server.api.query.QueryContext;
public class FIFOQueryComparator implements QueryComparator {
@Override
public int compare(QueryContext o1, QueryContext o2) {
return Long.compare(o1.getSubmissionTime(), o2.getSubmissionTime());
}
}
|
apache/linkis | 1,064 | linkis-computation-governance/linkis-computation-governance-common/src/main/java/org/apache/linkis/governance/common/enums/OnceJobOperationBoundary.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.linkis.governance.common.enums;
public enum OnceJobOperationBoundary {
ECM("ecm"),
EC("ec");
private String name;
OnceJobOperationBoundary(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
|
apache/linkis | 1,086 | linkis-public-enhancements/linkis-cs-server/src/main/java/org/apache/linkis/cs/persistence/persistence/impl/ContextMetricsPersistenceImpl.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.linkis.cs.persistence.persistence.impl;
import org.apache.linkis.cs.persistence.persistence.ContextMetricsPersistence;
import org.springframework.stereotype.Component;
@Component
public class ContextMetricsPersistenceImpl implements ContextMetricsPersistence {}
|
apache/linkis | 1,102 | linkis-public-enhancements/linkis-cs-server/src/main/java/org/apache/linkis/cs/highavailable/ha/BackupInstanceGenerator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.linkis.cs.highavailable.ha;
import org.apache.linkis.cs.common.exception.CSErrorException;
public interface BackupInstanceGenerator {
String getBackupInstance(String haID) throws CSErrorException;
String chooseBackupInstance(String mainInstance) throws CSErrorException;
}
|
apache/linkis | 1,104 | linkis-public-enhancements/linkis-pes-common/src/main/java/org/apache/linkis/cs/common/entity/source/HAContextID.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.linkis.cs.common.entity.source;
public interface HAContextID extends ContextID {
String getInstance();
void setInstance(String instance);
// todo remain to return list
String getBackupInstance();
void setBackupInstance(String backupInstance);
HAContextID copy();
}
|
apache/logging-flume | 1,114 | flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/InitialContextFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.flume.source.jms;
import java.util.Properties;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class InitialContextFactory {
public InitialContext create(Properties properties) throws NamingException {
return new InitialContext(properties);
}
}
|
apache/lucene | 1,133 | lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/MultiValueSource.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.lucene.queries.function.valuesource;
import org.apache.lucene.queries.function.ValueSource;
/**
* A {@link ValueSource} that abstractly represents {@link ValueSource}s for poly fields, and other
* things.
*/
public abstract class MultiValueSource extends ValueSource {
public abstract int dimension();
}
|
apache/manifoldcf | 1,087 | connectors/confluence-v6/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/v6/model/ConfluenceResource.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.manifoldcf.crawler.connectors.confluence.v6.model;
/**
* <p>ConfluenceResource class</p>
* <p>Used as base class for other classes like Page and Attachments</p>
*
* @author Antonio David Perez Morales <adperezmorales@gmail.com>
*
*/
public class ConfluenceResource {
}
|
apache/manifoldcf | 1,097 | connectors/regexpmapper/connector/src/main/java/org/apache/manifoldcf/authorities/mappers/regexp/RegexpParameters.java | /* $Id$ */
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.manifoldcf.authorities.mappers.regexp;
/** This class describes regexp mapper parameters.
*/
public class RegexpParameters
{
public static final String _rcsid = "@(#)$Id$";
/** User name mapping description. */
public final static String userNameMapping = "User name map";
}
|
apache/metamodel | 1,142 | core/src/main/java/org/apache/metamodel/schema/builder/ColumnBuilder.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.metamodel.schema.builder;
import org.apache.metamodel.schema.Column;
import org.apache.metamodel.schema.MutableColumn;
/**
* Component that builds {@link Column}s.
*/
public interface ColumnBuilder {
/**
* Builds the {@link Column}.
*
* @return
*/
public MutableColumn build();
}
|
apache/mina | 1,149 | core/src/main/java/org/apache/mina/transport/nio/SelectorLoopPool.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.mina.transport.nio;
/**
* A pool of {@link SelectorLoop}
*
* @author <a href="http://mina.apache.org">Apache MINA Project</a>
*
*/
public interface SelectorLoopPool {
/**
* Get a {@link SelectorLoop} from the pool
* @return a SelectorLoop from the pool
*/
SelectorLoop getSelectorLoop();
} |
apache/nifi | 1,086 | nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/queue/clustered/FlowFileContentAccess.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.nifi.controller.queue.clustered;
import java.io.IOException;
import java.io.InputStream;
import org.apache.nifi.controller.repository.FlowFileRecord;
public interface FlowFileContentAccess {
InputStream read(FlowFileRecord flowFile) throws IOException;
}
|
apache/nifi | 1,095 | nifi-extension-bundles/nifi-websocket-bundle/nifi-websocket-services-api/src/main/java/org/apache/nifi/websocket/WebSocketSession.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.nifi.websocket;
import java.io.IOException;
/**
* This is the concrete WebSocket session interface, which provides session information and operations.
*/
public interface WebSocketSession extends MessageSender {
void close(final String reason) throws IOException;
}
|
apache/nifi | 1,098 | nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/groups/UnboundedFlowFileGate.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.nifi.groups;
import org.apache.nifi.connectable.Port;
public class UnboundedFlowFileGate implements FlowFileGate {
@Override
public boolean tryClaim(final Port port) {
return true;
}
@Override
public void releaseClaim(final Port port) {
}
}
|
apache/nifi | 1,126 | nifi-commons/nifi-record/src/main/java/org/apache/nifi/serialization/SchemaValidationException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.nifi.serialization;
public class SchemaValidationException extends RuntimeException {
public SchemaValidationException(final String message) {
super(message);
}
public SchemaValidationException(final String message, final Throwable cause) {
super(message, cause);
}
}
|
apache/openjpa | 1,107 | openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/common/apps/SubclassTestInstance.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.openjpa.persistence.enhance.common.apps;
/**
* The various subclass test classes that we use all implement this interface,
* to allow reuse in some of the unit tests.
*/
public interface SubclassTestInstance {
void setStringField(String s);
String getStringField();
}
|
apache/openjpa | 1,134 | openjpa-lib/src/main/java/org/apache/openjpa/lib/util/collections/IterableSortedMap.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.openjpa.lib.util.collections;
import java.util.SortedMap;
/**
* {@link SortedMap} + {@link OrderedMap}.
*
* @param <K> the type of the keys in the map
* @param <V> the type of the values in the map
*
* @since 4.0
*/
public interface IterableSortedMap<K, V> extends SortedMap<K, V>, OrderedMap<K, V> {
}
|
apache/openmeetings | 1,127 | openmeetings-service/src/main/java/org/apache/jackrabbit/webdav/observation/EventBundle.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.webdav.observation;
import org.apache.jackrabbit.webdav.xml.XmlSerializable;
/**
* <code>EventBundle</code> defines an empty interface used to represent a bundle
* of events.
*
* @see EventDiscovery#addEventBundle(EventBundle)
*/
public interface EventBundle extends XmlSerializable {
} |
apache/openwebbeans | 1,098 | webbeans-impl/src/test/java/org/apache/webbeans/test/component/exception/AroundInvokeWithoutReturnTypeComponent.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.webbeans.test.component.exception;
import jakarta.interceptor.AroundInvoke;
import jakarta.interceptor.InvocationContext;
public class AroundInvokeWithoutReturnTypeComponent
{
@AroundInvoke
public void method2(InvocationContext ctx) throws Exception
{
}
}
|
apache/openwebbeans | 1,111 | webbeans-impl/src/test/java/org/apache/webbeans/test/interceptors/ejb/ManagedBeanWithEjbInterceptor.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.webbeans.test.interceptors.ejb;
import jakarta.enterprise.context.RequestScoped;
import jakarta.interceptor.Interceptors;
@Interceptors(value={EjbInterceptor.class})
@RequestScoped
public class ManagedBeanWithEjbInterceptor
{
public void sayHello()
{
}
}
|
apache/openwebbeans | 1,128 | webbeans-impl/src/test/java/org/apache/webbeans/test/util/ExtendedSpecificClass.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.webbeans.test.util;
public class ExtendedSpecificClass extends SpecificClass {
private ExtendedCustomType customType;
public void init()
{
customType = new ExtendedCustomType();
}
@Override
public ExtendedCustomType newInstance()
{
return customType;
}
}
|
apache/ozone | 1,132 | hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestOFSWithFSPaths.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.fs.ozone;
import org.apache.hadoop.ozone.om.helpers.BucketLayout;
import org.junit.jupiter.api.TestInstance;
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
class TestOFSWithFSPaths extends AbstractRootedOzoneFileSystemTest {
TestOFSWithFSPaths() {
super(BucketLayout.LEGACY, true, false);
}
}
|
apache/pekko-http | 1,133 | http-core/src/main/java/org/apache/pekko/http/javadsl/model/headers/TlsSessionInfo.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* license agreements; and to You under the Apache License, version 2.0:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* This file is part of the Apache Pekko project, which was derived from Akka.
*/
/*
* Copyright (C) 2009-2022 Lightbend Inc. <https://www.lightbend.com>
*/
package org.apache.pekko.http.javadsl.model.headers;
import javax.net.ssl.SSLSession;
/**
* Model for the synthetic `Tls-Session-Info` header which carries the SSLSession of the connection
* the message carrying this header was received with.
*
* <p>This header will only be added if it enabled in the configuration by setting <code>
* pekko.http.[client|server].parsing.tls-session-info-header = on</code>.
*/
public abstract class TlsSessionInfo extends CustomHeader {
/** @return the SSLSession this message was received over. */
public abstract SSLSession getSession();
public static TlsSessionInfo create(SSLSession session) {
return org.apache.pekko.http.scaladsl.model.headers.Tls$minusSession$minusInfo$.MODULE$.apply(
session);
}
}
|
apache/poi | 1,173 | poi/src/main/java/org/apache/poi/sl/usermodel/Notes.java | /* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
package org.apache.poi.sl.usermodel;
import java.util.List;
public interface Notes<
S extends Shape<S,P>,
P extends TextParagraph<S,P,? extends TextRun>
> extends Sheet<S,P> {
List<? extends List<P>> getTextParagraphs();
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.