repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
hibernate/hibernate-ogm | 1,106 | mongodb/src/test/java/org/hibernate/ogm/datastore/mongodb/test/loading/Project.java | /*
* Hibernate OGM, Domain model persistence for NoSQL datastores
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.ogm.datastore.mongodb.test.loading;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.OrderColumn;
/**
* @author Guillaume Scheibel <guillaume.scheibel@gmail.com>
*/
@Entity
public class Project {
@Id
private String id;
private String name;
@OneToMany(cascade = { CascadeType.PERSIST })
@OrderColumn(name = "ordering")
private List<Module> modules;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public List<Module> getModules() {
return modules;
}
public void setModules(List<Module> modules) {
this.modules = modules;
}
}
|
hibernate/hibernate-ogm | 1,137 | core/src/test/java/org/hibernate/ogm/test/type/OverridingTypeDialect.java | /*
* Hibernate OGM, Domain model persistence for NoSQL datastores
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.ogm.test.type;
import java.util.UUID;
import org.hibernate.ogm.datastore.map.impl.MapDatastoreProvider;
import org.hibernate.ogm.datastore.map.impl.MapDialect;
import org.hibernate.ogm.type.spi.GridType;
import org.hibernate.type.StandardBasicTypes;
import org.hibernate.type.Type;
/**
* @author Emmanuel Bernard <emmanuel@hibernate.org>
*/
public class OverridingTypeDialect extends MapDialect {
public OverridingTypeDialect(MapDatastoreProvider provider) {
super( provider );
}
@Override
public GridType overrideType(Type type) {
//all UUID properties are mapped with exploding type
if ( UUID.class.equals( type.getReturnedClass() ) ) {
return ExplodingType.INSTANCE;
}
//timestamp and time mapping are ignored, only raw dates are handled
if ( type == StandardBasicTypes.DATE ) {
return CustomDateType.INSTANCE;
}
return null;
}
}
|
hibernate/hibernate-orm | 1,066 | hibernate-core/src/test/java/org/hibernate/orm/test/legacy/Result.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.legacy;
public class Result {
private String name;
private long amount;
private long count;
/**
* Returns the amount.
* @return long
*/
public long getAmount() {
return amount;
}
/**
* Returns the count.
* @return int
*/
public long getCount() {
return count;
}
/**
* Returns the name.
* @return String
*/
public String getName() {
return name;
}
/**
* Sets the amount.
* @param amount The amount to set
*/
public void setAmount(long amount) {
this.amount = amount;
}
/**
* Sets the count.
* @param count The count to set
*/
public void setCount(long count) {
this.count = count;
}
/**
* Sets the name.
* @param name The name to set
*/
public void setName(String name) {
this.name = name;
}
public Result(String n, long a, int c) {
name = n;
amount = a;
count = c;
}
public Result(String n, long a, long c) {
name = n;
amount = a;
count = c;
}
}
|
hibernate/hibernate-orm | 1,090 | hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/identity/CacheIdentityColumnSupport.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.community.dialect.identity;
import org.hibernate.MappingException;
import org.hibernate.dialect.identity.IdentityColumnSupportImpl;
/**
* @author Andrea Boriero
*/
public class CacheIdentityColumnSupport extends IdentityColumnSupportImpl {
public static final CacheIdentityColumnSupport INSTANCE = new CacheIdentityColumnSupport();
@Override
public boolean supportsIdentityColumns() {
return true;
}
@Override
public boolean hasDataTypeInIdentityColumn() {
// Whether this dialect has an Identity clause added to the data type or a completely seperate identity
// data type
return true;
}
@Override
public String getIdentityColumnString(int type) throws MappingException {
// The keyword used to specify an identity column, if identity column key generation is supported.
return "identity";
}
@Override
public String getIdentitySelectString(String table, String column, int type) {
return "SELECT LAST_IDENTITY() FROM %TSQL_sys.snf";
}
}
|
hibernate/hibernate-orm | 1,100 | hibernate-core/src/test/java/org/hibernate/orm/test/annotations/immutable/Country.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.annotations.immutable;
import java.io.Serializable;
import java.util.List;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
import jakarta.persistence.OneToMany;
import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.Immutable;
@Entity
@Immutable
@SuppressWarnings("serial")
public class Country implements Serializable {
private Integer id;
private String name;
private List<State> states;
@Id
@GeneratedValue
public Integer getId() {
return id;
}
public String getName() {
return name;
}
public void setId(Integer integer) {
id = integer;
}
public void setName(String string) {
name = string;
}
@OneToMany(fetch = FetchType.LAZY)
@Cascade(org.hibernate.annotations.CascadeType.ALL)
@Immutable
public List<State> getStates() {
return states;
}
public void setStates(List<State> states) {
this.states = states;
}
}
|
hibernate/hibernate-orm | 1,121 | hibernate-core/src/main/java/org/hibernate/query/sqm/internal/MultiTableInsertQueryPlan.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.query.sqm.internal;
import org.hibernate.query.spi.DomainQueryExecutionContext;
import org.hibernate.query.sqm.mutation.spi.MultiTableHandlerBuildResult;
import org.hibernate.query.sqm.mutation.spi.SqmMultiTableInsertStrategy;
import org.hibernate.query.sqm.tree.insert.SqmInsertStatement;
/**
* @author Christian Beikov
*/
public class MultiTableInsertQueryPlan extends AbstractMultiTableMutationQueryPlan<SqmInsertStatement<?>, SqmMultiTableInsertStrategy> {
public MultiTableInsertQueryPlan(
SqmInsertStatement<?> sqmInsert,
DomainParameterXref domainParameterXref,
SqmMultiTableInsertStrategy mutationStrategy) {
super( sqmInsert, domainParameterXref, mutationStrategy );
}
@Override
protected MultiTableHandlerBuildResult buildHandler(
SqmInsertStatement<?> statement,
DomainParameterXref domainParameterXref,
SqmMultiTableInsertStrategy strategy,
DomainQueryExecutionContext context) {
return strategy.buildHandler( statement, domainParameterXref, context );
}
}
|
hibernate/hibernate-orm | 1,125 | hibernate-core/src/test/java/org/hibernate/orm/test/bulkid/LocalTemporaryTableMutationStrategyCompositeIdTest.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.bulkid;
import org.hibernate.query.sqm.mutation.internal.temptable.LocalTemporaryTableInsertStrategy;
import org.hibernate.query.sqm.mutation.internal.temptable.LocalTemporaryTableMutationStrategy;
import org.hibernate.query.sqm.mutation.spi.SqmMultiTableInsertStrategy;
import org.hibernate.query.sqm.mutation.spi.SqmMultiTableMutationStrategy;
import org.hibernate.testing.orm.junit.DialectFeatureChecks;
import org.hibernate.testing.orm.junit.RequiresDialectFeature;
@RequiresDialectFeature(feature = DialectFeatureChecks.SupportsLocalTemporaryTable.class)
public class LocalTemporaryTableMutationStrategyCompositeIdTest extends AbstractMutationStrategyCompositeIdTest {
@Override
protected Class<? extends SqmMultiTableMutationStrategy> getMultiTableMutationStrategyClass() {
return LocalTemporaryTableMutationStrategy.class;
}
@Override
protected Class<? extends SqmMultiTableInsertStrategy> getMultiTableInsertStrategyClass() {
return LocalTemporaryTableInsertStrategy.class;
}
}
|
hibernate/hibernate-orm | 1,136 | hibernate-core/src/test/java/org/hibernate/orm/test/function/xml/XmlForestTest.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.function.xml;
import org.hibernate.cfg.QuerySettings;
import org.hibernate.testing.orm.junit.DialectFeatureChecks;
import org.hibernate.testing.orm.junit.DomainModel;
import org.hibernate.testing.orm.junit.RequiresDialectFeature;
import org.hibernate.testing.orm.junit.ServiceRegistry;
import org.hibernate.testing.orm.junit.SessionFactory;
import org.hibernate.testing.orm.junit.SessionFactoryScope;
import org.hibernate.testing.orm.junit.Setting;
import org.junit.jupiter.api.Test;
/**
* @author Christian Beikov
*/
@DomainModel
@SessionFactory
@ServiceRegistry(settings = @Setting(name = QuerySettings.XML_FUNCTIONS_ENABLED, value = "true"))
@RequiresDialectFeature( feature = DialectFeatureChecks.SupportsXmlforest.class)
public class XmlForestTest {
@Test
public void testSimple(SessionFactoryScope scope) {
scope.inSession( em -> {
//tag::hql-xmlforest-example[]
em.createQuery( "select xmlforest(123 as e1, 'text' as e2)" ).getResultList();
//end::hql-xmlforest-example[]
} );
}
}
|
hibernate/hibernate-orm | 1,153 | hibernate-core/src/main/java/org/hibernate/query/criteria/JpaJoin.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.query.criteria;
import jakarta.persistence.criteria.Expression;
import jakarta.persistence.criteria.Fetch;
import jakarta.persistence.criteria.Join;
import jakarta.persistence.criteria.Predicate;
import org.hibernate.metamodel.model.domain.EntityDomainType;
import org.hibernate.metamodel.model.domain.PersistentAttribute;
/**
* Consolidates the {@link Join} and {@link Fetch} hierarchies since that is how we implement them.
* This allows us to treat them polymorphically.
*
* @author Steve Ebersole
*/
public interface JpaJoin<L, R> extends JpaFrom<L,R>, Join<L,R> {
@Override
PersistentAttribute<? super L, ?> getAttribute();
JpaJoin<L, R> on(JpaExpression<Boolean> restriction);
@Override
JpaJoin<L, R> on(Expression<Boolean> restriction);
JpaJoin<L, R> on(JpaPredicate... restrictions);
@Override
JpaJoin<L, R> on(Predicate... restrictions);
@Override
<S extends R> JpaTreatedJoin<L,R,S> treatAs(Class<S> treatAsType);
@Override
<S extends R> JpaTreatedJoin<L,R,S> treatAs(EntityDomainType<S> treatAsType);
}
|
openjdk/jdk8 | 1,163 | jdk/test/java/io/Serializable/InvalidClassException/noargctor/NonSerialize/PublicCtor.java | /*
* Copyright (c) 1998, 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.
*/
/*
* @bug 4093279
*/
package NonSerializable;
public class PublicCtor {
public PublicCtor() {
}
};
|
openjdk/jdk8 | 1,175 | langtools/test/tools/javac/diags/examples/TypeVarMayNotBeFollowedByOtherBounds.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.type.var.may.not.be.followed.by.other.bounds
import java.util.*;
class X<T, U, V extends T & U> { }
|
openjdk/jdk8 | 1,191 | hotspot/test/serviceability/attach/AttachWithStalePidFileTarget.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.
*/
public class AttachWithStalePidFileTarget {
public static void main(String... args) throws Exception {
Thread.sleep(2*60*1000);
}
}
|
openjdk/jdk8 | 1,193 | langtools/test/tools/javadoc/generics/genericMethod/pkg1/A.java | /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg1;
public class A {
public <T> A() {}
public <T> void m1(T t) {}
public <T extends Number, U> void m2(T t, U u) {}
}
|
oracle/fastr | 1,159 | com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_bcVersion.java | /*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 51
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Copyright (c) 2014, Purdue University
* Copyright (c) 2014, 2021, Oracle and/or its affiliates
*
* All rights reserved.
*/
package com.oracle.truffle.r.test.builtins;
import org.junit.Test;
import com.oracle.truffle.r.test.TestBase;
// Checkstyle: stop line length check
public class TestBuiltin_bcVersion extends TestBase {
@Test
public void testbcVersion1() {
assertEval(".Internal(bcVersion())");
}
}
|
oracle/json-in-db | 1,151 | YCSB/ycsb-soda/core/src/main/java/site/ycsb/generator/ConstantIntegerGenerator.java | /**
* Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors. All rights reserved.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You
* may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
* implied. See the License for the specific language governing
* permissions and limitations under the License. See accompanying
* LICENSE file.
*/
package site.ycsb.generator;
/**
* A trivial integer generator that always returns the same value.
*
*/
public class ConstantIntegerGenerator extends NumberGenerator {
private final int i;
/**
* @param i The integer that this generator will always return.
*/
public ConstantIntegerGenerator(int i) {
this.i = i;
}
@Override
public Integer nextValue() {
return i;
}
@Override
public double mean() {
return i;
}
}
|
apache/directory-kerby | 1,154 | kerby-common/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1GeneralString.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.asn1.type;
import org.apache.kerby.asn1.UniversalTag;
public class Asn1GeneralString extends Asn1String {
public Asn1GeneralString() {
super(UniversalTag.GENERAL_STRING);
}
public Asn1GeneralString(String value) {
super(UniversalTag.GENERAL_STRING, value);
}
}
|
apache/directory-kerby | 1,170 | kerby-common/kerby-util/src/main/java/org/apache/kerby/util/Utf8.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.util;
import java.nio.charset.StandardCharsets;
public final class Utf8 {
private Utf8() { }
public static String toString(byte[] bytes) {
return new String(bytes, StandardCharsets.UTF_8);
}
public static byte[] toBytes(String s) {
return s.getBytes(StandardCharsets.UTF_8);
}
}
|
apache/drill | 1,152 | metastore/mongo-metastore/src/main/java/org/apache/drill/metastore/mongo/operate/MongoMetadata.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.metastore.mongo.operate;
import org.apache.drill.metastore.operate.Metadata;
/**
* Implementation of {@link Metadata} interface.
* Indicates that Mongo Metastore does not support versioning.
*/
public class MongoMetadata implements Metadata {
@Override
public boolean supportsVersioning() {
return false;
}
}
|
apache/drill | 1,152 | metastore/rdbms-metastore/src/main/java/org/apache/drill/metastore/rdbms/operate/RdbmsMetadata.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.metastore.rdbms.operate;
import org.apache.drill.metastore.operate.Metadata;
/**
* Implementation of {@link Metadata} interface.
* Indicates that RDBMS Metastore does not support versioning.
*/
public class RdbmsMetadata implements Metadata {
@Override
public boolean supportsVersioning() {
return false;
}
}
|
apache/druid | 1,165 | processing/src/main/java/org/apache/druid/segment/serde/cell/ByteBufferProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.druid.segment.serde.cell;
import org.apache.druid.collections.ResourceHolder;
import java.nio.ByteBuffer;
import java.util.function.Supplier;
public interface ByteBufferProvider extends Supplier<ResourceHolder<ByteBuffer>>
{
/**
* @return a resource holder of a ByteBuffer
*/
@Override
ResourceHolder<ByteBuffer> get();
}
|
apache/druid | 1,172 | processing/src/main/java/org/apache/druid/common/guava/DSuppliers.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.druid.common.guava;
import com.google.common.base.Supplier;
import java.util.concurrent.atomic.AtomicReference;
/**
*/
public class DSuppliers
{
public static <T> Supplier<T> of(final AtomicReference<T> ref)
{
return new Supplier<>()
{
@Override
public T get()
{
return ref.get();
}
};
}
}
|
apache/dubbo-samples | 1,112 | 10-task/dubbo-samples-rpc-basic/dubbo-samples-rpc-basic-provider/src/main/java/org/apache/dubbo/samples/provider/DemoServiceImpl.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.samples.provider;
import org.apache.dubbo.config.annotation.DubboService;
import org.apache.dubbo.samples.DemoService;
@DubboService
public class DemoServiceImpl implements DemoService {
@Override
public String sayHello(String name) {
return "hello, "+ name;
}
}
|
apache/dubbo | 1,165 | dubbo-common/src/test/java/org/apache/dubbo/common/extension/director/FooAppProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.director;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.Adaptive;
import org.apache.dubbo.common.extension.ExtensionScope;
import org.apache.dubbo.common.extension.SPI;
@SPI(scope = ExtensionScope.APPLICATION)
public interface FooAppProvider {
@Adaptive
void process(URL url);
}
|
apache/dubbo | 1,172 | dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/GracefulShutdown.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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;
import org.apache.dubbo.rpc.model.FrameworkModel;
import java.util.List;
public interface GracefulShutdown {
void readonly();
void writeable();
static List<GracefulShutdown> getGracefulShutdowns(FrameworkModel frameworkModel) {
return frameworkModel.getBeanFactory().getBeansOfType(GracefulShutdown.class);
}
}
|
apache/eagle | 1,159 | eagle-core/eagle-common/src/main/java/org/apache/eagle/common/module/ConfigServiceProvider.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eagle.common.module;
import com.google.inject.Provider;
import com.google.inject.Singleton;
import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory;
@Singleton
public class ConfigServiceProvider implements Provider<Config> {
@Override
public Config get() {
return ConfigFactory.load();
}
} |
apache/eventmesh | 1,128 | eventmesh-connectors/eventmesh-connector-s3/src/main/java/org/apache/eventmesh/connector/s3/config/S3ServerConfig.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.s3.config;
import org.apache.eventmesh.common.config.connector.Config;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = true)
public class S3ServerConfig extends Config {
private boolean sourceEnable;
private boolean sinkEnable;
}
|
apache/eventmesh | 1,137 | eventmesh-common/src/main/java/org/apache/eventmesh/common/config/connector/mq/rabbitmq/RabbitMQSinkConfig.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eventmesh.common.config.connector.mq.rabbitmq;
import org.apache.eventmesh.common.config.connector.SinkConfig;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = true)
public class RabbitMQSinkConfig extends SinkConfig {
public SinkConnectorConfig connectorConfig;
}
|
apache/eventmesh | 1,137 | eventmesh-common/src/main/java/org/apache/eventmesh/common/config/connector/mq/rocketmq/RocketMQSinkConfig.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eventmesh.common.config.connector.mq.rocketmq;
import org.apache.eventmesh.common.config.connector.SinkConfig;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = true)
public class RocketMQSinkConfig extends SinkConfig {
public SinkConnectorConfig connectorConfig;
}
|
apache/eventmesh | 1,140 | eventmesh-common/src/main/java/org/apache/eventmesh/common/config/connector/knative/KnativeSourceConfig.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eventmesh.common.config.connector.knative;
import org.apache.eventmesh.common.config.connector.SourceConfig;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = true)
public class KnativeSourceConfig extends SourceConfig {
public SourceConnectorConfig connectorConfig;
}
|
apache/eventmesh | 1,140 | eventmesh-common/src/main/java/org/apache/eventmesh/common/config/connector/mq/pulsar/PulsarSourceConfig.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eventmesh.common.config.connector.mq.pulsar;
import org.apache.eventmesh.common.config.connector.SourceConfig;
import lombok.Data;
import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public class PulsarSourceConfig extends SourceConfig {
public SourceConnectorConfig connectorConfig;
}
|
apache/eventmesh | 1,140 | eventmesh-common/src/main/java/org/apache/eventmesh/common/config/connector/pravega/PravegaSourceConfig.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eventmesh.common.config.connector.pravega;
import org.apache.eventmesh.common.config.connector.SourceConfig;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = true)
public class PravegaSourceConfig extends SourceConfig {
public SourceConnectorConfig connectorConfig;
}
|
apache/felix-dev | 1,162 | healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/scheduling/AsyncJob.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The SF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.hc.core.impl.scheduling;
/** Abstract class for async scheduling variants cron/interval. */
public abstract class AsyncJob {
protected final Runnable runnable;
public AsyncJob(Runnable runnable) {
this.runnable = runnable;
}
public abstract boolean schedule();
public abstract boolean unschedule();
} |
apache/felix-dev | 1,174 | gogo/runtime/src/main/java/org/apache/felix/service/command/Descriptor.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.service.command;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.PARAMETER})
public @interface Descriptor
{
String value();
} |
apache/fineract | 1,151 | fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/ClientIdentifierRepository.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.portfolio.client.domain;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
public interface ClientIdentifierRepository extends JpaRepository<ClientIdentifier, Long>, JpaSpecificationExecutor<ClientIdentifier> {
// no behaviour
}
|
apache/fineract | 1,152 | fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/command/CacheSwitchCommand.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.infrastructure.cache.command;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.fineract.command.core.Command;
import org.apache.fineract.infrastructure.cache.data.CacheSwitchRequest;
@Data
@EqualsAndHashCode(callSuper = true)
public class CacheSwitchCommand extends Command<CacheSwitchRequest> {}
|
apache/flink | 1,146 | flink-formats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/table/TestProtobufTestStore.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.formats.protobuf.table;
import java.util.ArrayList;
import java.util.List;
/** The test data store for protobuf SQL integration test only. */
public class TestProtobufTestStore {
public static List<byte[]> sourcePbInputs = new ArrayList<>();
public static List<byte[]> sinkResults = new ArrayList<>();
}
|
apache/freemarker | 1,170 | freemarker-core/src/main/java/freemarker/core/_DelayedShortClassName.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package freemarker.core;
import freemarker.template.utility.ClassUtil;
public class _DelayedShortClassName extends _DelayedConversionToString {
public _DelayedShortClassName(Class pClass) {
super(pClass);
}
@Override
protected String doConversion(Object obj) {
return ClassUtil.getShortClassName((Class) obj, true);
}
}
|
apache/geaflow | 1,134 | geaflow-console/app/core/model/src/main/java/org/apache/geaflow/console/core/model/security/resource/TaskResource.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.core.model.security.resource;
import org.apache.geaflow.console.common.util.type.GeaflowResourceType;
public class TaskResource extends AtomResource {
public TaskResource(JobResource jobResource, String taskId) {
super(taskId, GeaflowResourceType.TASK, jobResource);
}
}
|
apache/gobblin | 1,146 | gobblin-core/src/main/java/org/apache/gobblin/source/extractor/exception/RestApiConnectionException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.source.extractor.exception;
public class RestApiConnectionException extends Exception {
private static final long serialVersionUID = 1L;
public RestApiConnectionException(String message) {
super(message);
}
public RestApiConnectionException(String message, Exception e) {
super(message, e);
}
}
|
apache/gobblin | 1,146 | gobblin-core/src/main/java/org/apache/gobblin/source/extractor/exception/RestApiProcessingException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.source.extractor.exception;
public class RestApiProcessingException extends Exception {
private static final long serialVersionUID = 1L;
public RestApiProcessingException(String message) {
super(message);
}
public RestApiProcessingException(String message, Exception e) {
super(message, e);
}
}
|
apache/hadoop-common | 1,069 | hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/attempt/RMAppAttemptState.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt;
public enum RMAppAttemptState {
NEW, SUBMITTED, SCHEDULED, ALLOCATED, LAUNCHED, FAILED, RUNNING, FINISHING,
FINISHED, KILLED, ALLOCATED_SAVING, LAUNCHED_UNMANAGED_SAVING, FINAL_SAVING
}
|
apache/hadoop-common | 1,078 | hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/GetJobReportResponse.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.mapreduce.v2.api.protocolrecords;
import org.apache.hadoop.mapreduce.v2.api.records.JobReport;
public interface GetJobReportResponse {
public abstract JobReport getJobReport();
public abstract void setJobReport(JobReport jobReport);
}
|
apache/hadoop-common | 1,084 | hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/job/event/JobCommitCompletedEvent.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.mapreduce.v2.app.job.event;
import org.apache.hadoop.mapreduce.v2.api.records.JobId;
public class JobCommitCompletedEvent extends JobEvent {
public JobCommitCompletedEvent(JobId jobID) {
super(jobID, JobEventType.JOB_COMMIT_COMPLETED);
}
}
|
apache/hadoop-common | 1,146 | hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/CommandUtils.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.shell;
final class CommandUtils {
static String formatDescription(String usage, String... desciptions) {
StringBuilder b = new StringBuilder(usage + ": " + desciptions[0]);
for(int i = 1; i < desciptions.length; i++) {
b.append("\n\t\t" + desciptions[i]);
}
return b.toString();
}
}
|
apache/harmony | 1,149 | classlib/modules/auth/src/main/java/common/javax/security/auth/login/CredentialExpiredException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package javax.security.auth.login;
public class CredentialExpiredException extends CredentialException {
private static final long serialVersionUID = -5344739593859737937L;
public CredentialExpiredException() {
super();
}
public CredentialExpiredException(String message) {
super(message);
}
}
|
apache/harmony | 1,172 | classlib/modules/awt/src/main/java/common/java/awt/HeadlessException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @author Alexey A. Petrenko
*/
package java.awt;
/**
* HeadlessException
*
*/
public class HeadlessException extends UnsupportedOperationException {
private static final long serialVersionUID = 167183644944358563L;
public HeadlessException() {
super();
}
public HeadlessException(String msg) {
super(msg);
}
}
|
apache/helix | 1,175 | helix-core/src/main/java/org/apache/helix/cloud/event/AbstractEventHandler.java | package org.apache.helix.cloud.event;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/**
* This class is the the interface for singleton eventHandler.
* User may implement their own eventHandler or use the default CloudEventHandler
*/
public interface AbstractEventHandler {
void registerCloudEventListener(CloudEventListener listener);
void unregisterCloudEventListener(CloudEventListener listener);
}
|
apache/hive | 1,182 | ql/src/java/org/apache/hadoop/hive/ql/stats/ClientStatsPublisher.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.stats;
import org.apache.hadoop.hive.common.classification.InterfaceAudience;
import org.apache.hadoop.hive.common.classification.InterfaceStability;
import java.util.Map;
@InterfaceAudience.Public
@InterfaceStability.Stable
public interface ClientStatsPublisher {
public void run(Map<String, Double> counterValues, String jobID);
}
|
apache/hop | 1,165 | plugins/transforms/mongodb/src/main/java/org/apache/hop/mongo/MongoDbException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hop.mongo;
public class MongoDbException extends Exception {
public MongoDbException() {
super();
}
public MongoDbException(String message, Throwable cause) {
super(message, cause);
}
public MongoDbException(String message) {
super(message);
}
public MongoDbException(Throwable cause) {
super(cause);
}
}
|
apache/iggy | 1,154 | foreign/java/java-sdk/src/test/java/org/apache/iggy/client/blocking/tcp/MessagesTcpClientTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.iggy.client.blocking.tcp;
import org.apache.iggy.client.blocking.IggyBaseClient;
import org.apache.iggy.client.blocking.MessagesClientBaseTest;
class MessagesTcpClientTest extends MessagesClientBaseTest {
@Override
protected IggyBaseClient getClient() {
return TcpClientFactory.create(iggyServer);
}
}
|
apache/ignite-3 | 1,117 | modules/cli/src/integrationTest/java/org/apache/ignite/internal/cli/commands/recovery/partitions/states/ItPartitionStatesCommandTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.internal.cli.commands.recovery.partitions.states;
/** Test class for {@link PartitionStatesCommand}. */
public class ItPartitionStatesCommandTest extends ItPartitionStatesTest {
@Override
protected Class<?> getCommandClass() {
return PartitionStatesCommand.class;
}
}
|
apache/ignite-3 | 1,144 | modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/configuration/ReplacementMode.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.pagememory.configuration;
/** Page replacement mode for persistent regions. */
public enum ReplacementMode {
/** Random-LRU page replacement algorithm. */
RANDOM_LRU,
/** Segmented-LRU page replacement algorithm. */
SEGMENTED_LRU,
/** CLOCK page replacement algorithm. */
CLOCK
}
|
apache/ignite-3 | 1,156 | modules/core/src/main/java/org/apache/ignite/internal/version/IgniteProductVersionSource.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.version;
import org.apache.ignite.internal.properties.IgniteProductVersion;
/**
* Allows to obtain product name and version.
*/
public interface IgniteProductVersionSource {
/** Returns product name. */
String productName();
/** Returns product version. */
IgniteProductVersion productVersion();
}
|
apache/ignite-3 | 1,160 | modules/schema/src/main/java/org/apache/ignite/internal/schema/InvalidTypeException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.schema;
/**
* An exception thrown when an attempt to read an invalid type from a row is performed.
*/
public class InvalidTypeException extends SchemaMismatchException {
/**
* Constructor.
*
* @param msg Error message.
*/
public InvalidTypeException(String msg) {
super(msg);
}
}
|
apache/ignite-3 | 1,161 | modules/cli/src/main/java/org/apache/ignite/internal/cli/core/repl/PeriodicSessionTask.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.internal.cli.core.repl;
/** Task which will be executed periodically while {@link Session} is connected. */
public interface PeriodicSessionTask {
/** This method is called periodically. */
void update(SessionInfo sessionInfo);
/** This method is called when the session is disconnected. */
void onDisconnect();
}
|
apache/ignite-3 | 1,164 | modules/raft/src/main/java/org/apache/ignite/raft/jraft/storage/SnapshotThrottle.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.raft.jraft.storage;
/**
* Snapshot throttling during heavy disk reading/writing
*/
public interface SnapshotThrottle {
/**
* Get available throughput in bytes after throttled Must be thread-safe
*
* @param bytes expect size
* @return available size
*/
long throttledByThroughput(final long bytes);
}
|
apache/incubator-crail | 1,162 | storage-narpc/src/main/java/org/apache/crail/storage/tcp/TcpStorageTier.java | /*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.crail.storage.tcp;
import org.apache.crail.storage.StorageServer;
import org.apache.crail.storage.StorageTier;
public class TcpStorageTier extends TcpStorageClient implements StorageTier {
public StorageServer launchServer () throws Exception {
TcpStorageServer datanodeServer = new TcpStorageServer();
return datanodeServer;
}
}
|
apache/incubator-hugegraph-toolchain | 1,135 | hugegraph-hubble/hubble-be/src/main/java/org/apache/hugegraph/exception/InternalException.java | /*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with this
* work for additional information regarding copyright ownership. The ASF
* licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS 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.exception;
public class InternalException extends ParameterizedException {
public InternalException(String message, Object... args) {
super(message, args);
}
public InternalException(String message, Throwable cause, Object... args) {
super(message, cause, args);
}
}
|
apache/incubator-hugegraph | 1,149 | hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/EphemeralJob.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.job;
import org.apache.hugegraph.task.TaskCallable.SysTaskCallable;
public abstract class EphemeralJob<V> extends SysTaskCallable<V> {
public abstract String type();
public abstract V execute() throws Exception;
@Override
public V call() throws Exception {
return this.execute();
}
}
|
apache/incubator-kie-drools | 1,116 | efesto/efesto-core/efesto-common-api/src/test/java/org/kie/efesto/common/api/identifiers/componentroots/ComponentRootA.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.efesto.common.api.identifiers.componentroots;
import org.kie.efesto.common.api.identifiers.ComponentRoot;
public class ComponentRootA implements ComponentRoot {
public LocalComponentIdA get(String fileName, String name) {
return new LocalComponentIdA(fileName, name);
}
}
|
apache/incubator-kie-drools | 1,123 | kie-drl/kie-drl-compilation-common/src/main/java/org/kie/drl/engine/compilation/model/DrlFileSetResource.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.drl.engine.compilation.model;
import java.io.File;
import java.util.Set;
/**
* File set for "drl" files
*/
public class DrlFileSetResource extends AbstractDrlFileSetResource {
public DrlFileSetResource(Set<File> modelFiles, String basePath) {
super(modelFiles, basePath);
}
}
|
apache/incubator-kie-drools | 1,150 | drools-drl/drools-drl-ast/src/main/java/org/drools/drl/ast/descr/ActionDescr.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.drools.drl.ast.descr;
public class ActionDescr extends BaseDescr {
private String text;
public ActionDescr() { }
public ActionDescr(String text) {
this.text = text;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
}
|
apache/incubator-kie-kogito-examples | 1,062 | serverless-workflow-examples/serverless-workflow-custom-function-knative/custom-function-knative-service/src/main/java/org/kie/kogito/examples/PlainJsonFunction.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.kie.kogito.examples;
import io.quarkus.funqy.Funq;
public class PlainJsonFunction {
@Funq
public Output plainJsonFunction(Input input) {
return new Output("Greetings from Serverless Workflow, " + input.getName());
}
}
|
apache/incubator-kie-kogito-examples | 1,112 | kogito-springboot-examples/ruleunit-event-driven-springboot/src/main/java/org/kie/kogito/queries/AllAmounts.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.queries;
public class AllAmounts {
private int amounts;
public AllAmounts(int amounts) {
this.amounts = amounts;
}
public int getAmounts() {
return amounts;
}
public void setAmounts(int amounts) {
this.amounts = amounts;
}
}
|
apache/incubator-retired-edgent | 1,169 | api/src/main/java/org/apache/edgent/function/Predicate.java | /*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
package org.apache.edgent.function;
import java.io.Serializable;
/**
* Predicate function.
*
* @param <T> Type of value to be tested.
*/
public interface Predicate<T> extends Serializable {
/**
* Test a value against a predicate.
* @param value Value to be tested.
* @return True if this predicate is true for {@code value} otherwise false.
*/
boolean test(T value);
}
|
apache/incubator-retired-htrace | 1,138 | htrace-zipkin/src/main/java/com/twitter/zipkin/gen/AnnotationType.java | /**
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package com.twitter.zipkin.gen;
import java.util.Map;
import java.util.HashMap;
import org.apache.thrift.TEnum;
public enum AnnotationType implements org.apache.thrift.TEnum {
BOOL(0),
BYTES(1),
I16(2),
I32(3),
I64(4),
DOUBLE(5),
STRING(6);
private final int value;
private AnnotationType(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.
*/
public static AnnotationType findByValue(int value) {
switch (value) {
case 0:
return BOOL;
case 1:
return BYTES;
case 2:
return I16;
case 3:
return I32;
case 4:
return I64;
case 5:
return DOUBLE;
case 6:
return STRING;
default:
return null;
}
}
}
|
apache/incubator-seata | 1,170 | compatible/src/main/java/io/seata/tm/api/GlobalTransactionRole.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.seata.tm.api;
/**
* Role of current thread involve in a global transaction.
*/
@Deprecated
public enum GlobalTransactionRole {
/**
* The Launcher.
*/
// The one begins the current global transaction.
Launcher,
/**
* The Participant.
*/
// The one just joins into a existing global transaction.
Participant
}
|
apache/inlong | 1,146 | inlong-sort/sort-formats/format-common/src/main/java/org/apache/inlong/sort/formats/base/FormatMsg.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.inlong.sort.formats.base;
import lombok.Data;
import org.apache.flink.table.data.RowData;
@Data
public class FormatMsg {
private RowData rowData;
private long rowDataLength;
public FormatMsg(RowData rowData, long rowDataLength) {
this.rowData = rowData;
this.rowDataLength = rowDataLength;
}
}
|
apache/iotdb | 1,123 | iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/payload/thrift/request/IoTDBSinkRequestVersion.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.sink.payload.thrift.request;
public enum IoTDBSinkRequestVersion {
VERSION_1((byte) 1),
VERSION_2((byte) 2),
;
private final byte version;
IoTDBSinkRequestVersion(byte type) {
this.version = type;
}
public byte getVersion() {
return version;
}
}
|
apache/iotdb | 1,149 | iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/PortOccupiedException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.exception;
import java.util.Arrays;
public class PortOccupiedException extends RuntimeException {
public PortOccupiedException() {
super("Some ports are occupied");
}
public PortOccupiedException(int... ports) {
super(String.format("Ports %s are occupied", Arrays.toString(ports)));
}
}
|
apache/jackrabbit-oak | 1,132 | oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/spi/JournalPropertyService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.plugins.document.spi;
/**
* Each component which needs to add a property to JournalEntry
* should register this service
*/
public interface JournalPropertyService {
JournalPropertyBuilder newBuilder();
/**
* Name of the journal property
*/
String getName();
}
|
apache/jackrabbit-oak | 1,170 | oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/tck/LockIT.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.jcr.tck;
import junit.framework.Test;
public class LockIT extends TCKBase {
public static Test suite() {
return new LockIT();
}
public LockIT() {
super("JCR lock tests");
}
@Override
protected void addTests() {
addTest(org.apache.jackrabbit.test.api.lock.TestAll.suite());
}
}
|
apache/jackrabbit | 1,144 | jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/IdentifierResolver.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.spi.commons.conversion;
import org.apache.jackrabbit.spi.Path;
/**
* <code>IdentifierResolver</code> ....
*/
public interface IdentifierResolver {
public Path getPath(String identifier) throws MalformedPathException;
public void checkFormat(String identifier) throws MalformedPathException;
}
|
apache/jackrabbit | 1,157 | jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/PrivilegeEventChannel.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.core.cluster;
import org.apache.jackrabbit.spi.PrivilegeDefinition;
import java.util.Collection;
/**
* <code>PrivilegeEventChannel</code>...
*/
public interface PrivilegeEventChannel {
void registeredPrivileges(Collection<PrivilegeDefinition> definitions);
void setListener(PrivilegeEventListener listener);
} |
apache/jclouds | 1,139 | apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/catalog/functions/ServiceEndpointToRegion.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jclouds.openstack.keystone.catalog.functions;
import org.jclouds.openstack.keystone.catalog.ServiceEndpoint;
import com.google.common.base.Function;
import com.google.inject.ImplementedBy;
@ImplementedBy(ReturnRegionOrProvider.class)
public interface ServiceEndpointToRegion extends Function<ServiceEndpoint, String> {
}
|
apache/jclouds | 1,157 | providers/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/ComputeNode.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jclouds.azurecompute.arm.domain;
import org.jclouds.azurecompute.arm.util.GetEnumValue;
public class ComputeNode {
public enum Status {
GOOD,
BAD,
UNRECOGNIZED;
public static Status fromValue(final String text) {
return (Status) GetEnumValue.fromValueOrDefault(text, Status.UNRECOGNIZED);
}
}
}
|
apache/jclouds | 1,164 | apis/chef/src/main/java/org/jclouds/chef/strategy/UpdateAutomaticAttributesOnNode.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jclouds.chef.strategy;
import org.jclouds.chef.strategy.internal.UpdateAutomaticAttributesOnNodeImpl;
import com.google.inject.ImplementedBy;
/**
*
* Updates node with new automatic attributes.
*/
@ImplementedBy(UpdateAutomaticAttributesOnNodeImpl.class)
public interface UpdateAutomaticAttributesOnNode {
void execute(String nodeName);
}
|
apache/jclouds | 1,181 | core/src/main/java/org/jclouds/functions/ToLowerCase.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jclouds.functions;
import static com.google.common.base.Preconditions.checkNotNull;
import jakarta.inject.Singleton;
import com.google.common.base.Function;
@Singleton
public class ToLowerCase implements Function<String, String> {
@Override
public String apply(String input) {
checkNotNull(input, "input cannot be null");
return input.toLowerCase();
}
}
|
apache/jclouds | 1,186 | blobstore/src/main/java/org/jclouds/blobstore/attr/BlobScope.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jclouds.blobstore.attr;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
@Target( { TYPE, METHOD })
@Retention(RUNTIME)
public @interface BlobScope {
BlobScopes value();
}
|
apache/jena | 1,175 | jena-arq/src/main/java/org/apache/jena/riot/rowset/rw/rs_json/Severity.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.rowset.rw.rs_json;
/** The severity controls how to relay error events to an error handler */
public enum Severity {
/** Silently drop messages of this severity */
IGNORE,
/** Relay to ErrorHandler.warning */
WARNING,
/** Relay to ErrorHandler.error */
ERROR,
/** Relay to ErrorHandler.fatal */
FATAL
}
|
apache/jena | 1,178 | jena-arq/src/main/java/org/apache/jena/sparql/function/library/version.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.query.ARQ;
import org.apache.jena.sparql.expr.NodeValue;
import org.apache.jena.sparql.function.FunctionBase0;
/** Version number, as a string */
public class version extends FunctionBase0 {
@Override
public NodeValue exec() {
return NodeValue.makeNodeString(ARQ.VERSION);
}
}
|
apache/jena | 1,180 | jena-core/src/main/java/org/apache/jena/shared/CannotCreateException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
Exception to throw when a named entity cannot be created.
*/
package org.apache.jena.shared;
public class CannotCreateException extends OperationDeniedException
{
public CannotCreateException( String message )
{ super( message ); }
public CannotCreateException( String message, Throwable cause )
{ super( message, cause ); }
}
|
apache/jena | 1,211 | jena-cmds/src/main/java/arq/arq.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package arq;
import org.apache.jena.query.Syntax ;
/** A program to execute queries from the command line in ARQ mode. */
public class arq extends query
{
public static void main (String... argv) {
new arq(argv).mainRun() ;
}
public arq(String[] argv) {
super(argv) ;
}
@Override
protected Syntax getDefaultSyntax() { return Syntax.syntaxARQ ; }
}
|
apache/johnzon | 1,165 | johnzon-mapper/src/main/java/org/apache/johnzon/mapper/converter/ByteConverter.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.johnzon.mapper.converter;
import org.apache.johnzon.mapper.Converter;
public class ByteConverter implements Converter<Byte> {
@Override
public String toString(final Byte instance) {
return Byte.toString(instance);
}
@Override
public Byte fromString(final String text) {
return Byte.valueOf(text);
}
}
|
apache/johnzon | 1,165 | johnzon-mapper/src/main/java/org/apache/johnzon/mapper/converter/LongConverter.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.johnzon.mapper.converter;
import org.apache.johnzon.mapper.Converter;
public class LongConverter implements Converter<Long> {
@Override
public String toString(final Long instance) {
return Long.toString(instance);
}
@Override
public Long fromString(final String text) {
return Long.valueOf(text);
}
}
|
apache/johnzon | 1,165 | johnzon-websocket/src/main/java/org/apache/johnzon/websocket/jsr/JsrArrayEncoder.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.johnzon.websocket.jsr;
import org.apache.johnzon.websocket.internal.jsr.JsrEncoder;
import jakarta.json.JsonArray;
import jakarta.json.JsonWriter;
public class JsrArrayEncoder extends JsrEncoder<JsonArray> {
@Override
protected void doWrite(final JsonWriter writer, final JsonArray array) {
writer.writeArray(array);
}
}
|
apache/kafka | 1,166 | clients/src/main/java/org/apache/kafka/common/errors/TransactionAbortableException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.common.errors;
public class TransactionAbortableException extends ApiException {
private static final long serialVersionUID = 1L;
public TransactionAbortableException(String message, Throwable cause) {
super(message, cause);
}
public TransactionAbortableException(String message) {
super(message);
}
}
|
apache/linkis | 1,119 | linkis-public-enhancements/linkis-datasource/linkis-metadata/src/main/java/org/apache/linkis/metadata/hive/config/DynamicDataSource.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.metadata.hive.config;
import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
public class DynamicDataSource extends AbstractRoutingDataSource {
@Override
protected Object determineCurrentLookupKey() {
return DataSourceContextHolder.getDataSourceType();
}
}
|
apache/maven-plugins | 1,129 | maven-assembly-plugin/src/main/java/org/apache/maven/plugins/assembly/repository/model/RepositoryInfo.java | package org.apache.maven.plugins.assembly.repository.model;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import java.util.List;
/**
*
*/
public interface RepositoryInfo
{
List<GroupVersionAlignment> getGroupVersionAlignments();
boolean isIncludeMetadata();
String getScope();
List<String> getIncludes();
List<String> getExcludes();
}
|
apache/maven-plugins | 1,161 | maven-compiler-plugin/src/main/java/org/apache/maven/plugin/CompilerMojo.java | package org.apache.maven.plugin;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/**
* Compiles application sources
*
* @author <a href="mailto:jason@maven.org">Jason van Zyl </a>
* @version $Id$
* @since 2.0
* @deprecated package change since 3.0
*/
@Deprecated
public class CompilerMojo
extends org.apache.maven.plugin.compiler.CompilerMojo
{
// no op only here for backward comp
}
|
apache/metron | 1,138 | metron-platform/metron-data-management/src/main/java/org/apache/metron/dataloads/extractor/csv/LookupConverter.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.metron.dataloads.extractor.csv;
import org.apache.metron.enrichment.lookup.LookupKey;
import org.apache.metron.enrichment.lookup.LookupValue;
import java.util.Map;
public interface LookupConverter {
LookupKey toKey(String type, String indicator);
LookupValue toValue(Map<String, Object> metadata);
}
|
apache/nifi | 1,100 | nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/db/impl/RemoveSpaceNormalizer.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.processors.standard.db.impl;
import org.apache.nifi.processors.standard.db.NameNormalizer;
public class RemoveSpaceNormalizer implements NameNormalizer {
@Override
public String getNormalizedName(String colName) {
return colName.replace(" ", "");
}
}
|
apache/nifi | 1,107 | nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/service/ControllerServiceNotValidException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.service;
/**
* Thrown when attempting to enable a Controller Service that is not valid
*/
public class ControllerServiceNotValidException extends RuntimeException {
public ControllerServiceNotValidException(final String message) {
super(message);
}
}
|
apache/nifi | 1,114 | nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-processors/src/main/java/org/apache/nifi/kafka/processors/producer/value/ValueFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.kafka.processors.producer.value;
import org.apache.nifi.serialization.record.Record;
import java.io.IOException;
/**
* Implementations of converters from FlowFile data to Kafka record value.
*/
public interface ValueFactory {
byte[] getValue(Record record) throws IOException;
}
|
apache/ofbiz | 1,175 | framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelCondition.java | /*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*******************************************************************************/
package org.apache.ofbiz.widget.model;
import java.util.Map;
public interface ModelCondition {
void accept(ModelConditionVisitor visitor) throws Exception;
boolean eval(Map<String, Object> context);
}
|
apache/openjpa | 1,150 | openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/AverageExpression.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.query;
/**
* Denotes AVG() on a given Expression.
*
* @author Pinaki Poddar
*
*/
public class AverageExpression extends UnaryOperatorExpression {
private static final long serialVersionUID = 1L;
public AverageExpression(ExpressionImpl op) {
super(op, UnaryFunctionalOperator.AVG);
}
}
|
apache/openwebbeans | 1,122 | webbeans-impl/src/test/java/org/apache/webbeans/test/component/exception/stero/ComponentDefaultScopeWithNonScopeStero.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.stero;
import java.io.Serializable;
import jakarta.enterprise.context.SessionScoped;
import org.apache.webbeans.test.sterotype.StereoWithNonScope;
@StereoWithNonScope
@SessionScoped
public class ComponentDefaultScopeWithNonScopeStero implements Serializable
{
}
|
apache/openwebbeans | 1,130 | webbeans-impl/src/test/java/org/apache/webbeans/test/component/producer/broken/BrokenProducerComponent4.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.producer.broken;
import jakarta.enterprise.inject.Disposes;
import jakarta.enterprise.inject.Produces;
public class BrokenProducerComponent4
{
public BrokenProducerComponent4()
{
}
@Produces
public int broken4(@Disposes int x)
{
return 0;
}
}
|
apache/ozone | 1,153 | hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/ha/RetriableWithNoFailoverException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.hdds.scm.ha;
import java.io.IOException;
/**
* This exception indicates that the request can be retried, but only on the
* same server, without failover.
*/
public class RetriableWithNoFailoverException extends IOException {
public RetriableWithNoFailoverException(IOException exception) {
super(exception);
}
}
|
apache/paimon | 1,140 | paimon-common/src/test/resources/codesplit/declaration/expected/TestLocalVariableWithSameName.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
public class TestLocalVariableWithSameName {
int local1;
String local2;
long local3;
int local$0;
long local$1;
String local$2;
public void myFun1() {
local2 = "AAAAA";
local3 = 100;
}
public void myFun2() {
local$0 = 5;
local$2 = "BBBBB";
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.