repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/kafka
1,116
clients/src/main/java/org/apache/kafka/common/Metric.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.kafka.common; /** * A metric tracked for monitoring purposes. */ public interface Metric { /** * A name for this metric */ MetricName metricName(); /** * The value of the metric, which may be measurable or a non-measurable gauge */ Object metricValue(); }
apache/kylin
1,084
src/common-service/src/main/java/org/apache/kylin/rest/request/ExportTableRequest.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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 com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; @Data public class ExportTableRequest { @JsonProperty("database") private String databases; @JsonProperty("tables") private String[] tables; }
apache/linkis
1,026
linkis-computation-governance/linkis-manager/linkis-manager-persistence/src/main/java/org/apache/linkis/manager/exception/NodeInstanceNotFoundException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.linkis.manager.exception; public class NodeInstanceNotFoundException extends PersistenceErrorException { public NodeInstanceNotFoundException(int errCode, String desc) { super(errCode, desc); } }
apache/lucene
1,121
lucene/core/src/java/org/apache/lucene/codecs/TermStats.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.codecs; /** * Holder for per-term statistics. * * @param docFreq How many documents have at least one occurrence of this term. * @param totalTermFreq Total number of times this term occurs across all documents in the field. */ public record TermStats(int docFreq, long totalTermFreq) {}
apache/maven-compiler-plugin
1,094
src/it/jpms_add-exports/src/main/java/org/maven/test/Main.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.maven.test; public class Main { /** * @param args */ public static void main(String[] args) { try { Class.forName("jdk.internal.util.Preconditions").newInstance(); } catch (Exception e) { // noop } } }
apache/maven-plugins
1,079
maven-jmod-plugin/src/it/non-default-config/src/main/java/myproject/HelloWorld.java
package myproject; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * The classic Hello World App. */ public class HelloWorld { /** * Main method. * * @param args Not used */ public static void main( String[] args ) { System.out.println( "Hello World from JDK 9" ); } }
apache/maven
1,053
its/core-it-support/core-it-plugins/maven-it-plugin-extension1/src/main/java/org/apache/maven/plugin/coreit/CoreItMojo.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.maven.plugin.coreit; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugins.annotations.Mojo; /** */ @Mojo(name = "dummy") public class CoreItMojo extends AbstractMojo { public void execute() {} }
apache/mina-sshd
1,096
sshd-common/src/main/java/org/apache/sshd/common/random/RandomFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.sshd.common.random; import org.apache.sshd.common.BuiltinFactory; /** * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a> */ // CHECKSTYLE:OFF public interface RandomFactory extends BuiltinFactory<Random> { // nothing extra } //CHECKSTYLE:ON
apache/nifi
1,034
nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/queue/clustered/server/NotAuthorizedException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.nifi.controller.queue.clustered.server; import java.io.IOException; public class NotAuthorizedException extends IOException { public NotAuthorizedException(String message) { super(message); } }
apache/nifi
1,050
nifi-extension-bundles/nifi-extension-utils/nifi-event-transport/src/main/java/org/apache/nifi/event/transport/EventSender.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.event.transport; /** * Event Sender * * @param <T> Event Type */ public interface EventSender<T> extends AutoCloseable { /** * Send Event * * @param event Event */ void sendEvent(T event); }
apache/nifi
1,083
nifi-commons/nifi-utils/src/main/java/org/apache/nifi/flowfile/attributes/FlowFileMediaType.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.flowfile.attributes; /** * Flow File Media Type Definition */ public interface FlowFileMediaType { /** * Get Media Type Definition with type and subtype components * * @return Media Type Definition */ String getMediaType(); }
apache/ozhera
1,070
ozhera-monitor/ozhera-monitor-api/src/main/java/org/apache/ozhera/monitor/service/GrafanaApiService.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.ozhera.monitor.service; /** * @author gaoxihui * @date 2021/7/10 5:21 下午 */ public interface GrafanaApiService { public String getUrlByAppName(String appName); public String createGrafanaUrlByAppName(String appName,String area); }
apache/ozone
1,050
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/SCMConnectionManagerMXBean.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.container.common.statemachine; import java.util.List; /** * JMX information about the connected SCM servers. */ public interface SCMConnectionManagerMXBean { List<EndpointStateMachineMBean> getSCMServers(); }
apache/paimon
1,098
paimon-format/src/main/java/org/apache/paimon/format/orc/writer/FieldWriter.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.format.orc.writer; import org.apache.paimon.data.DataGetters; import org.apache.hadoop.hive.ql.exec.vector.ColumnVector; /** Orc field writer. */ public interface FieldWriter { void write(int rowId, ColumnVector column, DataGetters getters, int columnId); }
apache/phoenix
1,088
phoenix-pherf/src/main/java/org/apache/phoenix/pherf/jmx/monitors/FreeMemoryMonitor.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.phoenix.pherf.jmx.monitors; import org.apache.phoenix.pherf.jmx.Stat; public class FreeMemoryMonitor implements Monitor { @Override public Stat getStat() { Stat<Long> stat = new Stat(new Long(Runtime.getRuntime().freeMemory())); return stat; } }
apache/phoenix
1,114
phoenix-core/src/test/java/org/apache/phoenix/util/Repeat.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.phoenix.util; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target({ ElementType.METHOD }) public @interface Repeat { int value(); }
apache/plc4x
1,084
plc4j/drivers/s7/src/test/java/org/apache/plc4x/java/s7/readwrite/issues/PLC4X272Test.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.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.s7.readwrite.issues; import org.apache.plc4x.test.driver.DriverTestsuiteRunner; public class PLC4X272Test extends DriverTestsuiteRunner { public PLC4X272Test() { super("/tests/PLC4X-272.xml", "100 element read request"); } }
apache/polaris
1,093
runtime/service/src/intTest/java/org/apache/polaris/service/it/ManagementServiceIT.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.polaris.service.it; import io.quarkus.test.junit.QuarkusIntegrationTest; import org.apache.polaris.service.it.test.PolarisManagementServiceIntegrationTest; @QuarkusIntegrationTest public class ManagementServiceIT extends PolarisManagementServiceIntegrationTest {}
apache/polygene-java
1,052
libraries/sql-generator/src/main/java/org/apache/polygene/library/sql/generator/grammar/common/datatypes/SQLDate.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.common.datatypes; /** * This class represents the {@code DATE} data type. * * @author Stanislav Muhametsin */ public interface SQLDate extends SQLDataType { }
apache/polygene-java
1,071
libraries/sql-generator/src/test/java/org/apache/polygene/library/sql/generator/H2QueryTest.java
/* * Copyright 2012 Paul Merlin. * * 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.polygene.library.sql.generator; import org.apache.polygene.library.sql.generator.vendor.H2Vendor; import org.apache.polygene.library.sql.generator.vendor.SQLVendor; import org.apache.polygene.library.sql.generator.vendor.SQLVendorProvider; public class H2QueryTest extends AbstractQueryTest { @Override protected SQLVendor loadVendor() throws Exception { return SQLVendorProvider.createVendor( H2Vendor.class ); } }
apache/polygene-java
1,080
manual/src/main/java/org/apache/polygene/manual/recipes/concern/InventoryConcern.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.manual.recipes.concern; public class InventoryConcern implements Order { @Override public void addLineItem( LineItem item ) { } @Override public void removeLineItem( LineItem item ) { } }
apache/pulsar
1,062
pulsar-client-admin-api/src/main/java/org/apache/pulsar/common/policies/data/TransactionPendingAckInternalStats.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.common.policies.data; /** * Transaction pending ack internal stats. */ public class TransactionPendingAckInternalStats { /** The transaction pending ack log stats. */ public TransactionLogStats pendingAckLogStats; }
apache/ratis
1,085
ratis-test/src/test/java/org/apache/ratis/server/simulation/TestRaftSnapshotWithSimulatedRpc.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.server.simulation; import org.apache.ratis.statemachine.RaftSnapshotBaseTest; public class TestRaftSnapshotWithSimulatedRpc extends RaftSnapshotBaseTest<MiniRaftClusterWithSimulatedRpc> implements MiniRaftClusterWithSimulatedRpc.FactoryGet { }
apache/royale-compiler
1,096
compiler-common/src/main/java/org/apache/royale/swf/tags/ITag.java
/* * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.royale.swf.tags; import org.apache.royale.swf.TagType; /** * The interface for all the SWF tags. Each tag has a type code. */ public interface ITag { /** * Gets the tag type. * * @return tag type */ TagType getTagType(); }
apache/seatunnel-web
1,054
seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/response/connector/DataSourceInfo.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.app.domain.response.connector; import lombok.AllArgsConstructor; import lombok.Data; @Data @AllArgsConstructor public class DataSourceInfo { private ConnectorInfo connectorInfo; private String datasourceName; }
apache/seatunnel
1,069
seatunnel-transforms-v2/src/main/java/org/apache/seatunnel/transform/dynamiccompile/parse/JavaClassParse.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.transform.dynamiccompile.parse; public class JavaClassParse extends AbstractParse { @Override public Class<?> parseClassSourceCode(String sourceCode) { return JavaClassParser.parseSourceCodeWithCache(sourceCode); } }
apache/seatunnel
1,093
seatunnel-api/src/main/java/org/apache/seatunnel/api/source/SeaTunnelJobAware.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.api.source; import org.apache.seatunnel.api.common.JobContext; /** This interface defines the runtime environment of the SeaTunnel job. */ public interface SeaTunnelJobAware { default void setJobContext(JobContext jobContext) { // nothing } }
apache/servicecomb-java-chassis
1,078
common/common-protobuf/src/test/java/io/protostuff/runtime/model/User.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.protostuff.runtime.model; public class User { private String name; public User(String name) { this.name = name; } public User() { } public String getName() { return name; } public void setName(String name) { this.name = name; } }
apache/shenyu
1,074
shenyu-plugin/shenyu-plugin-base/src/main/java/org/apache/shenyu/plugin/base/alert/AlarmService.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.shenyu.plugin.base.alert; import org.apache.shenyu.common.dto.AlarmContent; /** * Alarm service. */ public interface AlarmService { /** * Send alarm content. * @param content alarm */ void alarm(AlarmContent content); }
apache/sis
1,095
endorsed/src/org.apache.sis.util/main/org/apache/sis/util/resources/Messages_en.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.sis.util.resources; /** * Resources in English language. */ public class Messages_en extends Messages { /** * Constructs a new resource bundle loading data from * the resource file of the same name as this class. */ public Messages_en() { } }
apache/skywalking
1,035
oap-server/server-library/library-module/src/main/java/org/apache/skywalking/oap/server/library/module/ServiceNotProvidedRuntimeException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.library.module; public class ServiceNotProvidedRuntimeException extends RuntimeException { public ServiceNotProvidedRuntimeException(String message) { super(message); } }
apache/solr
1,106
solr/core/src/java/org/apache/solr/core/LuceneDefaultCodecFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.solr.core; import org.apache.lucene.codecs.Codec; /** * Simple factory for returning the Lucene default Codec * * @see Codec#getDefault */ public class LuceneDefaultCodecFactory extends CodecFactory { @Override public Codec getCodec() { return Codec.getDefault(); } }
apache/stratos
1,046
components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/tenant/CompleteTenantEventListener.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.stratos.messaging.listener.tenant; import org.apache.stratos.messaging.listener.EventListener; /** * Complete tenant event listener. */ public abstract class CompleteTenantEventListener extends EventListener { }
apache/streampipes
1,073
streampipes-model/src/main/java/org/apache/streampipes/model/configuration/DefaultGeneralConfig.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.model.configuration; public class DefaultGeneralConfig { public GeneralConfig make() { var generalConfig = new GeneralConfig(); generalConfig.setLinkSettings(new DefaultLinkSettings().make()); return generalConfig; } }
apache/tapestry-5
1,055
tapestry-ioc-jcache/src/test/java/org/apache/tapestry5/jcache/internal/InterceptionCacheNameOnEachMethodTest.java
/** * Copyright 2011-2013 Terracotta, Inc. * Copyright 2011-2013 Oracle, 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 org.apache.tapestry5.jcache.internal; import manager.BlogManager; import manager.CacheNameOnEachMethodBlogManagerImpl; /** * @author Rick Hightower */ public class InterceptionCacheNameOnEachMethodTest extends AbstractBlogManagerInterceptionTest { /** * */ @Override protected BlogManager getBlogManager() { return getBeanByType(CacheNameOnEachMethodBlogManagerImpl.class); } }
apache/tapestry-5
1,055
tapestry-ioc-jcache/src/test/java/org/apache/tapestry5/jcache/internal/InterceptionUsingDefaultCacheNameTest.java
/** * Copyright 2011-2013 Terracotta, Inc. * Copyright 2011-2013 Oracle, 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 org.apache.tapestry5.jcache.internal; import manager.BlogManager; import manager.UsingDefaultCacheNameBlogManagerImpl; /** * @author Rick Hightower */ public class InterceptionUsingDefaultCacheNameTest extends AbstractBlogManagerInterceptionTest { /** * */ @Override protected BlogManager getBlogManager() { return getBeanByType(UsingDefaultCacheNameBlogManagerImpl.class); } }
apache/tapestry-5
1,057
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/OverrideDateFieldMessageCatalogDemo.java
// Copyright 2009 The Apache Software Foundation // // 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.tapestry5.integration.app1.pages; import java.util.Date; import org.apache.tapestry5.annotations.Persist; import org.apache.tapestry5.annotations.Property; import org.apache.tapestry5.commons.Messages; import org.apache.tapestry5.ioc.annotations.Inject; public class OverrideDateFieldMessageCatalogDemo { @Inject @Property private Messages messages; @Persist @Property private Date birthday; }
apache/tapestry-5
1,066
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/MagicValueEncoder.java
// Copyright 2008 The Apache Software Foundation // // 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.tapestry5.integration.app1.pages; import org.apache.tapestry5.annotations.Persist; public class MagicValueEncoder { @Persist("flash") private int number; private static final int[] OPTIONS = { 5, 10, 25, 100 }; public int getNumber() { return number; } public void setNumber(int number) { this.number = number; } public int[] getOptions() { return OPTIONS; } }
apache/tapestry-5
1,098
tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/test/RedMarker.java
// Copyright 2007, 2010 The Apache Software Foundation // // 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.tapestry5.ioc.test; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.Target; @Target( { PARAMETER, FIELD, METHOD }) @Retention(RUNTIME) @Documented public @interface RedMarker { }
apache/tez
1,109
tez-api/src/main/java/org/apache/tez/runtime/api/TaskFailureType.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tez.runtime.api; public enum TaskFailureType { /** * Indicates an error, which can potentially be recovered from when another attempt is launched */ NON_FATAL, /** * Indicates an error which is fatal; no more attempts will be made for the task */ FATAL, }
apache/tomcat
1,100
test/org/apache/catalina/servlets/TestDefaultServletEncodingPassThroughBom.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.servlets; import org.apache.catalina.servlets.DefaultServlet.BomConfig; public class TestDefaultServletEncodingPassThroughBom extends DefaultServletEncodingBaseTest { @Override protected BomConfig getUseBom() { return BomConfig.PASS_THROUGH; } }
apache/tomcat80
1,128
java/org/apache/catalina/tribes/util/Logs.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.util; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; /** * * Simple class that holds references to global loggers * @version 1.0 */ public class Logs { public static final Log MESSAGES = LogFactory.getLog( "org.apache.catalina.tribes.MESSAGES" ); }
apache/tomee
1,085
examples/mp-rest-jwt-public-key/src/main/java/org/superbiz/bookstore/ApplicationConfig.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.superbiz.bookstore; import org.eclipse.microprofile.auth.LoginConfig; import jakarta.ws.rs.ApplicationPath; import jakarta.ws.rs.core.Application; @ApplicationPath("/rest") @LoginConfig(authMethod = "MP-JWT") public class ApplicationConfig extends Application { }
apache/tomee
1,090
container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/FilterInfo.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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; import java.util.Properties; public class FilterInfo extends InfoObject { public String classname; public List<String> mappings; public Properties initParams = new Properties(); public String name; }
apache/tomee
1,094
container/openejb-core/src/main/java/org/apache/openejb/classloader/FalseFilter.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.classloader; import org.apache.xbean.finder.filter.Filter; public class FalseFilter implements Filter { public static final FalseFilter INSTANCE = new FalseFilter(); @Override public boolean accept(final String name) { return false; } }
apache/tomee
1,097
maven/maven-util/src/main/java/org/apache/openejb/maven/util/OpenJPALogFactory.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.maven.util; import org.apache.openjpa.lib.log.Log; import org.apache.openjpa.lib.log.LogFactory; public class OpenJPALogFactory implements LogFactory { @Override public Log getLog(final String channel) { return new OpenJPALog(channel); } }
apache/tomee
1,099
container/openejb-core/src/main/java/org/apache/openejb/testing/AppResource.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.testing; 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 AppResource { }
apache/unomi
1,092
graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/schema/json/JSONNumberType.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.graphql.schema.json; import java.util.Map; public class JSONNumberType extends JSONType { public JSONNumberType(Map<String, Object> schemaTree, JSONTypeFactory jsonTypeFactory) { super(schemaTree, jsonTypeFactory); setType("number"); } }
apache/unomi
1,092
graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/schema/json/JSONStringType.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.graphql.schema.json; import java.util.Map; public class JSONStringType extends JSONType { public JSONStringType(Map<String, Object> schemaTree, JSONTypeFactory jsonTypeFactory) { super(schemaTree, jsonTypeFactory); setType("string"); } }
apache/wicket
1,067
wicket-core-tests/src/test/java/org/apache/wicket/markup/html/header/testing/TestExtendedPanel.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.testing; /** * * @author Juergen Donnerstag */ public class TestExtendedPanel extends TestBasePanel { private static final long serialVersionUID = 1L; /** * Construct. */ public TestExtendedPanel() { } }
apache/wicket
1,072
wicket-core-tests/src/test/java/org/apache/wicket/markup/html/border/BorderComponent1.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.border; /** * * @author Juergen Donnerstag */ public class BorderComponent1 extends Border { private static final long serialVersionUID = 1L; /** * @param id */ public BorderComponent1(String id) { super(id); } }
apache/wicket
1,072
wicket-core-tests/src/test/java/org/apache/wicket/markup/html/border/BorderComponent2.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.border; /** * * @author Juergen Donnerstag */ public class BorderComponent2 extends Border { private static final long serialVersionUID = 1L; /** * @param id */ public BorderComponent2(String id) { super(id); } }
apache/wicket
1,080
wicket-core-tests/src/test/java/org/apache/wicket/markup/html/autolink/BasePage.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.autolink; import org.apache.wicket.markup.html.WebPage; /** * */ public class BasePage extends WebPage { private static final long serialVersionUID = 1L; /** * Creates a new instance of BasePanel * */ BasePage() { } }
google/agera
1,083
samples/BasicSample/app/src/main/java/com/example/android/agera/basicsample/MainActivity.java
/* * Copyright 2016 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.example.android.agera.basicsample; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main_act); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); } }
google/binnavi
1,085
src/main/java/com/google/security/zynamics/zylib/gui/zygraph/editmode/IStateAction.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.zylib.gui.zygraph.editmode; import java.awt.event.MouseEvent; /** * Interface for all objects to be used as default actions that are executed as soon as a state * change was triggered. * * @param <T> The type of the state change object. */ public interface IStateAction<T> { /** * Executes an action. * * @param state The new state. * @param event The event that led to the new state. */ void execute(T state, MouseEvent event); }
google/binnavi
1,090
src/main/java/com/google/security/zynamics/zylib/types/graphs/IGraphNode.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.zylib.types.graphs; import java.util.List; /** * Interface for nodes in the graph. * * @param <T> The concrete graph node type itself. */ public interface IGraphNode<T> { /** * Returns the children of the graph node. * * @return The children of the graph node. */ List<? extends T> getChildren(); /** * Returns the parents of the graph node. * * @return The parents of the graph node. */ List<? extends T> getParents(); }
google/closure-templates
1,083
java/src/com/google/template/soy/plugin/python/restricted/PythonPluginContext.java
/* * Copyright 2019 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.template.soy.plugin.python.restricted; /** The context for a {@link SoyPythonSourceFunction}. */ public interface PythonPluginContext { /** * A value that resolves to the direction at runtime. Will resolve to {@code -1} if the locale is * RTL, or {@code 1} if the current locale is LTR. * * <p>Very few plugins should require this, instead rely on the built-in bidi functions and common * localization libraries. */ PythonValue getBidiDir(); }
google/exposure-notifications-android
1,037
privateanalytics/src/main/java/com/google/android/libraries/privateanalytics/PrivateAnalyticsLogger.java
/* * Copyright 2021 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.libraries.privateanalytics; /** * Interface that allows to abstracts local logging during app execution. */ public interface PrivateAnalyticsLogger { interface Factory { PrivateAnalyticsLogger create(String tag); } void d(String msg); void i(String msg); void w(String msg); void w(String msg, Throwable throwable); void e(String msg); void e(String msg, Throwable throwable); }
google/guava
1,112
guava-tests/test/com/google/common/base/PackageSanityTests.java
/* * Copyright (C) 2012 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.common.base; import com.google.common.annotations.GwtIncompatible; import com.google.common.testing.AbstractPackageSanityTests; import org.jspecify.annotations.NullUnmarked; /** Basic sanity tests for classes in {@code common.base}. */ @GwtIncompatible @NullUnmarked public class PackageSanityTests extends AbstractPackageSanityTests { public PackageSanityTests() { // package private classes like FunctionalEquivalence are tested through the public API. publicApiOnly(); } }
google/guava
1,115
guava/src/com/google/common/annotations/J2ktIncompatible.java
/* * Copyright (C) 2009 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package com.google.common.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * The presence of this annotation on an API indicates that the method may <em>not</em> be used with * J2kt. * * @since 32.0.0 */ @Retention(RetentionPolicy.CLASS) @Target({ElementType.TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.FIELD}) @GwtCompatible public @interface J2ktIncompatible {}
google/rejoiner
1,056
schema/google-cloud-container/src/main/java/com/google/api/graphql/schema/cloud/container/ContainerClientModule.java
// Copyright 2017 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.api.graphql.schema.cloud.container; import com.google.cloud.container.v1.ClusterManagerClient; import com.google.inject.AbstractModule; import java.io.IOException; public final class ContainerClientModule extends AbstractModule { @Override protected void configure() { try { bind(ClusterManagerClient.class).toInstance(ClusterManagerClient.create()); } catch (IOException e) { throw new RuntimeException(e); } } }
google/santa-tracker-android
1,062
presentquest/src/main/java/com/google/android/apps/santatracker/presentquest/util/VibrationUtil.java
/* * Copyright (C) 2016 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.android.apps.santatracker.presentquest.util; import android.content.Context; import android.os.Vibrator; public class VibrationUtil { public static final long[] PATTERN_BAD = new long[] {0, 50, 30, 50}; public static void vibratePattern(Context context, long... pattern) { Vibrator vibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE); vibrator.vibrate(pattern, -1); } }
googleads/googleads-consent-sdk-android
1,076
consent-library/src/main/java/com/google/ads/consent/ConsentFormListener.java
/* * Copyright 2018 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.ads.consent; /** * A listener to be provided to the {@link ConsentForm} for receiving notifications when a consent * form has been loaded, opened, closed, or encounters an error. */ public abstract class ConsentFormListener { public void onConsentFormLoaded() {} public void onConsentFormError(String reason) {} public void onConsentFormOpened() {} public void onConsentFormClosed(ConsentStatus consentStatus, Boolean userPrefersAdFree) {} }
googlearchive/android-ConstraintLayoutExamples
1,043
constraintlayout/src/test/java/com/example/android/constraintlayoutexamples/ExampleUnitTest.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 com.example.android.constraintlayoutexamples; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { assertEquals(4, 2 + 2); } }
googlearchive/caja
1,119
src/com/google/caja/lexer/escaping/Encoder.java
// Copyright (C) 2007 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.caja.lexer.escaping; import java.io.IOException; /** * Knows how to Encode a single codepoint to an output buffer. * * @author mikesamuel@gmail.com (Mike Samuel) */ interface Encoder { /** * Write an escape sequence for codepoint onto out. * * @param codepoint the codepoint to escape. * @param nextCodepoint the next codepoint or -1 if there is none. * @param out the output buffer. */ void encode(int codepoint, int nextCodepoint, Appendable out) throws IOException; }
googlearchive/gwt-google-apis
1,079
gadgets/gadgets/src/com/google/gwt/gadgets/client/osapi/SortOrder.java
/* * Copyright 2010 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.osapi; /** * An enum used to define an order of sorting objects in a collection. */ public enum SortOrder { ASCENDING("ascending"), DESCENDING("descending"); private String order; private SortOrder(String order) { this.order = order; } /** * Returns the {@link String} representing the order of sorting. * * @return The {@link String} representing the order of sorting. */ String getOrder() { return order; } }
hibernate/hibernate-demos
1,041
other/wildfly-patch-creation/integrationtest/src/test/java/com/example/EclipseCollectionsIT.java
/* * License: Apache License, Version 2.0 * See the LICENSE file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>. */ package com.example; import static org.junit.Assert.assertEquals; import org.eclipse.collections.api.list.ImmutableList; import org.eclipse.collections.impl.factory.Lists; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.junit.Arquillian; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Test; import org.junit.runner.RunWith; /** * @author Gunnar Morling */ @RunWith(Arquillian.class) public class EclipseCollectionsIT { @Deployment public static WebArchive createTestArchive() throws Exception { return ShrinkWrap.create( WebArchive.class, "mywar.war" ) .addAsWebInfResource( "jboss-deployment-structure.xml" ); } @Test public void canUseEclipseCollections() { ImmutableList<String> names = Lists.immutable.of( "Bob", "Alice", "Sarah" ); assertEquals( 3, names.size() ); } }
hibernate/hibernate-orm
1,026
hibernate-testing/src/main/java/org/hibernate/testing/util/uuid/SafeRandomUUIDGenerator.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.testing.util.uuid; import java.util.UUID; /** * @author Jan Schatteman */ public class SafeRandomUUIDGenerator { /** * @return A random UUID that is guaranteed not to end with a trailing 0 byte */ public static UUID safeRandomUUID() { UUID uuid = UUID.randomUUID(); if ( !isSafeUUID(uuid) ) { uuid = safeRandomUUID(); } return uuid; } /** * @return The String representation of a random UUID that is guaranteed not to end with a trailing 0 byte */ public static String safeRandomUUIDAsString() { return safeRandomUUID().toString(); } /** * @param uuid The UUID to be tested * @return true if the UUID doesn't end with a trailing 0 byte, false otherwise */ public static boolean isSafeUUID(UUID uuid) { if ( uuid == null ) { throw new RuntimeException("The UUID cannot be tested if it's null!"); } return ( (uuid.getLeastSignificantBits() & 0xFF) != 0 ); } }
hibernate/hibernate-orm
1,043
hibernate-core/src/main/java/org/hibernate/sql/model/jdbc/JdbcUpdateMutation.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.sql.model.jdbc; import java.util.List; import org.hibernate.jdbc.Expectation; import org.hibernate.sql.exec.spi.JdbcParameterBinder; import org.hibernate.sql.model.MutationTarget; import org.hibernate.sql.model.MutationType; import org.hibernate.sql.model.TableMapping; /** * Describes the update of a single table * * @author Steve Ebersole */ public class JdbcUpdateMutation extends AbstractJdbcMutation { public JdbcUpdateMutation( TableMapping tableDetails, MutationTarget<?> mutationTarget, String sql, boolean callable, Expectation expectation, List<? extends JdbcParameterBinder> parameterBinders) { super( tableDetails, mutationTarget, sql, callable, expectation, parameterBinders ); } @Override public MutationType getMutationType() { return MutationType.UPDATE; } @Override public String toString() { return "JdbcUpdateMutation(" + getTableDetails().getTableName() + ")"; } }
hibernate/hibernate-orm
1,046
hibernate-core/src/test/java/org/hibernate/orm/test/associations/FieldWithUnderscoreTest.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.associations; import jakarta.persistence.Entity; import jakarta.persistence.FetchType; import jakarta.persistence.Id; import jakarta.persistence.ManyToOne; import org.hibernate.testing.orm.junit.DomainModel; import org.hibernate.testing.orm.junit.SessionFactory; import org.hibernate.testing.orm.junit.SessionFactoryScope; import org.junit.jupiter.api.Test; @SessionFactory @DomainModel(annotatedClasses = {FieldWithUnderscoreTest.A.class, FieldWithUnderscoreTest.B.class}) public class FieldWithUnderscoreTest { @Test void test(SessionFactoryScope scope) { scope.inSession(s -> s.createSelectionQuery("from B join _a", B.class).getResultList()); scope.inSession(s -> s.createSelectionQuery("from B left join fetch _a", B.class).getResultList()); } @Entity(name = "A") static class A { @Id Long _id; } @Entity(name = "B") static class B { @Id Long _id; @ManyToOne(fetch = FetchType.LAZY) A _a; } }
hibernate/hibernate-orm
1,061
hibernate-core/src/test/java/org/hibernate/orm/test/sql/results/EmbeddableResultTests.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.sql.results; import org.hibernate.sql.ast.tree.select.SelectStatement; import org.hibernate.sql.results.graph.DomainResultGraphPrinter; import org.hibernate.testing.orm.domain.StandardDomainModel; import org.hibernate.testing.orm.junit.DomainModel; import org.hibernate.testing.orm.junit.SessionFactory; import org.hibernate.testing.orm.junit.SessionFactoryScope; import org.junit.jupiter.api.Test; /** * @author Steve Ebersole */ @DomainModel( standardModels = StandardDomainModel.GAMBIT ) @SessionFactory( exportSchema = false ) public class EmbeddableResultTests extends AbstractResultTests { @Test public void simpleTest(SessionFactoryScope scope) { final SelectStatement interpretation = interpret( "select e from EntityOfComposites e join fetch e.component c join fetch c.nested", scope.getSessionFactory() ); DomainResultGraphPrinter.logDomainResultGraph( interpretation.getDomainResultDescriptors() ); } }
hibernate/hibernate-orm
1,082
hibernate-core/src/main/java/org/hibernate/annotations/QueryCacheLayout.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.annotations; import java.lang.annotation.Retention; import java.lang.annotation.Target; import org.hibernate.Incubating; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; /** * Configures the layout for the entity or collection data in a query cache. * * @see CacheLayout * @see jakarta.persistence.Cacheable * @see org.hibernate.Cache * @see org.hibernate.cfg.AvailableSettings#CACHE_REGION_FACTORY * @see org.hibernate.cfg.AvailableSettings#USE_SECOND_LEVEL_CACHE * @see org.hibernate.cfg.AvailableSettings#USE_QUERY_CACHE * @since 6.5 * */ @Target({TYPE, FIELD, METHOD}) @Retention(RUNTIME) @Incubating public @interface QueryCacheLayout { /** * The layout of the data for an entity or collection in the query cache. */ CacheLayout layout() default CacheLayout.AUTO; }
openjdk/asmtools
1,122
src/org/openjdk/asmtools/jdis/ExceptionData.java
package org.openjdk.asmtools.jdis; import java.io.DataInputStream; import java.io.IOException; import static org.openjdk.asmtools.jasm.JasmTokens.Token.THROWS; import static org.openjdk.asmtools.jasm.TableFormatModel.Token.EXCEPTIONS; /** * Exceptions_attribute { * u2 attribute_name_index; * u4 attribute_length; * u2 number_of_exceptions; * u2 exception_index_table[number_of_exceptions]; * } */ public class ExceptionData extends ClassArrayData { private int keywordPadding = -1; public ExceptionData(ClassData classData) { super(classData, THROWS); tableToken = EXCEPTIONS; } public ExceptionData read(DataInputStream in, int attribute_length) throws IOException, ClassFormatError { return (ExceptionData) super.read(in, attribute_length); } public ExceptionData setKeywordPadding(int keywordPadding) { this.keywordPadding = keywordPadding; return this; } @Override protected int getPrintAttributeKeyPadding() { return keywordPadding == -1 ? super.getPrintAttributeKeyPadding() : keywordPadding; } }
openjdk/jdk8
1,110
langtools/test/tools/javac/InterfaceMemberClassModifiers.java
/* * @test /nodynamiccopyright/ * @bug 4294065 4785453 * @summary Verify that invalid access modifiers on interface members don't cause crash. * @author maddox * * @compile/fail/ref=InterfaceMemberClassModifiers.out -XDdiags=%b:%l:%_%m InterfaceMemberClassModifiers.java */ public interface InterfaceMemberClassModifiers { Object nullWriter = null; class SomeClass1 implements InterfaceMemberClassModifiers { // OK public Object getOut() { return nullWriter; } } public class SomeClass2 implements InterfaceMemberClassModifiers { // OK public Object getOut() { return nullWriter; } } // Compiler used to crash on these! (after reporting error) protected class SomeClass3 implements InterfaceMemberClassModifiers { // illegal public Object getOut() { return nullWriter; } } private class SomeClass4 implements InterfaceMemberClassModifiers { // illegal public Object getOut() { return nullWriter; } } }
openjdk/jdk8
1,129
jdk/test/java/rmi/Naming/legalRegistryNames/Legal.java
/* * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /** * */ import java.rmi.Remote; public interface Legal extends Remote {};
openjdk/jtreg
1,152
test/rerun/std/BuildTest.java
/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /* @test * @clean BuildTest * @build BuildTest * @build BuildTest */ public class BuildTest { }
oracle/coherence
1,082
prj/coherence-core/src/main/java/com/tangosol/io/pof/InetSocketAddressSerializer.java
/* * Copyright (c) 2000, 2020, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * http://oss.oracle.com/licenses/upl. */ package com.tangosol.io.pof; import java.io.IOException; import java.net.InetAddress; import java.net.InetSocketAddress; /** * POF serializer for {@code java.net.InetSocketAddress}. * * @author mf 2015.06.09 */ public class InetSocketAddressSerializer implements PofSerializer<InetSocketAddress> { @Override public void serialize(PofWriter out, InetSocketAddress addr) throws IOException { out.writeByteArray(0, addr.getAddress().getAddress()); out.writeInt(1, addr.getPort()); out.writeRemainder(null); } @Override public InetSocketAddress deserialize(PofReader in) throws IOException { byte[] abAddr = in.readByteArray(0); int nPort = in.readInt(1); in.readRemainder(); return new InetSocketAddress(InetAddress.getByAddress(abAddr), nPort); } }
oracle/nosql-examples
1,052
archived/Trusted_Objects/src/com/oracle/emeatech/trustedobjects/coherence/CoherenceDomainHeader.java
package com.oracle.emeatech.trustedobjects.coherence; import com.oracle.emeatech.trustedobjects.DomainHeader; import com.oracle.emeatech.trustedobjects.Scheme; import java.security.PublicKey; /** * * @author ewan */ class CoherenceDomainHeader implements DomainHeader { private String domainName; private String domainOwner; private Scheme scheme; private PublicKey ownerPubKey; public CoherenceDomainHeader(String domainName, String domainOwner, Scheme scheme, PublicKey ownerPubKey) { this.domainName = domainName; this.domainOwner = domainOwner; this.scheme = scheme; this.ownerPubKey = ownerPubKey; } @Override public String getDomainName() { return this.domainName; } @Override public String getDomainOwner() { return this.domainOwner; } @Override public Scheme getScheme() { return this.scheme; } @Override public PublicKey getOwnerPublicKey() { return this.ownerPubKey; } }
oracle/oci-java-sdk
1,093
bmc-common/src/test/java/com/oracle/bmc/auth/StringPrivateKeySupplierTest.java
/** * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. */ package com.oracle.bmc.auth; import java.io.InputStream; import java.io.IOException; import java.nio.charset.StandardCharsets; import com.oracle.bmc.util.StreamUtils; import org.junit.Test; import static org.junit.Assert.assertEquals; public class StringPrivateKeySupplierTest { private static final String DATA = "123abcdef"; @Test public void testGet() throws IOException { StringPrivateKeySupplier s = new StringPrivateKeySupplier(DATA); InputStream is = s.get(); String read = StreamUtils.toString(is, StandardCharsets.UTF_8); assertEquals(DATA, read); // get again is = s.get(); read = StreamUtils.toString(is, StandardCharsets.UTF_8); assertEquals(DATA, read); } }
apache/curator
1,087
curator-framework/src/main/java/org/apache/curator/framework/api/AsyncReconfigurable.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.curator.framework.api; public interface AsyncReconfigurable { /** * Sets the configuration version to use. * @param config The version of the configuration. * @throws Exception */ void fromConfig(long config) throws Exception; }
apache/cxf
1,077
rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/rp/IdTokenContextClassProvider.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.rs.security.oidc.rp; import org.apache.cxf.jaxrs.ext.ContextClassProvider; public class IdTokenContextClassProvider implements ContextClassProvider { @Override public Class<?> getContextClass() { return IdTokenContext.class; } }
apache/cxf
1,096
rt/transports/http/src/main/java/org/apache/cxf/transport/http/ProxyOutputStream.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.transport.http; import java.io.OutputStream; import org.apache.cxf.io.AbstractWrappedOutputStream; public class ProxyOutputStream extends AbstractWrappedOutputStream { public void setWrappedOutputStream(OutputStream os) { this.wrappedStream = os; } }
apache/cxf
1,115
core/src/main/java/org/apache/cxf/common/CXFPermissions.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.common; public final class CXFPermissions { public static final RuntimePermission RESOLVE_URI = new RuntimePermission("org.apache.cxf.permission", "resolveUri"); private CXFPermissions() { } }
apache/derby
1,046
plugins/eclipse/org.apache.derby.ui/src/org/apache/derby/ui/launch/StopDerbyServerLaunchConfigurationDelegate.java
/* Derby - Class org.apache.derby.ui.launch.StopDerbyServerLaunchConfigurationDelegate Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.apache.derby.ui.launch; import org.eclipse.jdt.launching.JavaLaunchDelegate; public class StopDerbyServerLaunchConfigurationDelegate extends JavaLaunchDelegate { }
apache/directory-server
1,080
protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/service/package-info.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /** * Provides the implementation of the {@link org.apache.directory.server.dhcp.service.DhcpService}. * * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> */ package org.apache.directory.server.dhcp.service;
apache/doris-manager
1,045
manager/general/src/main/java/org/apache/doris/stack/exception/UserEmailDuplicatedException.java
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. package org.apache.doris.stack.exception; public class UserEmailDuplicatedException extends Exception { public static final String MESSAGE = "账号邮箱已被使用,请修改后重试"; public UserEmailDuplicatedException() { super(MESSAGE); } }
apache/drill
1,104
exec/java-exec/src/main/java/org/apache/commons/logging/impl/Log4JLogger.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.logging.impl; /** * A mock class to avoid NoClassDefFoundError after excluding Apache commons-logging from Hadoop dependency. * See <a href="https://issues.apache.org/jira/browse/HADOOP-10288">HADOOP-10288</a> for the problem description. */ public class Log4JLogger { }
apache/dubbo-hessian-lite
1,080
hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/java8/YearSerializer.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES 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.alibaba.com.caucho.hessian.io.java8; import com.alibaba.com.caucho.hessian.io.AbstractSerializer; public class YearSerializer<T> extends AbstractSerializer { @Override public Object writeReplace(Object obj) { return new YearHandle(obj); } }
apache/dubbo-samples
1,052
online_bontique_demo/common/src/main/java/org/apache/dubbo/shop/common/dto/response/GetSupportedCurrenciesResponse.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dubbo.shop.common.dto.response; import lombok.Data; import java.io.Serializable; import java.util.List; @Data public class GetSupportedCurrenciesResponse implements Serializable { private List<String> currencyCodes; }
apache/felix-dev
1,009
ipojo/runtime/core-it/ipojo-core-service-dependency-timeout-test/src/main/java/org/apache/felix/ipojo/runtime/test/dependencies/timeout/services/CheckService.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.felix.ipojo.runtime.test.dependencies.timeout.services; import java.util.Properties; public interface CheckService { public boolean check(); public Properties getProps(); }
apache/felix-dev
1,036
ipojo/runtime/core-it/ipojo-core-bad-configuration-test/src/main/java/org/apache/felix/ipojo/runtime/bad/services/CheckService.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.felix.ipojo.runtime.bad.services; import java.util.Properties; public interface CheckService { public static final String foo = "foo"; public boolean check(); public Properties getProps(); }
apache/fesod
1,104
fesod/src/test/java/org/apache/fesod/excel/skip/SkipData.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.fesod.excel.skip; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; import org.apache.fesod.excel.annotation.ExcelProperty; /** * */ @Getter @Setter @EqualsAndHashCode public class SkipData { @ExcelProperty("姓名") private String name; }
apache/fineract
1,053
fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanChargeOffUndoEvent.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.fineract.test.messaging.event.loan.transaction; public class LoanChargeOffUndoEvent extends AbstractLoanTransactionEvent { @Override public String getEventName() { return "LoanUndoChargeOffBusinessEvent"; } }
apache/flex-blazeds
1,076
core/src/main/java/flex/management/runtime/messaging/endpoints/StreamingAMFEndpointControlMBean.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package flex.management.runtime.messaging.endpoints; /** * Defines the runtime monitoring and management interface for managed streaming * AMF endpoints. */ public interface StreamingAMFEndpointControlMBean extends StreamingEndpointControlMBean { // Empty for now }
apache/geaflow
1,068
geaflow-console/app/common/dal/src/main/java/org/apache/geaflow/console/common/dal/mapper/StatementMapper.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.geaflow.console.common.dal.mapper; import org.apache.geaflow.console.common.dal.entity.StatementEntity; import org.apache.ibatis.annotations.Mapper; @Mapper public interface StatementMapper extends GeaflowBaseMapper<StatementEntity> { }
apache/geaflow
1,068
geaflow-console/app/common/dal/src/main/java/org/apache/geaflow/console/common/dal/mapper/UserLevelMapper.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.geaflow.console.common.dal.mapper; import org.apache.geaflow.console.common.dal.entity.UserLevelEntity; import org.apache.ibatis.annotations.Mapper; @Mapper public interface UserLevelMapper extends GeaflowBaseMapper<UserLevelEntity> { }
apache/geaflow
1,071
geaflow/geaflow-core/geaflow-api/src/main/java/org/apache/geaflow/api/function/base/FilterFunction.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.geaflow.api.function.base; import org.apache.geaflow.api.function.Function; @FunctionalInterface public interface FilterFunction<T> extends Function { /** * If false then filter the record. */ boolean filter(T record); }
apache/geaflow
1,088
geaflow/geaflow-memory/src/test/java/org/apache/geaflow/memory/MemoryReleaseTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.geaflow.memory; import org.testng.annotations.AfterMethod; public class MemoryReleaseTest { @AfterMethod public void tearUp() { if (MemoryManager.getInstance() != null) { MemoryManager.getInstance().dispose(); } } }
apache/geode
1,073
geode-memcached/src/integrationTest/java/org/apache/geode/memcached/ConnectionWithOneMinuteTimeoutFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. You may obtain a * copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package org.apache.geode.memcached; import net.spy.memcached.DefaultConnectionFactory; public class ConnectionWithOneMinuteTimeoutFactory extends DefaultConnectionFactory { @Override public long getOperationTimeout() { // timeout after a minute return 60 * 1000; } }
apache/geode
1,089
geode-core/src/main/java/org/apache/geode/internal/statistics/EnabledStatisticsClock.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. You may obtain a * copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package org.apache.geode.internal.statistics; import org.apache.geode.internal.NanoTimer; public class EnabledStatisticsClock implements StatisticsClock { @Override public long getTime() { return NanoTimer.getTime(); } @Override public boolean isEnabled() { return true; } }