repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
google/adk-java | 1,158 | core/src/main/java/com/google/adk/tools/mcp/McpToolException.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.adk.tools.mcp;
/** Base exception for all errors originating from {@code AbstractMcpTool} and its subclasses. */
public class McpToolException extends RuntimeException {
public McpToolException(String message, Throwable cause) {
super(message, cause);
}
/** Exception thrown when there's an error during MCP tool declaration generated. */
public static class McpToolDeclarationException extends McpToolException {
public McpToolDeclarationException(String message, Throwable cause) {
super(message, cause);
}
}
}
|
google/agera | 1,165 | agera/src/main/java/com/google/android/agera/UpdateDispatcher.java | /*
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.agera;
/**
* Passes on updates from an {@link Updatable#update} call to any {@link Updatable} added using
* {@link Observable#addUpdatable}. It should be possible to call {@link UpdateDispatcher#update}
* from any thread.
*
* <p>This interface should typically not be implemented by client code; the standard
* implementations obtainable from {@link Observables#updateDispatcher} help implement
* {@link Observable}s adhering to the contract.
*/
public interface UpdateDispatcher extends Observable, Updatable {}
|
google/depan | 1,140 | DepanCore/prod/src/com/google/devtools/depan/graph/basic/SimpleNode.java | /*
* Copyright 2008 The Depan Project Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.devtools.depan.graph.basic;
/**
* A simple concrete node that just saves the id from its constructor.
*
* @author <a href="leeca@google.com">Lee Carver</a>
*
*/
public class SimpleNode<T> extends BasicNode<T> {
/** Internal storage for the id. */
private final T id;
/**
* Create a SimpleNode for the provided id.
*
* @param id id to associate with SimpleNode
*/
public SimpleNode(T id) {
super();
this.id = id;
}
@Override
public T getId() {
return id;
}
}
|
google/gdata-java-client | 1,157 | java/src/com/google/gdata/data/XmlEventSource.java | /* Copyright (c) 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.gdata.data;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
import java.io.IOException;
/**
* A generic source of xml events that can be parsed by an instance of
* {@link DefaultHandler}.
*
*
*/
public interface XmlEventSource {
/**
* Parse this event source with the given xml handler.
*
* @param handler an xml handler that can handle the xml event source.
* @throws SAXException if parsing fails.
*/
public void parse(DefaultHandler handler) throws SAXException, IOException;
}
|
google/guava | 1,144 | guava-tests/test/com/google/common/collect/CompactLinkedHashSetFloodingTest.java | /*
* Copyright (C) 2012 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.common.collect;
import static java.lang.Math.log;
import com.google.common.annotations.GwtIncompatible;
import java.util.Set;
import org.jspecify.annotations.NullUnmarked;
@GwtIncompatible
@NullUnmarked
public class CompactLinkedHashSetFloodingTest extends AbstractHashFloodingTest<Set<Object>> {
public CompactLinkedHashSetFloodingTest() {
super(
ImmutableList.of(Construction.setFromElements(CompactLinkedHashSet::create)),
n -> n * log(n),
ImmutableList.of(QueryOp.SET_CONTAINS));
}
}
|
google/paco | 1,166 | Paco/src/com/pacoapp/paco/model/OutputColumns.java | /*
* Copyright 2011 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/**
*
*/
package com.pacoapp.paco.model;
import com.pacoapp.paco.shared.model2.OutputBaseColumns;
import android.net.Uri;
import android.provider.BaseColumns;
public class OutputColumns extends OutputBaseColumns implements BaseColumns {
public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.google.paco.output";
public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.google.paco.output";
public static final Uri CONTENT_URI = Uri.parse("content://"+ExperimentProviderUtil.AUTHORITY+"/outputs");
} |
google/sagetv | 1,176 | java/sage/locator/MediaInfo.java | /*
* Copyright 2015 The SageTV Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package sage.locator;
public class MediaInfo
{
public MediaInfo() {}
public int mediaType;
public long size;
public String relativePath;
public java.io.File localPath;
public int downloadID;
public sage.MediaFile getMediaFile()
{
if (localPath != null && localPath.length() > 0)
{
return sage.Wizard.getInstance().getFileForFilePath(localPath);
}
return null;
}
public String toString()
{
return "MediaInfo[type=" + mediaType + " size=" + size + " id=" + downloadID + " path=" + relativePath + "]";
}
} |
google/sagetv | 1,179 | java/sage/media/sub/DTVCCFontType.java | /*
* Copyright 2015 The SageTV Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package sage.media.sub;
public enum DTVCCFontType {
DEFAULT,
MONOSPACED_SERIF,
PROPORTIONAL_SERIF,
MONOSPACED_SANS,
PROPORTIONAL_SANS,
CASUAL,
CURSIVE,
SMALLCAPS;
public static DTVCCFontType from(int data) {
switch (data) {
case 0: return DEFAULT;
case 1: return MONOSPACED_SERIF;
case 2: return PROPORTIONAL_SERIF;
case 3: return MONOSPACED_SANS;
case 4: return PROPORTIONAL_SANS;
case 5: return CASUAL;
case 6: return CURSIVE;
case 7: return SMALLCAPS;
}
return DEFAULT;
}
} |
google/zetasql | 1,168 | java/com/google/zetasql/GraphPropertyDeclaration.java | /*
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.google.zetasql;
import java.io.Serializable;
/**
* Represents a property declaration in a property graph. A GraphPropertyDeclaration could be
* exposed by one or more {link GraphElementLabel}. Within a property graph, there is one
* GraphPropertyDeclaration for each unique property name. It guarantees the consistency of property
* declaration.
*/
public interface GraphPropertyDeclaration extends Serializable {
String getName();
/** The fully-qualified name, including the property graph name. */
String getFullName();
Type getType();
}
|
googleapis/google-cloud-java | 1,054 | java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/EnableAdvancedSiteSearchResponseOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/discoveryengine/v1beta/site_search_engine_service.proto
// Protobuf Java Version: 3.25.8
package com.google.cloud.discoveryengine.v1beta;
public interface EnableAdvancedSiteSearchResponseOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.EnableAdvancedSiteSearchResponse)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/google-cloud-java | 1,102 | java-translate/google-cloud-translate/src/test/java/com/google/cloud/translate/TranslateOptionsTest.java | /*
* Copyright 2017 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.cloud.translate;
import com.google.cloud.TransportOptions;
import org.easymock.EasyMock;
import org.junit.Assert;
import org.junit.Test;
public class TranslateOptionsTest {
@Test
public void testInvalidTransport() {
try {
TranslateOptions.newBuilder()
.setTransportOptions(EasyMock.<TransportOptions>createMock(TransportOptions.class));
Assert.fail();
} catch (IllegalArgumentException ex) {
Assert.assertNotNull(ex.getMessage());
}
}
}
|
googlearchive/leanback-showcase | 1,082 | app/src/main/java/android/support/v17/leanback/supportleanbackshowcase/app/room/di/action/qualifier/PlayActionQualifier.java | /*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.support.v17.leanback.supportleanbackshowcase.app.room.di.action.qualifier;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import javax.inject.Qualifier;
/**
* Notice that the qualifier can be replaced with the @Name("plain text") easily. But the drawback
* for plain text is it is hard for future maintenance.
*/
@Qualifier
@Retention(RetentionPolicy.RUNTIME)
public @interface PlayActionQualifier {
}
|
googlearchive/leanback-showcase | 1,082 | app/src/main/java/android/support/v17/leanback/supportleanbackshowcase/app/room/di/action/qualifier/RentActionQualifier.java | /*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.support.v17.leanback.supportleanbackshowcase.app.room.di.action.qualifier;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import javax.inject.Qualifier;
/**
* Notice that the qualifier can be replaced with the @Name("plain text") easily. But the drawback
* for plain text is it is hard for future maintenance.
*/
@Qualifier
@Retention(RetentionPolicy.RUNTIME)
public @interface RentActionQualifier {
}
|
hibernate/hibernate-ogm | 1,109 | mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/type/impl/GridFSGridType.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.type.impl;
import org.bson.types.ObjectId;
import org.hibernate.MappingException;
import org.hibernate.engine.spi.Mapping;
import org.hibernate.ogm.datastore.mongodb.type.GridFS;
import org.hibernate.ogm.type.descriptor.impl.PassThroughGridTypeDescriptor;
import org.hibernate.ogm.type.impl.AbstractGenericBasicType;
/**
* Persists {@link ObjectId}s as is in MongoDB.
*
* @author Gunnar Morling
*/
public class GridFSGridType extends AbstractGenericBasicType<GridFS> {
public static final GridFSGridType INSTANCE = new GridFSGridType();
public GridFSGridType() {
super( PassThroughGridTypeDescriptor.INSTANCE, GridFSJavaTypeDescriptor.INSTANCE );
}
@Override
public String getName() {
return "gridfs";
}
@Override
public int getColumnSpan(Mapping mapping) throws MappingException {
return 1;
}
}
|
hibernate/hibernate-orm | 1,048 | hibernate-core/src/main/java/org/hibernate/boot/jaxb/hbm/spi/PluralAttributeInfoPrimitiveArrayAdapter.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.jaxb.hbm.spi;
import java.util.Collections;
import java.util.List;
/**
* @author Steve Ebersole
*/
public abstract class PluralAttributeInfoPrimitiveArrayAdapter
extends JaxbHbmToolingHintContainer
implements PluralAttributeInfo {
@Override
public boolean isInverse() {
return false;
}
@Override
public JaxbHbmLazyWithExtraEnum getLazy() {
return JaxbHbmLazyWithExtraEnum.FALSE;
}
public JaxbHbmOneToManyCollectionElementType getOneToMany() {
return null;
}
@Override
public JaxbHbmCompositeCollectionElementType getCompositeElement() {
return null;
}
@Override
public JaxbHbmManyToManyCollectionElementType getManyToMany() {
return null;
}
@Override
public JaxbHbmManyToAnyCollectionElementType getManyToAny() {
return null;
}
@Override
public List<JaxbHbmFilterType> getFilter() {
return Collections.emptyList();
}
@Override
public String getCascade() {
return null;
}
}
|
hibernate/hibernate-orm | 1,055 | hibernate-core/src/test/java/org/hibernate/orm/test/resource/common/SynchronizationCollectorImpl.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.resource.common;
import jakarta.transaction.Status;
import jakarta.transaction.Synchronization;
/**
* @author Steve Ebersole
*/
public class SynchronizationCollectorImpl implements Synchronization {
private int beforeCompletionCount;
private int successfulCompletionCount;
private int failedCompletionCount;
@Override
public void beforeCompletion() {
beforeCompletionCount++;
}
@Override
public void afterCompletion(int status) {
if ( status == Status.STATUS_COMMITTED ) {
successfulCompletionCount++;
}
else {
failedCompletionCount++;
}
}
public int getBeforeCompletionCount() {
return beforeCompletionCount;
}
public int getSuccessfulCompletionCount() {
return successfulCompletionCount;
}
public int getFailedCompletionCount() {
return failedCompletionCount;
}
public void reset() {
beforeCompletionCount = 0;
successfulCompletionCount = 0;
failedCompletionCount = 0;
}
}
|
hibernate/hibernate-orm | 1,063 | hibernate-core/src/test/java/org/hibernate/orm/test/annotations/immutable/Photo.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 jakarta.persistence.Convert;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
/**
*
* @author soldierkam
*/
@Entity
@SuppressWarnings("serial")
public class Photo implements Serializable {
private Integer id;
private String name;
private Exif metadata;
private Caption caption;
@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;
}
public Exif getMetadata() {
return metadata;
}
public void setMetadata(Exif metadata) {
this.metadata = metadata;
}
@Convert(converter = CaptionConverter.class)
public Caption getCaption() {
return caption;
}
public void setCaption(Caption caption) {
this.caption = caption;
}
}
|
hibernate/hibernate-orm | 1,064 | hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/collection/norevision/Person.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.envers.integration.collection.norevision;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import jakarta.persistence.CascadeType;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.OneToMany;
import org.hibernate.envers.AuditMappedBy;
import org.hibernate.envers.Audited;
@Audited
@Entity
public class Person implements Serializable {
@Id
@GeneratedValue
private Integer id;
@AuditMappedBy(mappedBy = "person")
@OneToMany(cascade = CascadeType.ALL)
@JoinColumn(name = "person_id")
private Set<Name> names;
public Person() {
names = new HashSet<Name>();
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Set<Name> getNames() {
return names;
}
public void setNames(Set<Name> names) {
this.names = names;
}
}
|
hibernate/hibernate-orm | 1,078 | hibernate-core/src/test/java/org/hibernate/orm/test/jpa/cascade/multicircle/F.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.jpa.cascade.multicircle;
/**
* No Documentation
*/
@jakarta.persistence.Entity
public class F extends AbstractEntity {
private static final long serialVersionUID = 1471534025L;
/**
* No documentation
*/
@jakarta.persistence.OneToMany(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, mappedBy = "f")
private java.util.Set<E> eCollection = new java.util.HashSet<E>();
@jakarta.persistence.ManyToOne(optional = false)
private D d;
@jakarta.persistence.ManyToOne(optional = false)
private G g;
public java.util.Set<E> getECollection() {
return eCollection;
}
public void setECollection(
java.util.Set<E> parameter) {
this.eCollection = parameter;
}
public D getD() {
return d;
}
public void setD(D parameter) {
this.d = parameter;
}
public G getG() {
return g;
}
public void setG(G parameter) {
this.g = parameter;
}
}
|
hibernate/hibernate-search | 1,061 | documentation/src/test/java/org/hibernate/search/documentation/mapper/orm/binding/dependencies/simple/Book.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.documentation.mapper.orm.binding.dependencies.simple;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
import jakarta.persistence.ManyToOne;
import org.hibernate.search.mapper.pojo.bridge.mapping.annotation.TypeBinderRef;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.Indexed;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.TypeBinding;
@Entity
@Indexed
@TypeBinding(binder = @TypeBinderRef(type = AuthorFullNameBinder.class))
public class Book {
@Id
@GeneratedValue
private Integer id;
private String title;
@ManyToOne
private Author author;
public Integer getId() {
return id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public Author getAuthor() {
return author;
}
public void setAuthor(Author author) {
this.author = author;
}
}
|
hibernate/hibernate-search | 1,110 | mapper/pojo-base/src/main/java/org/hibernate/search/mapper/pojo/work/spi/PojoWorkSessionContext.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.mapper.pojo.work.spi;
import org.hibernate.search.engine.backend.session.spi.BackendSessionContext;
import org.hibernate.search.mapper.pojo.automaticindexing.spi.PojoImplicitReindexingResolverSessionContext;
import org.hibernate.search.mapper.pojo.bridge.runtime.spi.BridgeSessionContext;
import org.hibernate.search.mapper.pojo.loading.spi.PojoSelectionLoadingContext;
import org.hibernate.search.mapper.pojo.processing.spi.PojoIndexingProcessorSessionContext;
import org.hibernate.search.util.common.annotation.Incubating;
/**
* Session-scoped information and operations for use in POJO work execution.
*/
public interface PojoWorkSessionContext
extends BackendSessionContext, BridgeSessionContext, PojoIndexingProcessorSessionContext,
PojoImplicitReindexingResolverSessionContext {
@Override
PojoWorkMappingContext mappingContext();
PojoSelectionLoadingContext defaultLoadingContext();
@Incubating
ConfiguredSearchIndexingPlanFilter configuredIndexingPlanFilter();
}
|
hibernate/hibernate-validator | 1,037 | annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/customconstraints/BeanValidationConstraints.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.validator.ap.testmodel.customconstraints;
import java.util.Collection;
import java.util.List;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.Negative;
import jakarta.validation.constraints.NegativeOrZero;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Positive;
import jakarta.validation.constraints.PositiveOrZero;
public class BeanValidationConstraints {
/**
* Allowed.
*/
@Email
@NotEmpty
@NotBlank
public String string;
@Positive
@PositiveOrZero
public int number;
@Negative
@NegativeOrZero
public Double otherNumber;
@NotEmpty
public List list;
/**
* Not allowed.
*/
@Email
@Negative
@NegativeOrZero
@NotEmpty
@NotBlank
public Object property;
@NotEmpty
@NotBlank
@Email
public int badInt;
@Positive
@PositiveOrZero
public Collection collection;
}
|
openjdk/jdk8 | 1,143 | langtools/test/tools/javac/diags/examples/UncheckedPluralAdditional/UncheckedFilename1.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.
*/
import java.util.*;
class UncheckedFilename1 {
List<String> list = new ArrayList();
}
|
openjdk/jdk8 | 1,143 | langtools/test/tools/javac/diags/examples/UncheckedPluralAdditional/UncheckedFilename2.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.
*/
import java.util.*;
class UncheckedFilename2 {
List<String> list = new ArrayList();
}
|
openjdk/jdk8 | 1,157 | langtools/test/tools/javac/diags/examples/ErrProcMessager/ErrProcMessager.java | /*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// key: compiler.err.proc.messager
// options: -processor AnnoProc -proc:only
class ErrProcMessager { }
|
openjdk/jdk8 | 1,168 | langtools/test/com/sun/javadoc/testHrefInDocComment/pkg/I2.java | /*
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
/*****
* Just a dummy interface used to reproduce a bug.
*/
public interface I2 {
}
|
openjdk/jdk8 | 1,177 | langtools/test/tools/javac/diags/examples/DivZero.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.warn.div.zero
// options: -Xlint:divzero
class DivZero {
int m(int a) {
return a / 0 ;
}
}
|
openjdk/jtreg | 1,193 | test/skip/jtreg/SkippedException2.java | /*
* Copyright (c) 2018, 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 jtreg;
public class SkippedException2 extends RuntimeException {
public SkippedException2(String s) {
super(s);
}
}
|
openjdk/jtreg | 1,194 | test/reportOption/also-run/Pass.java | /*
* Copyright (c) 2022, 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.
*/
// tests in this directory may be run
/*
* @test
* @run main Pass
*/
public class Pass {
public static void main(String... args) { }
} |
openjdk/skara | 1,168 | bots/merge/src/main/java/org/openjdk/skara/bots/merge/Clock.java | /*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.skara.bots.merge;
import java.time.ZonedDateTime;
interface Clock {
ZonedDateTime now();
}
|
openjdk/skara | 1,170 | metrics/src/main/java/org/openjdk/skara/metrics/Collector.java | /*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.skara.metrics;
import java.util.List;
public interface Collector {
List<Metric> collect();
}
|
oracle/coherence | 1,118 | prj/coherence-core/src/main/java/com/tangosol/internal/net/management/model/ModelOperation.java | /*
* Copyright (c) 2000, 2022, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
*/
package com.tangosol.internal.net.management.model;
import javax.management.MBeanOperationInfo;
import java.util.function.BiFunction;
/**
* A representation of an operation that can be executed
* on {@link AbstractModel MBean model}.
*
* @param <M> the type of the model the operations will
* execute on
*
* @author Jonathan Knight 2022.09.10
* @since 23.03
*/
public interface ModelOperation<M>
{
/**
* Return the name of the operation.
*
* @return the name of the operation
*/
String getName();
/**
* Returns the function to call when the operation is executed.
*
* @return the function to call when the operation is executed
*/
BiFunction<M, Object[], ?> getFunction();
/**
* Return the MBeanOperationInfo for this operation.
*
* @return the MBeanOperationInfo for this operation
*/
MBeanOperationInfo getOperation();
}
|
oracle/nosql | 1,151 | httpproxy/httpproxy/src/main/java/oracle/nosql/audit/AuditContext.java | /*-
* Copyright (C) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This file was distributed by Oracle as part of a version of Oracle NoSQL
* Database made available at:
*
* http://www.oracle.com/technetwork/database/database-technologies/nosqldb/downloads/index.html
*
* Please see the LICENSE file included in the top-level directory of the
* appropriate version of Oracle NoSQL Database for a copy of the license and
* additional information.
*/
package oracle.nosql.audit;
/**
* An interface used for recording audit context which will be used to generate
* audit content.
*/
public interface AuditContext {
/**
* An interface for building an AuditContext.
*/
public interface AuditContextBuilder {
/**
* @return build an AuditContext.
*/
AuditContext[] build();
}
/**
* An interface for validating AuditContext.
*/
public interface AuditContextValidator {
/**
* @param context to be validated.
* @return true if AuditContext is valid.
*/
public boolean validate(AuditContext context);
}
}
|
oracle/nosql | 1,167 | kvmain/src/main/java/oracle/kv/impl/security/RoleResolver.java | /*-
* Copyright (C) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This file was distributed by Oracle as part of a version of Oracle NoSQL
* Database made available at:
*
* http://www.oracle.com/technetwork/database/database-technologies/nosqldb/downloads/index.html
*
* Please see the LICENSE file included in the top-level directory of the
* appropriate version of Oracle NoSQL Database for a copy of the license and
* additional information.
*/
package oracle.kv.impl.security;
/**
* An abstract interface for resolving the RoleInstance object according to the
* name of the role. It is possible that such information will be fetched from
* the security metadata of Admin and RepNode, or even from third party
* authorization products. Such semantics will be deferred to the
* implementation of this interface.
*/
public interface RoleResolver {
/**
* Obtains a RoleInstance object by resolving the role name
*
* @param roleName name of role to resolve
* @return RoleInstance object. May be null if nothing can be found using
* the roleName
*/
RoleInstance resolve(String roleName);
}
|
apache/commons-geometry | 1,096 | commons-geometry-examples/examples-jmh/src/main/java/org/apache/commons/geometry/examples/jmh/euclidean/pointmap/package-info.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Benchmarks for candidate point map data structures and algorithms. The
* classes in this package are not complete implementations. Rather, they
* include just enough code to evaluate the algorithms in question.
*/
package org.apache.commons.geometry.examples.jmh.euclidean.pointmap;
|
apache/cxf | 1,109 | rt/rs/security/http-signature/src/main/java/org/apache/cxf/rs/security/httpsignature/exception/MissingDigestException.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.cxf.rs.security.httpsignature.exception;
public class MissingDigestException extends SignatureException {
private static final long serialVersionUID = 1L;
public MissingDigestException() { }
public MissingDigestException(String message) {
super(message);
}
}
|
apache/cxf | 1,114 | systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/httpsignature/CustomAlgorithmProvider.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.cxf.systest.jaxrs.security.httpsignature;
import org.apache.cxf.rs.security.httpsignature.provider.AlgorithmProvider;
public class CustomAlgorithmProvider implements AlgorithmProvider {
@Override
public String getAlgorithmName(String keyId) {
return "rsa-sha512";
}
}
|
apache/cxf | 1,139 | rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/AbstractRestController.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.cxf.jaxrs.fortest;
import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.core.Response;
public class AbstractRestController<T extends RestResource> {
@POST
@Consumes("text/xml")
public Response add(final T resource) {
// build some response
return null;
}
}
|
apache/cxf | 1,140 | systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSourcePayloadProvider.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.cxf.systest.provider;
@SuppressWarnings("PMD.OverrideBothEqualsAndHashCodeOnComparable")
public class HWSourcePayloadProvider extends AbstractSourcePayloadProvider
implements Comparable<HWSourcePayloadProvider> {
public int compareTo(HWSourcePayloadProvider p) {
return p == this ? 0 : -1;
}
}
|
apache/deltaspike | 1,097 | deltaspike/modules/jpa/impl/src/test/java/org/apache/deltaspike/test/jpa/api/transactional/stereotype/TransactionalBean.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.deltaspike.test.jpa.api.transactional.stereotype;
import jakarta.inject.Inject;
import jakarta.persistence.EntityManager;
@Repository
public class TransactionalBean
{
@Inject
private EntityManager entityManager;
public void executeInTransaction()
{
}
}
|
apache/deltaspike | 1,114 | deltaspike/modules/data/impl/src/test/java/org/apache/deltaspike/data/test/domain/EmbeddedSimple.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.deltaspike.data.test.domain;
import jakarta.persistence.Embeddable;
@Embeddable
public class EmbeddedSimple
{
private String embedd;
public String getEmbedd()
{
return embedd;
}
public void setEmbedd(String embedd)
{
this.embedd = embedd;
}
}
|
apache/deltaspike | 1,119 | deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/meta/RequiresTransaction.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.deltaspike.data.impl.meta;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
@Target(METHOD)
@Retention(RUNTIME)
public @interface RequiresTransaction
{
}
|
apache/directory-kerby | 1,130 | kerby-common/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1VisibleString.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 Asn1VisibleString extends Asn1String {
public Asn1VisibleString() {
this(null);
}
public Asn1VisibleString(String value) {
super(UniversalTag.VISIBLE_STRING, value);
}
}
|
apache/directory-kerby | 1,134 | kerby-common/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1IA5String.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 Asn1IA5String extends Asn1String {
public Asn1IA5String() {
super(UniversalTag.IA5_STRING);
}
public Asn1IA5String(String value) {
super(UniversalTag.IA5_STRING, value);
}
}
|
apache/directory-studio | 1,111 | plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/model/LdapServerEventType.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
package org.apache.directory.studio.ldapservers.model;
/**
* This enums defines the different server events notifications.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
public enum LdapServerEventType
{
RENAMED, STATUS_CHANGED
}
|
apache/dolphinscheduler | 1,084 | dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/java/org/apache/dolphinscheduler/api/test/entity/HttpResponse.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.api.test.entity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@AllArgsConstructor
@NoArgsConstructor
@Data
public class HttpResponse {
private int statusCode;
private HttpResponseBody body;
}
|
apache/dolphinscheduler | 1,110 | dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/model/WorkflowDefinitionCountDto.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.dao.model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class WorkflowDefinitionCountDto {
private String userName;
private Integer userId;
private int count;
}
|
apache/doris-manager | 1,114 | manager/dm-server/src/main/java/org/apache/doris/stack/model/response/control/ClusterInstanceInfo.java | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.doris.stack.model.response.control;
import lombok.Data;
@Data
public class ClusterInstanceInfo {
private long instanceId;
private String moduleName;
private String nodeHost;
private String operateStatus;
private int operateStage;
private String operateResult;
}
|
apache/dubbo | 1,101 | dubbo-demo/dubbo-demo-spring-boot/dubbo-demo-spring-boot-interface/src/main/java/org/apache/dubbo/springboot/demo/DemoService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.springboot.demo;
import java.util.concurrent.CompletableFuture;
public interface DemoService {
String sayHello(String name);
default CompletableFuture<String> sayHelloAsync(String name) {
return CompletableFuture.completedFuture(sayHello(name));
}
}
|
apache/eventmesh | 1,092 | eventmesh-connectors/eventmesh-connector-canal/src/main/java/org/apache/eventmesh/connector/canal/model/EventColumnIndexComparable.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.canal.model;
import java.util.Comparator;
public class EventColumnIndexComparable implements Comparator<EventColumn> {
public int compare(EventColumn o1, EventColumn o2) {
return Integer.compare(o1.getIndex(), o2.getIndex());
}
}
|
apache/eventmesh | 1,125 | eventmesh-common/src/main/java/org/apache/eventmesh/common/config/connector/http/HttpSinkConfig.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.http;
import org.apache.eventmesh.common.config.connector.SinkConfig;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = true)
public class HttpSinkConfig extends SinkConfig {
public SinkConnectorConfig connectorConfig;
}
|
apache/felix-dev | 1,064 | ipojo/manipulator/manipulator-it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/CallSuperConstructorWithNew.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.felix.ipojo.runtime.core.components;
public class CallSuperConstructorWithNew extends ParentClass {
public CallSuperConstructorWithNew() {
super(new StringBuffer("test"));
System.out.println("plop");
}
}
|
apache/felix-dev | 1,079 | ipojo/manipulator/manipulator-it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/PlopImpl.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.felix.ipojo.runtime.core.components;
import org.apache.felix.ipojo.runtime.core.services.Plop;
//TODO this test requires source compatibility 1.5
public class PlopImpl implements Plop {
public String getPlop() {
return "plop";
}
}
|
apache/fesod | 1,158 | fesod/src/main/java/org/apache/fesod/excel/event/Handler.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fesod.excel.event;
import org.apache.fesod.excel.constant.OrderConstant;
/**
* Intercepts handle some business logic
*
*
**/
public interface Handler extends Order {
/**
* handler order
*
* @return order
*/
@Override
default int order() {
return OrderConstant.DEFAULT_ORDER;
}
}
|
apache/fineract | 1,087 | fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionAccrualActivityPostEvent.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.test.messaging.event.loan.transaction;
public class LoanTransactionAccrualActivityPostEvent extends AbstractLoanTransactionEvent {
@Override
public String getEventName() {
return "LoanTransactionAccrualActivityPostBusinessEvent";
}
}
|
apache/fineract | 1,101 | fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForClientTransactions.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.accounting.journalentry.service;
import org.apache.fineract.accounting.journalentry.data.ClientTransactionDTO;
public interface AccountingProcessorForClientTransactions {
void createJournalEntriesForClientTransaction(ClientTransactionDTO clientTransactionDTO);
}
|
apache/fineract | 1,121 | fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/request/SmsCreationRequest.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.sms.data.request;
import java.io.Serial;
import java.io.Serializable;
public record SmsCreationRequest(Long groupId, Long clientId, Long staffId, String message, Long campaignId) implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
}
|
apache/fineract | 1,131 | fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ErrorMessageType.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.test.data;
public enum ErrorMessageType {
CHARGED_OFF("Adding charge to Loan: %s is not allowed. Loan Account is Charged-off");
public final String value;
ErrorMessageType(String value) {
this.value = value;
}
public String getValue() {
return value;
}
}
|
apache/fineract | 1,133 | fineract-provider/src/main/java/org/apache/fineract/mix/domain/MixTaxonomyMappingRepository.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.mix.domain;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
public interface MixTaxonomyMappingRepository
extends JpaRepository<MixTaxonomyMapping, Long>, JpaSpecificationExecutor<MixTaxonomyMapping> {
}
|
apache/flink | 1,109 | flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/sink/writer/strategy/ResultInfo.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.flink.connector.base.sink.writer.strategy;
import org.apache.flink.annotation.PublicEvolving;
/** Interface for dataclass used to encapsulate results from completed requests. */
@PublicEvolving
public interface ResultInfo {
int getFailedMessages();
int getBatchSize();
}
|
apache/flink | 1,129 | flink-runtime/src/main/java/org/apache/flink/streaming/api/operators/MultipleInputStreamOperator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.streaming.api.operators;
import org.apache.flink.annotation.PublicEvolving;
import java.util.List;
/** Interface for stream operators with multiple {@link Input}s. */
@PublicEvolving
public interface MultipleInputStreamOperator<OUT> extends StreamOperator<OUT> {
List<Input> getInputs();
}
|
apache/flink | 1,152 | flink-core/src/main/java/org/apache/flink/api/common/io/NonParallelInput.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.api.common.io;
import org.apache.flink.annotation.Public;
/**
* This interface acts as a marker for input formats for inputs which cannot be split. Data sources
* with a non-parallel input formats are always executed with a parallelism of one.
*
* @see InputFormat
*/
@Public
public interface NonParallelInput {}
|
apache/freemarker | 1,140 | freemarker-core/src/main/java/freemarker/template/TrueTemplateBooleanModel.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES 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.template;
/**
* Used for the {@link TemplateBooleanModel#FALSE} singleton.
*/
final class TrueTemplateBooleanModel implements SerializableTemplateBooleanModel {
@Override
public boolean getAsBoolean() {
return true;
}
private Object readResolve() {
return TRUE;
}
} |
apache/geaflow | 1,113 | geaflow/geaflow-dsl/geaflow-dsl-catalog/src/main/java/org/apache/geaflow/dsl/catalog/console/FunctionModel.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.dsl.catalog.console;
public class FunctionModel extends AbstractDataModel {
private String entryClass;
public String getEntryClass() {
return entryClass;
}
public void setEntryClass(String entryClass) {
this.entryClass = entryClass;
}
}
|
apache/giraph | 1,141 | giraph-core/src/main/java/org/apache/giraph/types/DoubleWritableToDoubleUnwrapper.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.giraph.types;
import org.apache.hadoop.io.DoubleWritable;
/**
* Converts DoubleWritables to Doubles
*/
public class DoubleWritableToDoubleUnwrapper
implements WritableUnwrapper<DoubleWritable, Double> {
@Override
public Double unwrap(DoubleWritable writableValue) {
return writableValue.get();
}
}
|
apache/giraph | 1,147 | giraph-core/src/main/java/org/apache/giraph/types/ByteToLongWritableWrapper.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.giraph.types;
import org.apache.hadoop.io.LongWritable;
/**
* Converts Bytes to LongWritables
*/
public class ByteToLongWritableWrapper
implements WritableWrapper<LongWritable, Byte> {
@Override
public void wrap(Byte javaValue, LongWritable writableValue) {
writableValue.set(javaValue.longValue());
}
}
|
apache/gobblin | 1,128 | gobblin-cluster/src/main/java/org/apache/gobblin/cluster/event/CancelJobConfigArrivalEvent.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.cluster.event;
public class CancelJobConfigArrivalEvent {
private final String jobUri;
public CancelJobConfigArrivalEvent(String jobUri) {
this.jobUri = jobUri;
}
/**
* Get the job uri.
*
* @return the job uri
*/
public String getJoburi() {
return this.jobUri;
}
} |
apache/gobblin | 1,128 | gobblin-core/src/main/java/org/apache/gobblin/source/extractor/exception/RecordCountException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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 RecordCountException extends Exception {
private static final long serialVersionUID = 1L;
public RecordCountException(String message) {
super(message);
}
public RecordCountException(String message, Exception e) {
super(message, e);
}
}
|
apache/groovy | 1,117 | src/test-fixtures/extmodule/src/main/java/org/codehaus/groovy/runtime/m12n/Groovy7225Extension.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.codehaus.groovy.runtime.m12n;
import groovy.lang.Closure;
public class Groovy7225Extension {
public static String groovy7225(String self) {
return self+": ok";
}
public static String groovy7225(Closure closure) {
return "{\"field\":\"value\"}";
}
} |
apache/groovy | 1,120 | subprojects/groovy-groovydoc/src/test/groovy/org/codehaus/groovy/tools/groovydoc/testfiles/StaticModifier.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.codehaus.groovy.tools.groovydoc.testfiles;
import java.util.HashMap;
import java.util.Map;
public class StaticModifier {
public static Map<String, String> getSyntheticProperties() {
Map<String, String> result = new HashMap<String, String>();
return result;
}
} |
apache/guacamole-client | 1,084 | extensions/guacamole-auth-sso/modules/guacamole-auth-sso-cas/src/main/java/org/apache/guacamole/auth/cas/group/PlainGroupParser.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.guacamole.auth.cas.group;
/**
* GroupParser which simply passes through all CAS group names untouched.
*/
public class PlainGroupParser implements GroupParser {
@Override
public String parse(String casGroup) {
return casGroup;
}
}
|
apache/hadoop | 1,061 | hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/GetTaskReportRequest.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.TaskId;
public interface GetTaskReportRequest {
public abstract TaskId getTaskId();
public abstract void setTaskId(TaskId taskId);
}
|
apache/hadoop | 1,091 | hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/util/constraint/PlacementConstraintParseException.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.util.constraint;
/**
* Exception when the placement constraint parser fails to parse an expression.
*/
public class PlacementConstraintParseException extends Exception {
public PlacementConstraintParseException(String msg) {
super(msg);
}
}
|
apache/hadoop | 1,103 | hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ShellContainerCommand.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.api.records;
import org.apache.hadoop.classification.InterfaceAudience.Public;
import org.apache.hadoop.classification.InterfaceStability.Evolving;
/**
* Enumeration of various signal container commands.
*/
@Public
@Evolving
public enum ShellContainerCommand {
BASH,
SH
}
|
apache/hadoop | 1,125 | hadoop-tools/hadoop-compat-bench/src/main/java/org/apache/hadoop/fs/compat/common/HdfsCompatCaseSetUp.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.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.hadoop.fs.compat.common;
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.METHOD})
public @interface HdfsCompatCaseSetUp {
} |
apache/hadoop | 1,141 | hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/prefetch/package-info.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* High performance s3 input stream which reads in
* blocks and can cache blocks in the local filesystem.
*/
@InterfaceAudience.Private
@InterfaceStability.Unstable
package org.apache.hadoop.fs.s3a.prefetch;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability; |
apache/harmony | 1,109 | classlib/modules/security/src/test/support/common/java/org/apache/harmony/security/tests/support/MyBasicPermission.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.harmony.security.tests.support;
import java.security.BasicPermission;
public class MyBasicPermission extends BasicPermission {
private static final long serialVersionUID = -4220730623258019258L;
public MyBasicPermission(String name) {
super(name);
}
}
|
apache/harmony | 1,161 | classlib/modules/x-net/src/main/java/javax/net/ssl/TrustManager.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES 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.net.ssl;
/**
* The marker interface for JSSE trust managers. The purpose is to group trust
* managers. The responsibility a trust manager is to handle the trust data used to
* make trust decisions for deciding whether credentials of a peer should be
* accepted,
* @see TrustManagerFactory
*/
public interface TrustManager {
}
|
apache/hbase | 1,145 | hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/OnePhaseProcedure.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hbase.procedure2;
import org.apache.yetus.audience.InterfaceAudience;
import org.apache.yetus.audience.InterfaceStability;
@InterfaceAudience.Private
@InterfaceStability.Evolving
public abstract class OnePhaseProcedure<TEnvironment> extends Procedure<TEnvironment> {
// TODO (e.g. used by online snapshots)
}
|
apache/hertzbeat | 1,081 | hertzbeat-collector/hertzbeat-collector-basic/src/main/java/org/apache/hertzbeat/collector/collect/ipmi2/protocol/ipmi/security/IpmiAlgorithm.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hertzbeat.collector.collect.ipmi2.protocol.ipmi.security;
import org.apache.hertzbeat.collector.collect.ipmi2.protocol.common.IpmiCode;
/**
* Ipmi Algorithm interface
*/
public interface IpmiAlgorithm extends IpmiCode.Code {
byte getPayloadType();
}
|
apache/hertzbeat | 1,096 | template-marketplace/hertzbeat-template-hub/src/main/java/org/apache/hertzbeat/templatehub/service/impl/TemplateTagServiceImpl.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hertzbeat.templatehub.service.impl;
import org.apache.hertzbeat.templatehub.service.TemplateTagService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@Slf4j
@Service
public class TemplateTagServiceImpl implements TemplateTagService {
}
|
apache/hertzbeat | 1,139 | hertzbeat-common/src/test/java/org/apache/hertzbeat/common/util/NetworkUtilTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hertzbeat.common.util;
import static org.junit.jupiter.api.Assertions.assertFalse;
import org.junit.jupiter.api.Test;
/**
* Test for {@link NetworkUtil}
*/
public class NetworkUtilTest {
@Test
void common() {
assertFalse(NetworkUtil.isLinuxPlatform() && NetworkUtil.isWindowsPlatform());
}
}
|
apache/hertzbeat | 1,142 | hertzbeat-remoting/src/main/java/org/apache/hertzbeat/remoting/netty/NettyHook.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hertzbeat.remoting.netty;
import io.netty.channel.ChannelHandlerContext;
import org.apache.hertzbeat.common.entity.message.ClusterMsg;
/**
* hook interface, handle something before request processor
*/
public interface NettyHook {
void doBeforeRequest(ChannelHandlerContext ctx, ClusterMsg.Message message);
}
|
apache/hive | 1,124 | serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/SettableHiveCharObjectInspector.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.serde2.objectinspector.primitive;
import org.apache.hadoop.hive.common.type.HiveChar;
public interface SettableHiveCharObjectInspector extends HiveCharObjectInspector {
Object set(Object o, HiveChar value);
Object set(Object o, String value);
Object create(HiveChar value);
}
|
apache/hive | 1,137 | hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/EnqueueBean.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.hive.hcatalog.templeton;
/**
* EnqueueBean - The results of a call that enqueues a Hadoop job.
*/
public class EnqueueBean {
public String id;
public EnqueueBean() {}
/**
* Create a new EnqueueBean.
*
* @param id job id
*/
public EnqueueBean(String id) {
this.id = id;
}
}
|
apache/ignite-3 | 1,141 | modules/metrics/src/main/java/org/apache/ignite/internal/metrics/MetricProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.metrics;
/**
* Read-only metrics registry.
*/
@FunctionalInterface
public interface MetricProvider {
/**
* Returns a map of (metricSetName -> metricSet) pairs with available metrics from {@link MetricRegistry}.
*
* @return Metrics snapshot.
*/
MetricSnapshot snapshot();
}
|
apache/ignite-3 | 1,148 | modules/core/src/main/java/org/apache/ignite/internal/components/LogSyncer.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.components;
/** Interface to synchronize write-ahead log. Operates only for persistent log storages. */
@FunctionalInterface
public interface LogSyncer {
/**
* Synchronizes write-ahead log.
*
* @throws Exception if an error occurs whilst syncing.
*/
void sync() throws Exception;
}
|
apache/ignite-extensions | 1,128 | modules/ml-ext/ml/src/main/java/org/apache/ignite/ml/trainers/MultiLabelDatasetTrainer.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.ml.trainers;
import org.apache.ignite.ml.IgniteModel;
/**
* Interface for trainers that trains on dataset with multiple label per object.
*
* @param <M> Type of a produced model.
*/
public abstract class MultiLabelDatasetTrainer<M extends IgniteModel> extends DatasetTrainer<M, double[]> {
}
|
apache/ignite | 1,105 | modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/exp/agg/AccumulatorWrapper.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.internal.processors.query.calcite.exec.exp.agg;
/**
*
*/
public interface AccumulatorWrapper<Row> {
/** */
void add(Row row);
/** */
Object end();
/** */
void apply(Accumulator<Row> accumulator);
/** */
Accumulator<Row> accumulator();
}
|
apache/incubator-hugegraph | 1,116 | hugegraph-store/hg-store-test/src/main/java/org/apache/hugegraph/store/core/CoreTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.store.core;
import org.junit.Assert;
import org.junit.Test;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class CoreTest {
@Test
public void testDemo() {
String s = "i am core";
log.info("UT:{}", s);
Assert.assertTrue(s.startsWith("i"));
}
}
|
apache/incubator-kie-drools | 1,112 | drools-verifier/drools-verifier-drl/src/main/java/org/drools/verifier/report/VerifierReportWriter.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.verifier.report;
import java.io.IOException;
import java.io.OutputStream;
import org.drools.verifier.data.VerifierReport;
public interface VerifierReportWriter {
public void writeReport(OutputStream out,
VerifierReport result) throws IOException;
}
|
apache/incubator-kie-drools | 1,117 | kie-drl/kie-drl-compilation-common/src/test/java/org/drools/ruleunit/example/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.drools.ruleunit.example;
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-kie-drools | 1,120 | drools-test-coverage/test-suite/src/test/java/org/drools/testcoverage/common/model/A.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.testcoverage.common.model;
public class A extends AbstractBean {
/**
* In this case id is autogenerated.
*
* @param value
*/
public A(final int value) {
super(value);
}
public A(final long id, final int value) {
super(id, value);
}
}
|
apache/incubator-kie-drools | 1,120 | drools-test-coverage/test-suite/src/test/java/org/drools/testcoverage/common/model/B.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.testcoverage.common.model;
public class B extends AbstractBean {
/**
* In this case id is autogenerated.
*
* @param value
*/
public B(final int value) {
super(value);
}
public B(final long id, final int value) {
super(id, value);
}
}
|
apache/incubator-kie-drools | 1,120 | drools-test-coverage/test-suite/src/test/java/org/drools/testcoverage/common/model/C.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.testcoverage.common.model;
public class C extends AbstractBean {
/**
* In this case id is autogenerated.
*
* @param value
*/
public C(final int value) {
super(value);
}
public C(final long id, final int value) {
super(id, value);
}
}
|
apache/incubator-kie-drools | 1,120 | drools-test-coverage/test-suite/src/test/java/org/drools/testcoverage/common/model/D.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.testcoverage.common.model;
public class D extends AbstractBean {
/**
* In this case id is autogenerated.
*
* @param value
*/
public D(final int value) {
super(value);
}
public D(final long id, final int value) {
super(id, value);
}
}
|
apache/incubator-kie-drools | 1,120 | drools-test-coverage/test-suite/src/test/java/org/drools/testcoverage/common/model/E.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.drools.testcoverage.common.model;
public class E extends AbstractBean {
/**
* In this case id is autogenerated.
*
* @param value
*/
public E(final int value) {
super(value);
}
public E(final long id, final int value) {
super(id, value);
}
}
|
apache/incubator-kie-drools | 1,134 | drools-core/src/test/java/org/drools/core/test/model/CheeseInterface.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.core.test.model;
public interface CheeseInterface {
public String getType();
public int getPrice();
/**
* @param price the price to set
*/
public void setPrice(final int price);
/**
* @param type the type to set
*/
public void setType(final String type);
}
|
apache/incubator-kie-drools | 1,139 | kie-api/src/main/java/org/kie/api/prototype/PrototypeEventInstance.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.kie.api.prototype;
import java.util.concurrent.TimeUnit;
public interface PrototypeEventInstance extends PrototypeFactInstance {
long getTimestamp();
long getExpiration();
PrototypeEventInstance withExpiration( long value, TimeUnit unit );
default boolean isEvent() {
return true;
}
}
|
apache/incubator-kie-drools | 1,151 | kie-api/src/main/java/org/kie/api/definition/type/TypeSafe.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.kie.api.definition.type;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = ElementType.TYPE)
public @interface TypeSafe {
boolean value() default true;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.