repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/james-project
1,148
protocols/managesieve/src/main/java/org/apache/james/managesieve/api/commands/LineCommands.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.james.managesieve.api.commands; /** * Commands specific to the line oriented protocol defined by RFC 5804 * * @see <a href=http://tools.ietf.org/html/rfc5804#section-1.8>RFC 5804 Transport</a> */ public interface LineCommands extends Authenticate, Unauthenticate, Logout, Noop { }
apache/jena
1,140
jena-extras/jena-serviceenhancer/src/main/java/org/apache/jena/sparql/service/enhancer/impl/OpServiceExecutor.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jena.sparql.service.enhancer.impl; import org.apache.jena.sparql.algebra.op.OpService; import org.apache.jena.sparql.engine.QueryIterator; /** Interface for directly executing {@link OpService} instances */ @FunctionalInterface public interface OpServiceExecutor { QueryIterator exec(OpService opService); }
apache/jena
1,143
jena-geosparql/src/main/java/org/apache/jena/geosparql/spatial/property_functions/cardinal/EastGeomPF.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jena.geosparql.spatial.property_functions.cardinal; import org.apache.jena.geosparql.spatial.CardinalDirection; /** * * */ public class EastGeomPF extends GenericCardinalGeomPropertyFunction { @Override protected CardinalDirection getCardinalDirection() { return CardinalDirection.EAST; } }
apache/jena
1,143
jena-geosparql/src/main/java/org/apache/jena/geosparql/spatial/property_functions/cardinal/WestGeomPF.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jena.geosparql.spatial.property_functions.cardinal; import org.apache.jena.geosparql.spatial.CardinalDirection; /** * * */ public class WestGeomPF extends GenericCardinalGeomPropertyFunction { @Override protected CardinalDirection getCardinalDirection() { return CardinalDirection.WEST; } }
apache/jena
1,164
jena-arq/src/test/java/org/apache/jena/sparql/core/mem/TestDatasetGraphInMemoryMisc.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jena.sparql.core.mem; import org.apache.jena.query.Dataset; import org.apache.jena.query.DatasetFactory; import org.apache.jena.sparql.AbstractTestAdditional; public class TestDatasetGraphInMemoryMisc extends AbstractTestAdditional { @Override protected Dataset dataset() { return DatasetFactory.createTxnMem(); } }
apache/jena
1,184
jena-tdb2/src/main/java/org/apache/jena/tdb2/store/DatasetGraphTxn.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jena.tdb2.store; import org.apache.jena.dboe.transaction.Transactional; import org.apache.jena.sparql.core.DatasetGraph; /** Transaction representation of a DatasetGraph */ public interface DatasetGraphTxn extends DatasetGraph, Transactional { // Combines org.apache.jena.dboe.transaction.Transactional and org.apache.jena.sparql.core.Transactional. }
apache/jmeter
1,168
src/core/src/main/java/org/apache/jmeter/gui/logging/GuiLogEventListener.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to you under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jmeter.gui.logging; import java.util.EventListener; /** * GUI Log Event Listener. * @since 3.2 */ @FunctionalInterface public interface GuiLogEventListener extends EventListener { /** * Process a log event object. * @param logEventObject log event object */ public void processLogEvent(LogEventObject logEventObject); }
apache/jmeter
1,171
src/protocol/junit-sample/src/main/java/test/AfterAnnotatedTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to you under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package test; import static org.junit.Assert.fail; import org.junit.After; import org.junit.Test; /** * Test to demonstrate how @After failures are handled */ public class AfterAnnotatedTest { @After public void afterFail(){ fail("afterFail()"); } @Test public void afterTest(){ // Dummy to ensure there is a test to run } }
apache/kafka
1,170
connect/api/src/test/java/org/apache/kafka/connect/storage/ConverterTypeTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.kafka.connect.storage; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; public class ConverterTypeTest { @Test public void shouldFindByName() { for (ConverterType type : ConverterType.values()) { assertEquals(type, ConverterType.withName(type.getName())); } } }
apache/kylin
1,148
src/modeling-service/src/main/java/org/apache/kylin/rest/response/AffectedModelsResponse.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.kylin.rest.response; import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Getter; import lombok.Setter; @Getter @Setter public class AffectedModelsResponse { @JsonProperty("models") private List<String> models; @JsonProperty("byte_size") private long byteSize; }
apache/kylin
1,156
src/common-service/src/main/java/org/apache/kylin/rest/request/UpdateGroupRequest.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.kylin.rest.request; import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Getter; import lombok.Setter; @Setter @Getter public class UpdateGroupRequest { @JsonProperty(value = "group_name") private String group; @JsonProperty(value = "users") private List<String> users; }
apache/lucene
1,162
lucene/monitor/src/test/org/apache/lucene/monitor/TestFieldTermFilteredPresearcher.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.lucene.monitor; import java.util.Collections; public class TestFieldTermFilteredPresearcher extends FieldFilterPresearcherComponentTestBase { @Override protected Presearcher createPresearcher() { return new TermFilteredPresearcher( TermWeightor.DEFAULT, Collections.emptyList(), Collections.singleton("language")); } }
apache/myfaces
1,166
impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TrimmedTagUnit.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.myfaces.view.facelets.compiler; import jakarta.faces.view.facelets.Tag; import org.apache.myfaces.view.facelets.tag.TagLibrary; final class TrimmedTagUnit extends TagUnit { public TrimmedTagUnit(TagLibrary library, String namespace, String name, Tag tag, String id) { super(library, namespace, name, tag, id); } }
apache/nifi
1,098
nifi-extension-bundles/nifi-aws-bundle/nifi-aws-schema-registry-service/src/main/java/org/apache/nifi/aws/schemaregistry/serde/AWSSchemaRegistryConstants.java
/* * Copyright 2020 Amazon.com, Inc. or its affiliates. * 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 org.apache.nifi.aws.schemaregistry.serde; public final class AWSSchemaRegistryConstants { public static final byte HEADER_VERSION_BYTE = 3; public static final byte COMPRESSION_BYTE = 5; public static final byte COMPRESSION_DEFAULT_BYTE = 0; public static final int HEADER_VERSION_BYTE_SIZE = 1; public static final int COMPRESSION_BYTE_SIZE = 1; public static final int SCHEMA_VERSION_ID_SIZE = 16; private AWSSchemaRegistryConstants() { } }
apache/nifi
1,135
nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/main/java/org/apache/nifi/remote/PeerDescriptionModifiable.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.nifi.remote; /** * This interface is used to determine whether a ServerProtocol implementation * can utilize peer description modification for making S2S work behind a reverse proxy. */ public interface PeerDescriptionModifiable { void setPeerDescriptionModifier(final PeerDescriptionModifier modifier); }
apache/openjpa
1,128
openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/common/apps/AppIdCacheObject.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.openjpa.persistence.datacache.common.apps; import jakarta.persistence.Entity; @Entity public class AppIdCacheObject { private int id; protected AppIdCacheObject() { } public AppIdCacheObject(int id) { this.id = id; } public int getId() { return id; } }
apache/openjpa
1,152
openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/AbsExpression.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.openjpa.persistence.query; /** * Denotes ABS() operation on a given expression. * * @author Pinaki Poddar * */ public class AbsExpression extends UnaryOperatorExpression { private static final long serialVersionUID = 1L; public AbsExpression(ExpressionImpl op) { super(op, UnaryFunctionalOperator.ABS); } }
apache/opennlp
1,186
opennlp-api/src/main/java/opennlp/tools/ml/Probabilistic.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package opennlp.tools.ml; /** * A marker interface for classes with probabilistic capabilities. */ public interface Probabilistic { /** * Retrieves the probabilities of the last decoded sequence. * * @return An array with the same number of probabilities as tokens were sent to * the computational method when it was last called. */ double[] probs(); }
apache/openwebbeans
1,126
webbeans-impl/src/test/java/org/apache/webbeans/test/component/exception/AroundInvokeWithStaticMethodComponent.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.webbeans.test.component.exception; import jakarta.interceptor.AroundInvoke; import jakarta.interceptor.InvocationContext; public class AroundInvokeWithStaticMethodComponent { @AroundInvoke public static Object method2(InvocationContext ctx) throws Exception { return null; } }
apache/openwebbeans
1,161
webbeans-impl/src/main/java/org/apache/webbeans/plugins/OpenWebBeansJmsPlugin.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.webbeans.plugins; import jakarta.enterprise.inject.spi.Bean; import org.apache.webbeans.jms.JMSModel; import org.apache.webbeans.spi.plugins.OpenWebBeansPlugin; public interface OpenWebBeansJmsPlugin extends OpenWebBeansPlugin { Bean<?> getJmsBean(JMSModel jmsModel); Object getJmsBeanProxy(Bean<?> bean, Class<?> iface); }
apache/ozone
1,156
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/upgrade/MockOmRequest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.ozone.om.upgrade; import static org.apache.hadoop.ozone.om.upgrade.OMLayoutFeature.INITIAL_VERSION; import org.apache.hadoop.ozone.om.OzoneManager; /** * Mock OM Request class for testing annotation. */ @BelongsToLayoutVersion(INITIAL_VERSION) public class MockOmRequest { public void preExecute(OzoneManager om) { } }
apache/paimon
1,173
paimon-core/src/main/java/org/apache/paimon/disk/BufferFileReader.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.paimon.disk; import org.apache.paimon.annotation.Public; import org.apache.paimon.memory.Buffer; import java.io.IOException; /** * Read {@link Buffer} from file. * * @since 0.4.0 */ @Public public interface BufferFileReader extends FileIOChannel { void readInto(Buffer buffer) throws IOException; boolean hasReachedEndOfFile(); }
apache/paimon
1,176
paimon-core/src/main/java/org/apache/paimon/privilege/EntityType.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.paimon.privilege; import org.apache.paimon.annotation.Public; /** * Entity type in privilege system. * * <p>Supports identity-based access control (grant privilege directly to user) and role-based * access control (grant privilege to role, then assign role to user). * * @since 0.8.0 */ @Public public enum EntityType { USER, ROLE }
apache/phoenix-omid
1,172
benchmarks/src/main/java/org/apache/omid/benchmarks/utils/Generator.java
/** * Copyright (c) 2010 Yahoo! Inc. All rights reserved. * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.omid.benchmarks.utils; /** * An expression that generates a sequence of string values, following some distribution (Uniform, Zipfian, Sequential, etc.) */ public abstract class Generator { /** * Generate the next string in the distribution * @return next String */ public abstract String nextString(); /** * Return the previous string generated by the distribution; e.g., returned from the last nextString() call. * Calling lastString() should not advance the distribution or have any side effects. If nextString() has not yet * been called, lastString() should return something reasonable * @return last string */ public abstract String lastString(); }
apache/pig
1,198
test/org/apache/pig/test/FakeFSOutputStream.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.pig.test; import java.io.IOException; import java.io.OutputStream; public class FakeFSOutputStream extends OutputStream { private byte data[]; private long off = 0; public FakeFSOutputStream(byte[] buf) { data = buf; } @Override public void write(int b) throws IOException { data[(int)off] = (byte)b; off++; } }
apache/plc4x
1,134
plc4j/drivers/open-protocol/src/main/java/org/apache/plc4x/java/openprotocol/config/OpenProtocolConfiguration.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.plc4x.java.openprotocol.config; import org.apache.plc4x.java.spi.configuration.PlcConnectionConfiguration; public class OpenProtocolConfiguration implements PlcConnectionConfiguration { @Override public String toString() { return "OpenProtocolConfiguration{" + '}'; } }
apache/plc4x
1,142
plc4j/drivers/firmata/src/test/java/org/apache/plc4x/java/firmata/readwrite/FirmataParserSerializerTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.plc4x.java.firmata.readwrite; import org.apache.plc4x.test.parserserializer.ParserSerializerTestsuiteRunner; public class FirmataParserSerializerTest extends ParserSerializerTestsuiteRunner { public FirmataParserSerializerTest() { super("/protocols/firmata/ParserSerializerTestsuite.xml"); } }
apache/polygene-java
1,122
libraries/sql-generator/src/main/java/org/apache/polygene/library/sql/generator/grammar/booleans/IsNotNullPredicate.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * */ package org.apache.polygene.library.sql.generator.grammar.booleans; /** * The interface for syntax element representing test for something being not {@code NULL} (x {@code IS NOT NULL}). * * @author Stanislav Muhametsin */ public interface IsNotNullPredicate extends UnaryPredicate { }
apache/polygene-java
1,123
libraries/sql-generator/src/main/java/org/apache/polygene/library/sql/generator/grammar/booleans/LessThanPredicate.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * */ package org.apache.polygene.library.sql.generator.grammar.booleans; /** * The interface for syntax element representing the test of left value being less than right value (x {@code <} y). * * @author Stanislav Muhametsin */ public interface LessThanPredicate extends BinaryPredicate { }
apache/polygene-java
1,156
libraries/rest/src/test/java/org/apache/polygene/library/rest/admin/TestValue2.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * */ package org.apache.polygene.library.rest.admin; import org.apache.polygene.api.common.UseDefaults; import org.apache.polygene.api.property.Property; import org.apache.polygene.api.value.ValueComposite; /** * JAVADOC */ public interface TestValue2 extends ValueComposite { @UseDefaults Property<String> string(); }
apache/pulsar
1,130
tests/integration/src/test/java/org/apache/pulsar/tests/integration/functions/python/PulsarFunctionsPythonProcessTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.pulsar.tests.integration.functions.python; import org.apache.pulsar.tests.integration.topologies.FunctionRuntimeType; public class PulsarFunctionsPythonProcessTest extends PulsarFunctionsPythonTest { public PulsarFunctionsPythonProcessTest() { super(FunctionRuntimeType.PROCESS); } }
apache/pulsar
1,143
pulsar-client-admin-api/src/main/java/org/apache/pulsar/client/admin/GrantTopicPermissionOptions.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.pulsar.client.admin; import java.util.Set; import lombok.Builder; import lombok.Data; import org.apache.pulsar.common.policies.data.AuthAction; @Data @Builder public class GrantTopicPermissionOptions { private final String topic; private final String role; private final Set<AuthAction> actions; }
apache/pulsar
1,157
pulsar-proxy/src/main/java/org/apache/pulsar/proxy/extensions/ExtensionsDefinitions.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.pulsar.proxy.extensions; import java.util.Map; import java.util.TreeMap; import lombok.Data; import lombok.experimental.Accessors; /** * The collection of Proxy Extensions. */ @Data @Accessors(fluent = true) class ExtensionsDefinitions { private final Map<String, ProxyExtensionMetadata> extensions = new TreeMap<>(); }
apache/qpid-broker-j
1,117
broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/transport/AMQProtocolHeaderException.java
/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.qpid.server.protocol.v0_8.transport; import org.apache.qpid.server.transport.TransportException; public class AMQProtocolHeaderException extends TransportException { public AMQProtocolHeaderException(String message, Throwable cause) { super(message, cause); } }
apache/qpid-broker-j
1,140
broker-core/src/main/java/org/apache/qpid/server/protocol/converter/MessageConversionException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.qpid.server.protocol.converter; public class MessageConversionException extends RuntimeException { public MessageConversionException(final String msg) { super(msg); } public MessageConversionException(final String msg, final Throwable cause) { super(msg, cause); } }
apache/ratis
1,175
ratis-common/src/main/java/org/apache/ratis/util/function/CheckedFunction.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ratis.util.function; /** Function with a throws-clause. */ @FunctionalInterface public interface CheckedFunction<INPUT, OUTPUT, THROWABLE extends Throwable> { /** * The same as {@link java.util.function.Function#apply(Object)} * except that this method is declared with a throws-clause. */ OUTPUT apply(INPUT input) throws THROWABLE; }
apache/reef
1,135
lang/java/reef-runtime-azbatch/src/main/java/org/apache/reef/runtime/azbatch/parameters/AzureStorageAccountName.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.reef.runtime.azbatch.parameters; import org.apache.reef.tang.annotations.Name; import org.apache.reef.tang.annotations.NamedParameter; /** * The Azure Storage account name. */ @NamedParameter(doc = "The Azure Storage account name.") public final class AzureStorageAccountName implements Name<String> { }
apache/reef
1,144
lang/java/reef-io/src/main/java/org/apache/reef/io/network/naming/parameters/NameResolverRetryCount.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.reef.io.network.naming.parameters; import org.apache.reef.tang.annotations.Name; import org.apache.reef.tang.annotations.NamedParameter; @NamedParameter(doc = "How many times should I retry?", short_name = "retryCount", default_value = "10") public final class NameResolverRetryCount implements Name<Integer> { }
apache/reef
1,154
lang/java/reef-tests/src/test/java/org/apache/reef/tests/applications/ApplicationTestSuite.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.reef.tests.applications; import org.apache.reef.tests.applications.vortex.VortexTestSuite; import org.junit.runner.RunWith; import org.junit.runners.Suite; /** * Test suite of all application tests. */ @RunWith(Suite.class) @Suite.SuiteClasses({ VortexTestSuite.class }) public final class ApplicationTestSuite { }
apache/rocketmq-eventbridge
1,146
common/src/main/java/org/apache/rocketmq/eventbridge/tools/transform/TemplateBuilder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.rocketmq.eventbridge.tools.transform; public class TemplateBuilder { /** * Build StringSubstitutorTemplate * * @param template * @return */ public static StringSubstitutorTemplate stringSubstitutorTemplate(String template) { return new StringSubstitutorTemplate(template); } }
apache/royale-compiler
1,164
debugger/src/main/java/flash/tools/debugger/PlayerDebugException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package flash.tools.debugger; /** * PlayerDebugException is the base class for all * exceptions thrown by the playerdebug API */ public class PlayerDebugException extends Exception { private static final long serialVersionUID = 757986761482127248L; public PlayerDebugException() { super(); } public PlayerDebugException(String s) { super(s); } }
apache/seatunnel
1,113
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/exception/TaskGroupContextNotFoundException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.seatunnel.engine.server.exception; import org.apache.seatunnel.engine.common.exception.SeaTunnelEngineException; public class TaskGroupContextNotFoundException extends SeaTunnelEngineException { public TaskGroupContextNotFoundException(String message) { super(message); } }
apache/servicecomb-java-chassis
1,094
swagger/swagger-generator/generator-jaxrs/src/test/java/org/apache/servicecomb/swagger/generator/jaxrs/model/enums/JdkStatusBeanParam.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.swagger.generator.jaxrs.model.enums; import io.swagger.v3.oas.annotations.Parameter; import jakarta.ws.rs.QueryParam; public class JdkStatusBeanParam { @Parameter(description = "jdk desc aggr") @QueryParam("status-aggr") public JdkStatus queryStatus; }
apache/servicecomb-java-chassis
1,112
providers/provider-springmvc/src/main/java/org/apache/servicecomb/provider/springmvc/reference/AcceptableRestTemplate.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.provider.springmvc.reference; import java.net.URI; import org.springframework.web.client.RestTemplate; public abstract class AcceptableRestTemplate extends RestTemplate { public abstract boolean isAcceptable(String uri); public abstract boolean isAcceptable(URI uri); }
apache/servicecomb-samples
1,130
porter/file-service/src/main/java/org/apache/servicecomb/samples/porter/file/service/FileStoreService.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.samples.porter.file.service; import org.springframework.web.multipart.MultipartFile; /** * file storage service, can implement using file system, OBS, etc. */ public interface FileStoreService { public String uploadFile(MultipartFile file); public boolean deleteFile(String id); }
apache/skywalking-java
1,080
test/plugin/scenarios/shardingsphere-3.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/shardingsphere/service/utility/config/ExampleConfiguration.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.apm.testcase.shardingsphere.service.utility.config; import java.sql.SQLException; import javax.sql.DataSource; public interface ExampleConfiguration { DataSource createDataSource() throws SQLException; DataSource getDataSource(); }
apache/skywalking-java
1,080
test/plugin/scenarios/shardingsphere-4.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/shardingsphere/service/utility/config/ExampleConfiguration.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.apm.testcase.shardingsphere.service.utility.config; import java.sql.SQLException; import javax.sql.DataSource; public interface ExampleConfiguration { DataSource createDataSource() throws SQLException; DataSource getDataSource(); }
apache/skywalking
1,104
oap-server/server-receiver-plugin/aws-firehose-receiver/src/main/java/org/apache/skywalking/oap/server/receiver/aws/firehose/FirehoseRes.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.skywalking.oap.server.receiver.aws.firehose; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; @Getter @Setter @AllArgsConstructor public class FirehoseRes { private String requestId; private Long timestamp; private String errorMessage; }
apache/skywalking
1,121
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/input/ContinuousProfilingPolicyCreation.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.oap.server.core.query.input; import lombok.Data; import java.util.List; @Data public class ContinuousProfilingPolicyCreation { // service of the policy private String serviceId; // target of the policy private List<ContinuousProfilingPolicyTargetCreation> targets; }
apache/skywalking
1,138
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/storage/model/ModelManipulator.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.oap.server.core.storage.model; import org.apache.skywalking.oap.server.library.module.Service; /** * Override service provides ways to rename the existing column or table name. */ public interface ModelManipulator extends Service { void overrideColumnName(String columnName, String newName); }
apache/skywalking
1,141
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/type/HealthStatus.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.oap.server.core.query.type; import lombok.Getter; import lombok.Setter; import lombok.ToString; @Getter @Setter @ToString public class HealthStatus { // score == 0 means healthy and no unhealthy component or connection, otherwise it's unhealthy. private int score; private String details; }
apache/skywalking
1,141
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/type/LogEntity.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.oap.server.core.query.type; import java.util.ArrayList; import java.util.List; import lombok.Getter; import lombok.Setter; @Getter public class LogEntity { @Setter private long time; private final List<KeyValue> data; public LogEntity() { this.data = new ArrayList<>(); } }
apache/storm
1,170
storm-core/src/jvm/org/apache/storm/testing/staticmocking/MockedSupervisorUtils.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version * 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package org.apache.storm.testing.staticmocking; import org.apache.storm.daemon.supervisor.SupervisorUtils; public class MockedSupervisorUtils implements AutoCloseable { public MockedSupervisorUtils(SupervisorUtils inst) { SupervisorUtils.setInstance(inst); } @Override public void close() throws Exception { SupervisorUtils.resetInstance(); } }
apache/storm
1,178
storm-client/src/jvm/org/apache/storm/trident/fluent/GlobalAggregationScheme.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version * 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package org.apache.storm.trident.fluent; import org.apache.storm.trident.operation.impl.SingleEmitAggregator.BatchToPartition; public interface GlobalAggregationScheme<S extends IAggregatableStream> { IAggregatableStream aggPartition(S stream); // how to partition for second stage of aggregation BatchToPartition singleEmitPartitioner(); // return null if it's not single emit }
apache/storm
1,184
storm-client/src/jvm/org/apache/storm/utils/MutableInt.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version * 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package org.apache.storm.utils; public class MutableInt { int val; public MutableInt(int val) { this.val = val; } public void set(int val) { this.val = val; } public int get() { return val; } public int increment() { return increment(1); } public int increment(int amt) { val += amt; return val; } }
apache/streampipes
1,130
streampipes-resource-management/src/main/java/org/apache/streampipes/resource/management/secret/SecretProvider.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.streampipes.resource.management.secret; public class SecretProvider { public static SecretService getEncryptionService() { return new SecretService(new SecretEncrypter()) { }; } public static SecretService getDecryptionService() { return new SecretService(new SecretDecrypter()); } }
apache/streampipes
1,154
streampipes-messaging/src/main/java/org/apache/streampipes/messaging/EventProducer.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.streampipes.messaging; import org.apache.streampipes.commons.exceptions.SpRuntimeException; import java.io.Serializable; public interface EventProducer extends Serializable { void connect() throws SpRuntimeException; void publish(byte[] event); void disconnect() throws SpRuntimeException; boolean isConnected(); }
apache/synapse
1,137
modules/securevault/src/main/java/org/apache/synapse/securevault/secret/mbean/SecretManagerAdminMBean.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.synapse.securevault.secret.mbean; /** * Admin service for managing SecretManager */ public interface SecretManagerAdminMBean { /** * Initialize the SecretManager */ public void init(); /** * Shutting Down the SecretManager */ public void shutDown(); }
apache/synapse
1,169
modules/samples/services/EJBSampleBeans/src/samples/ejb/ShoppingCart.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package samples.ejb; import javax.ejb.Remote; /** * The remote interface of the ShoppingCart stateful session bean: defines methods that can be * remotely invoked on the EJB. */ @Remote public interface ShoppingCart { public void addItem(String itemId, int count); public float getTotal(); public int getItemCount(); }
apache/syncope
1,157
common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/report/SearchCondition.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.syncope.common.lib.report; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target({ ElementType.FIELD }) @Retention(RetentionPolicy.RUNTIME) public @interface SearchCondition { String type() default "USER"; }
apache/tajo
1,151
tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/storage/NumericPathComparator.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tajo.storage; import org.apache.hadoop.fs.Path; import java.util.Comparator; public class NumericPathComparator implements Comparator<Path> { @Override public int compare(Path p1, Path p2) { int num1 = Integer.parseInt(p1.getName()); int num2 = Integer.parseInt(p2.getName()); return num1 - num2; } }
apache/tajo
1,168
tajo-core/src/main/java/org/apache/tajo/master/event/StageEventType.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tajo.master.event; /** * Event Types handled by Stage */ public enum StageEventType { // Producer: Query SQ_INIT, SQ_START, SQ_KILL, // Producer: Task SQ_TASK_COMPLETED, SQ_FAILED, // Producer: Stage SQ_SHUFFLE_REPORT, SQ_STAGE_COMPLETED, // Producer: Any component SQ_DIAGNOSTIC_UPDATE, SQ_INTERNAL_ERROR }
apache/tapestry-5
1,146
tapestry-core/src/test/java/org/apache/tapestry5/internal/services/AddTransformPagesToCISModule.java
package org.apache.tapestry5.internal.services; import org.apache.tapestry5.commons.Configuration; import org.apache.tapestry5.commons.MappedConfiguration; import org.apache.tapestry5.ioc.annotations.Contribute; import org.apache.tapestry5.services.ComponentClassResolver; import org.apache.tapestry5.services.LibraryMapping; import org.apache.tapestry5.services.transform.ControlledPackageType; public class AddTransformPagesToCISModule { @Contribute(ComponentInstantiatorSource.class) public static void setupPackageForReload(MappedConfiguration<String, ControlledPackageType> configuration) { configuration.add("org.apache.tapestry5.internal.transform.pages", ControlledPackageType.COMPONENT); } /** * There used to be a t5internal module used for some tests and such, but that was refactored out in 5.4. Some * tests rely on it though. */ @Contribute(ComponentClassResolver.class) public static void setupT5InternalLibrary(Configuration<LibraryMapping> configuration) { configuration.add(new LibraryMapping("t5internal", "org.apache.tapestry5.internal.t5internal")); } }
apache/tika
1,066
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/onenote/fsshttpb/streamobj/EncryptionObject.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tika.parser.microsoft.onenote.fsshttpb.streamobj; /** * The class is used to represent the encryption revision store object. */ class EncryptionObject { public ObjectGroupObjectDeclare objectDeclaration; public byte[] objectData; }
apache/tomcat80
1,184
java/org/apache/catalina/tribes/group/InterceptorPayload.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.catalina.tribes.group; import org.apache.catalina.tribes.ErrorHandler; /** * @version 1.0 */ public class InterceptorPayload { private ErrorHandler errorHandler; public ErrorHandler getErrorHandler() { return errorHandler; } public void setErrorHandler(ErrorHandler errorHandler) { this.errorHandler = errorHandler; } }
apache/tomcat80
1,199
java/javax/persistence/PersistenceUnit.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES 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.persistence; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD}) @Retention(RetentionPolicy.RUNTIME) public @interface PersistenceUnit { String name() default ""; String unitName() default ""; }
apache/tomcat80
1,210
java/javax/el/Expression.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES 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.el; import java.io.Serializable; /** * */ public abstract class Expression implements Serializable { private static final long serialVersionUID = -6663767980471823812L; public abstract String getExpressionString(); @Override public abstract boolean equals(Object obj); @Override public abstract int hashCode(); public abstract boolean isLiteralText(); }
apache/tomee
1,108
arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cdi/inject/Car.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.openejb.arquillian.tests.cdi.inject; public class Car { private final String make = "Lexus", model = "IS 350"; private final int year = 2011; public String drive(String name) { return name + " is on the wheel of a " + year + " " + make + " " + model; } }
apache/tomee
1,152
container/openejb-core/src/test/java/org/apache/openejb/core/cmp/jpa/GeneratedStandalone.java
/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.openejb.core.cmp.jpa; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; @Entity public class GeneratedStandalone { @Id @GeneratedValue public Long id; public GeneratedStandalone() { } public Object getId() { return id; } }
apache/tomee
1,160
container/openejb-core/src/test/java/org/apache/openejb/mbeans/ReaderDescription.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.openejb.mbeans; import org.apache.openejb.api.jmx.Description; import org.apache.openejb.api.jmx.MBean; import org.apache.openejb.api.jmx.ManagedAttribute; @MBean @Description("descr ;)") public class ReaderDescription { @ManagedAttribute @Description("just a value") public int getValue() { return 2; } }
apache/tomee
1,161
container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodInfo.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.openejb.assembler.classic; import java.util.List; public class MethodInfo extends InfoObject { public String description; public String ejbDeploymentId; // TODO: Kill this public String ejbName; public String methodIntf; public String methodName; public List<String> methodParams; public String className; }
apache/tomee
1,161
container/openejb-core/src/main/java/org/apache/openejb/core/cmp/cmp2/Cmp2KeyGenerator.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.openejb.core.cmp.cmp2; import org.apache.openejb.core.cmp.KeyGenerator; import jakarta.ejb.EntityBean; public class Cmp2KeyGenerator implements KeyGenerator { public Object getPrimaryKey(final EntityBean entity) { final Cmp2Entity cmp2Entity = (Cmp2Entity) entity; return cmp2Entity.OpenEJB_getPrimaryKey(); } }
apache/uniffle
1,147
coordinator/src/main/java/org/apache/uniffle/coordinator/strategy/host/BasicHostAssignmentStrategy.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.uniffle.coordinator.strategy.host; import java.util.List; import org.apache.uniffle.coordinator.ServerNode; public class BasicHostAssignmentStrategy implements HostAssignmentStrategy { @Override public List<ServerNode> assign(List<ServerNode> allNodes, int expectNum) { return allNodes.subList(0, expectNum); } }
apache/unomi
1,147
persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ESEventMixIn.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.unomi.persistence.elasticsearch; import com.fasterxml.jackson.annotation.JsonIgnore; /** * This mixin is used in ESCustomObjectMapper to prevent the persistent parameter from being registered in ES */ public abstract class ESEventMixIn { public ESEventMixIn() { } @JsonIgnore abstract boolean isPersistent(); }
apache/wicket
1,135
wicket-core-tests/src/test/java/org/apache/wicket/markupFragments/MyPanelWithAutoComponentPage.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.wicket.markupFragments; import org.apache.wicket.markup.html.WebPage; /** * */ public class MyPanelWithAutoComponentPage extends WebPage { private static final long serialVersionUID = 1L; /** * Construct. */ public MyPanelWithAutoComponentPage() { add(new MyPanelWithAutoComponent("panel")); } }
apache/wicket
1,136
wicket-core-tests/src/test/java/org/apache/wicket/markup/html/header/threelayers/AbstractBasePage.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.wicket.markup.html.header.threelayers; import org.apache.wicket.markup.html.WebPage; /** * @author Martijn Dashorst */ public abstract class AbstractBasePage extends WebPage { /** For serialization. */ private static final long serialVersionUID = 1L; /** * Construct. */ AbstractBasePage() { } }
apache/wicket
1,138
wicket-core-tests/src/test/java/org/apache/wicket/markup/html/MarkupInheritanceResolverTestPage2.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.wicket.markup.html; import org.apache.wicket.markup.html.basic.Label; /** */ public class MarkupInheritanceResolverTestPage2 extends MarkupInheritanceResolverTestPage1 { private static final long serialVersionUID = 1L; /** */ MarkupInheritanceResolverTestPage2() { add(new Label("test2", "test2")); } }
apache/wicket
1,160
wicket-core/src/main/java/org/apache/wicket/IBehaviorInstantiationListener.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.wicket; import org.apache.wicket.behavior.Behavior; /** * Allows applications to intercept behavior instantiation * * @author igor */ @FunctionalInterface public interface IBehaviorInstantiationListener { /** * Called when a behavior instance is created * * @param behavior */ void onInstantiation(Behavior behavior); }
apache/xmlgraphics-batik
1,163
batik-bridge/src/main/java/org/apache/batik/bridge/Viewport.java
/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.apache.batik.bridge; /** * Defines a viewport. * * @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a> * @version $Id$ */ public interface Viewport { /** * Returns the width of this viewport. */ float getWidth(); /** * Returns the height of this viewport. */ float getHeight(); }
apache/xmlgraphics-fop
1,160
fop-core/src/test/java/org/apache/fop/complexscripts/bidi/BidiTestSuite.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* $Id$ */ package org.apache.fop.complexscripts.bidi; import org.junit.runner.RunWith; import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; /** * Test suite for bidirectional functionality. */ @RunWith(Suite.class) @SuiteClasses({ BidiClassTestCase.class, BidiAlgorithmTestCase.class }) public class BidiTestSuite { }
google/auto
1,161
value/src/main/java/com/google/auto/value/extension/serializable/SerializableAutoValue.java
/* * Copyright 2020 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.auto.value.extension.serializable; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Annotates {@link com.google.auto.value.AutoValue @AutoValue} classes that implement {@link * java.io.Serializable}. A serializable subclass is generated for classes with normally * un-serializable fields like {@link java.util.Optional}. */ @Retention(RetentionPolicy.SOURCE) @Target(ElementType.TYPE) public @interface SerializableAutoValue {}
google/bindiff
1,153
java/zylib/src/main/java/com/google/security/zynamics/zylib/gui/zygraph/EdgeHidingMode.java
// Copyright 2011-2024 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. package com.google.security.zynamics.zylib.gui.zygraph; public enum EdgeHidingMode { HIDE_NEVER, HIDE_ALWAYS, HIDE_ON_THRESHOLD; public static EdgeHidingMode parseInt(final int edgeHidingMode) { if (edgeHidingMode == HIDE_NEVER.ordinal()) { return HIDE_NEVER; } else if (edgeHidingMode == HIDE_ALWAYS.ordinal()) { return HIDE_ALWAYS; } else if (edgeHidingMode == HIDE_ON_THRESHOLD.ordinal()) { return HIDE_ON_THRESHOLD; } else { throw new IllegalStateException("Error: Invalid edge hiding mode"); } } }
google/binnavi
1,157
src/main/java/com/google/security/zynamics/binnavi/API/debug/DebuggerReadMemoryReply.java
// Copyright 2011-2016 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.security.zynamics.binnavi.API.debug; import com.google.security.zynamics.binnavi.API.disassembly.Address; import com.google.security.zynamics.binnavi.debug.connection.packets.replies.ReadMemoryReply; public class DebuggerReadMemoryReply extends DebuggerReply { public DebuggerReadMemoryReply(final ReadMemoryReply reply) { super(reply); } public Address getAddress() { return new Address(((ReadMemoryReply) reply).getAddress().toBigInteger()); } public byte[] getData() { return ((ReadMemoryReply) reply).getData(); } }
google/closure-stylesheets
1,168
src/com/google/common/css/compiler/ast/CssKeyListNode.java
/* * Copyright 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.common.css.compiler.ast; /** * A list of nodes that contains only keys (for keyframes). * This list is used to apply the same style to different positions in an * animation. * For example: <code>0%, 33.3%</code> * * @author fbenz@google.com (Florian Benz) */ public class CssKeyListNode extends CssNodesListNode<CssKeyNode> { public CssKeyListNode() { super(false); } public CssKeyListNode(CssKeyListNode node) { super(node); } @Override public CssKeyListNode deepCopy() { return new CssKeyListNode(this); } }
google/copybara
1,190
java/com/google/copybara/git/GerritEventTrigger.java
/* * Copyright (C) 2022 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.copybara.git; import com.google.auto.value.AutoValue; import com.google.common.collect.ImmutableSet; import com.google.copybara.git.gerritapi.GerritEventType; /** * A simple pair to express Gerrit Events with arbitrary subtypes (Labels) */ @AutoValue public abstract class GerritEventTrigger { public abstract GerritEventType type(); public abstract ImmutableSet<String> subtypes(); public static GerritEventTrigger create(GerritEventType type, Iterable<String> subtypes) { return new AutoValue_GerritEventTrigger(type, ImmutableSet.copyOf(subtypes)); } }
google/depan
1,162
DepanPlatformUI/prod/src/com/google/devtools/depan/platform/InverseSorter.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.platform; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerComparator; /** * Reverse the collation order for an existing comparator. * * @author <a href="leeca@google.com">Lee Carver</a> */ public class InverseSorter extends ViewerComparator { private ViewerComparator sorter; public InverseSorter(ViewerComparator sorter) { this.sorter = sorter; } @Override public int compare(Viewer viewer, Object e1, Object e2) { return - sorter.compare(viewer, e1, e2); } }
google/gdata-java-client
1,186
java/sample/gbase/cmdline/BatchCommand.java
/* Copyright (c) 2006 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 sample.gbase.cmdline; import com.google.gdata.client.Service; /** * Execute batch operations. * This command is called from {@link sample.gbase.cmdline.CustomerTool}. */ class BatchCommand extends Command { public void execute() throws Exception { Service service = createService(); Service.GDataRequest request = service.createBatchRequest( fixEditUrl(urlFactory.getItemsBatchFeedURL())); inputRawRequest(request); // Send the request (HTTP POST) request.execute(); // Save the response outputRawResponse(request); } }
google/j2cl
1,127
transpiler/javatests/com/google/j2cl/readable/java/xplatforeach/fakes/com/google/gwt/corp/collections/JsArray.java
/* * Copyright 2024 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.google.gwt.corp.collections; import jsinterop.annotations.JsOverlay; import jsinterop.annotations.JsPackage; import jsinterop.annotations.JsProperty; import jsinterop.annotations.JsType; @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Array") public class JsArray<T> { @JsProperty(name = "length") public native int size(); @JsOverlay public final Iterable<T> getIterable() { throw new AssertionError(); } @JsOverlay public final T get(int index) { throw new AssertionError(); } }
google/j2objc
1,158
translator/src/main/java/com/google/devtools/j2objc/ast/MarkerAnnotation.java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.devtools.j2objc.ast; /** * Node type for an annotation without any parameters. */ public class MarkerAnnotation extends Annotation { public MarkerAnnotation() {} public MarkerAnnotation(MarkerAnnotation other) { super(other); } @Override public Kind getKind() { return Kind.MARKER_ANNOTATION; } @Override protected void acceptInner(TreeVisitor visitor) { if (visitor.visit(this)) { typeName.accept(visitor); } visitor.endVisit(this); } @Override public MarkerAnnotation copy() { return new MarkerAnnotation(this); } }
google/nomulus
1,185
core/src/main/java/google/registry/model/mark/MarkAddress.java
// Copyright 2017 The Nomulus Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package google.registry.model.mark; import google.registry.model.eppcommon.Address; /** * Mark Holder/Owner Address * * <p>This class is embedded inside {@link CommonMarkContactFields} hold the address of a mark * contact or holder. The fields are all defined in parent class {@link Address}, but the subclass * is still necessary to pick up the mark namespace. * * @see CommonMarkContactFields */ public class MarkAddress extends Address { /** Builder for {@link MarkAddress}. */ public static class Builder extends Address.Builder<MarkAddress> {} }
google/santa-tracker-android
1,134
doodles-lib/src/main/java/com/google/android/apps/santatracker/doodles/shared/WaitProcess.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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.android.apps.santatracker.doodles.shared; /** A process which just waits for the specified amount of time. */ public class WaitProcess extends Process { private long elapsedMs; private long durationMs; public WaitProcess(long durationMs) { this.durationMs = durationMs; this.elapsedMs = 0; } @Override public void updateLogic(float deltaMs) { elapsedMs += deltaMs; } @Override public boolean isFinished() { return elapsedMs >= durationMs; } }
googleapis/google-cloud-java
1,061
java-contact-center-insights/proto-google-cloud-contact-center-insights-v1/src/main/java/com/google/cloud/contactcenterinsights/v1/BulkDownloadFeedbackLabelsResponseOrBuilder.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/contactcenterinsights/v1/contact_center_insights.proto // Protobuf Java Version: 3.25.8 package com.google.cloud.contactcenterinsights.v1; public interface BulkDownloadFeedbackLabelsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse) com.google.protobuf.MessageOrBuilder {}
googleapis/google-cloud-java
1,061
java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/LoadSnapshotResponseOrBuilder.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/orchestration/airflow/service/v1beta1/environments.proto // Protobuf Java Version: 3.25.8 package com.google.cloud.orchestration.airflow.service.v1beta1; public interface LoadSnapshotResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse) com.google.protobuf.MessageOrBuilder {}
googlearchive/gwt-google-apis
1,157
gadgets/gadgets/src/com/google/gwt/gadgets/client/NeedsAnalytics.java
/* * Copyright 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.gwt.gadgets.client; import com.google.gwt.gadgets.client.GadgetFeature.FeatureName; /** * Indicates that a Gadget requires the Google Analytics feature. * * @deprecated {@link NeedsGoogleAnalytics} */ @FeatureName("analytics") @Deprecated public interface NeedsAnalytics { /** * Entry point that gets called back to handle analytics feature * initialization. * * @param feature an instance of the feature to use to invoke feature specific * methods. */ void initializeFeature(AnalyticsFeature feature); }
googlearchive/leanback-showcase
1,119
app/src/main/java/android/support/v17/leanback/supportleanbackshowcase/app/room/network/PermissionLiveData.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.network; import android.arch.lifecycle.MutableLiveData; import android.support.annotation.MainThread; public class PermissionLiveData { private static MutableLiveData<Boolean> sPermissionLiveData; @MainThread public static MutableLiveData<Boolean> get() { if (sPermissionLiveData == null) { sPermissionLiveData = new MutableLiveData<>() ; } return sPermissionLiveData; } }
hibernate/hibernate-orm
1,115
hibernate-core/src/test/java/org/hibernate/orm/test/jpa/xml/Article.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.jpa.xml; import jakarta.persistence.CascadeType; import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; /** * @author Emmanuel Bernard */ @Entity @Table(name = "ITEM") @org.hibernate.annotations.BatchSize(size = 10) public class Article { private Integer id; private String name; private Article nextArticle; @Id @GeneratedValue public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } @Column(name="poopoo") public String getName() { return name; } public void setName(String name) { this.name = name; } @ManyToOne(cascade = CascadeType.ALL) @JoinColumn(name = "NEXT_MESSAGE_ID") public Article getNextArticle() { return nextArticle; } public void setNextArticle(Article nextArticle) { this.nextArticle = nextArticle; } }
hibernate/hibernate-orm
1,120
hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SimpleSqmRenderContext.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.query.sqm.internal; import org.hibernate.query.sqm.tree.SqmRenderContext; import org.hibernate.query.sqm.tree.expression.JpaCriteriaParameter; import org.hibernate.query.sqm.tree.from.SqmFrom; import java.util.IdentityHashMap; public class SimpleSqmRenderContext implements SqmRenderContext { private final IdentityHashMap<SqmFrom<?, ?>, String> fromAliases = new IdentityHashMap<>(); private final IdentityHashMap<JpaCriteriaParameter<?>, String> parameterNames = new IdentityHashMap<>(); private int fromId; private int parameterId; public SimpleSqmRenderContext() { } @Override public String resolveAlias(SqmFrom<?, ?> from) { final String explicitAlias = from.getExplicitAlias(); return explicitAlias == null ? fromAliases.computeIfAbsent( from, f -> "alias_" + (fromId++) ) : explicitAlias; } @Override public String resolveParameterName(JpaCriteriaParameter<?> parameter) { return parameterNames.computeIfAbsent( parameter, p -> "__param_" + (parameterId++) ); } }
hibernate/hibernate-reactive
1,099
hibernate-reactive-core/src/main/java/org/hibernate/reactive/sql/results/graph/ReactiveDomainResultsAssembler.java
/* Hibernate, Relational Persistence for Idiomatic Java * * SPDX-License-Identifier: Apache-2.0 * Copyright: Red Hat Inc. and Hibernate Authors */ package org.hibernate.reactive.sql.results.graph; import java.util.concurrent.CompletionStage; import org.hibernate.Incubating; import org.hibernate.reactive.sql.exec.spi.ReactiveRowProcessingState; import org.hibernate.sql.results.graph.DomainResultAssembler; import org.hibernate.sql.results.jdbc.spi.JdbcValuesSourceProcessingOptions; import org.hibernate.sql.results.jdbc.spi.RowProcessingState; @Incubating public interface ReactiveDomainResultsAssembler<J> extends DomainResultAssembler<J> { CompletionStage<J> reactiveAssemble( ReactiveRowProcessingState rowProcessingState, JdbcValuesSourceProcessingOptions options); /** * Convenience form of {@link #assemble(RowProcessingState)} */ default CompletionStage<J> reactiveAssemble(ReactiveRowProcessingState rowProcessingState) { return reactiveAssemble( rowProcessingState, rowProcessingState.getJdbcValuesSourceProcessingState().getProcessingOptions() ); } }
hibernate/hibernate-search
1,087
backend/lucene/src/main/java/org/hibernate/search/backend/lucene/lowlevel/aggregation/collector/impl/CountDocuemntsCollectorFactory.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.backend.lucene.lowlevel.aggregation.collector.impl; import java.io.IOException; import org.hibernate.search.backend.lucene.lowlevel.collector.impl.CollectorExecutionContext; import org.hibernate.search.backend.lucene.lowlevel.collector.impl.CollectorFactory; import org.hibernate.search.backend.lucene.lowlevel.collector.impl.CollectorKey; public class CountDocuemntsCollectorFactory implements CollectorFactory<CountDocumentsCollector, Long, CountDocumentsCollectorManager> { private final CollectorKey<CountDocumentsCollector, Long> key = CollectorKey.create(); public static CountDocuemntsCollectorFactory instance() { return new CountDocuemntsCollectorFactory(); } @Override public CountDocumentsCollectorManager createCollectorManager(CollectorExecutionContext context) throws IOException { return new CountDocumentsCollectorManager(); } @Override public CollectorKey<CountDocumentsCollector, Long> getCollectorKey() { return key; } }
hibernate/hibernate-search
1,099
documentation/src/test/java/org/hibernate/search/documentation/mapper/orm/binding/fieldtypes/dsl/simple/Book.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.documentation.mapper.orm.binding.fieldtypes.dsl.simple; import jakarta.persistence.Convert; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; import org.hibernate.search.documentation.testsupport.data.ISBN; import org.hibernate.search.documentation.testsupport.data.ISBNAttributeConverter; import org.hibernate.search.mapper.pojo.bridge.mapping.annotation.PropertyBinderRef; import org.hibernate.search.mapper.pojo.mapping.definition.annotation.Indexed; import org.hibernate.search.mapper.pojo.mapping.definition.annotation.PropertyBinding; @Entity @Indexed public class Book { @Id @GeneratedValue private Integer id; @Convert(converter = ISBNAttributeConverter.class) @PropertyBinding(binder = @PropertyBinderRef(type = ISBNBinder.class)) private ISBN isbn; public Integer getId() { return id; } public ISBN getIsbn() { return isbn; } public void setIsbn(ISBN isbn) { this.isbn = isbn; } }