repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
apache/seatunnel-web | 1,106 | seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/mapper/WorkspaceMapper.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.dal.mapper;
import org.apache.seatunnel.app.dal.entity.Workspace;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.List;
public interface WorkspaceMapper extends BaseMapper<Workspace> {
List<String> getWorkspaceNames(String searchName);
}
|
apache/seatunnel | 1,034 | seatunnel-engine/seatunnel-engine-storage/imap-storage-plugins/imap-storage-file/src/main/java/org/apache/seatunnel/engine/imap/storage/file/scheduler/SchedulerTaskInfo.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
package org.apache.seatunnel.engine.imap.storage.file.scheduler;
import lombok.Builder;
import lombok.Data;
@Data
@Builder
public class SchedulerTaskInfo {
private long scheduledTime;
private long latestTime;
}
|
apache/servicecomb-java-chassis | 1,064 | swagger/swagger-generator/generator-jaxrs/src/test/java/org/apache/servicecomb/swagger/generator/jaxrs/model/enums/JdkStatus.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.servicecomb.swagger.generator.jaxrs.model.enums;
import io.swagger.v3.oas.annotations.Parameter;
public enum JdkStatus {
@Parameter(description = "jdk bad request")
BAD_REQUEST,
@Parameter(description = "jdk not found")
NOT_FOUND
}
|
apache/servicecomb-java-chassis | 1,091 | common/common-access-log/src/main/java/org/apache/servicecomb/common/accessLog/AccessLogInitializer.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.servicecomb.common.accessLog;
import com.google.common.eventbus.EventBus;
public interface AccessLogInitializer {
default int getOrder() {
return 0;
}
void init(EventBus eventBus, AccessLogConfig accessLogConfig);
default void destroy() {}
}
|
apache/servicecomb-java-chassis | 1,102 | demo/demo-schema/src/main/java/org/apache/servicecomb/demo/server/TestResponse.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.servicecomb.demo.server;
public class TestResponse {
private User user;
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
@Override
public String toString() {
return "TestResponse [user=" + user + "]";
}
}
|
apache/servicecomb-saga-actuator | 1,116 | saga-format/src/main/java/org/apache/servicecomb/saga/format/TransportAware.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.servicecomb.saga.format;
import org.apache.servicecomb.saga.core.Transport;
import org.apache.servicecomb.saga.transports.TransportFactory;
import org.apache.servicecomb.saga.core.Operation;
interface TransportAware<T extends Transport> {
Operation with(TransportFactory<T> transport);
}
|
apache/shardingsphere | 1,094 | database/protocol/core/src/main/java/org/apache/shardingsphere/database/protocol/binary/BinaryColumnType.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.shardingsphere.database.protocol.binary;
/**
* Binary column type.
*/
public interface BinaryColumnType {
/**
* Get database protocol binary column type value.
*
* @return database protocol binary column type value
*/
int getValue();
}
|
apache/shenyu | 1,128 | shenyu-admin/src/test/java/org/apache/shenyu/admin/model/query/PluginQueryTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.admin.model.query;
import org.apache.shenyu.admin.AbstractReflectGetterSetterTest;
/**
* Test case for PluginQuery.
*/
public final class PluginQueryTest extends AbstractReflectGetterSetterTest {
@Override
protected Class<?> getTargetClass() {
return PluginQuery.class;
}
}
|
apache/skywalking | 1,061 | oap-server/server-receiver-plugin/envoy-metrics-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/envoy/als/ALSHTTPAnalysis.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.oap.server.receiver.envoy.als;
import io.envoyproxy.envoy.data.accesslog.v3.HTTPAccessLogEntry;
/**
* Analysis source metrics from ALS
*/
public interface ALSHTTPAnalysis extends AccessLogAnalyzer<HTTPAccessLogEntry> {
}
|
apache/skywalking | 1,091 | test/e2e-v2/java-test-service/e2e-service-provider/src/main/java/test/apache/skywalking/e2e/profile/CreateUser.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package test.apache.skywalking.e2e.profile;
import lombok.Data;
import org.apache.skywalking.e2e.User;
@Data
public class CreateUser {
private String name;
private boolean enableProfiling;
public User toUser() {
return User.builder().name(name).build();
}
}
|
apache/skywalking | 1,116 | oap-server/oal-rt/src/main/java/org/apache/skywalking/oal/rt/parser/DisableCollection.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.oal.rt.parser;
import java.util.ArrayList;
import java.util.List;
import lombok.Getter;
@Getter
public class DisableCollection {
private List<String> allDisableSources = new ArrayList<>();
public void add(String source) {
allDisableSources.add(source);
}
}
|
apache/solr | 1,120 | solr/core/src/java/org/apache/solr/metrics/prometheus/core/PrometheusCoreFormatterInfo.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.metrics.prometheus.core;
public interface PrometheusCoreFormatterInfo {
/** Category of prefix Solr Core dropwizard handler metric names */
enum CoreCategory {
ADMIN,
QUERY,
UPDATE,
REPLICATION,
TLOG,
CACHE,
SEARCHER,
HIGHLIGHTER,
INDEX,
CORE
}
}
|
apache/streampark | 1,078 | streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/mapper/FlinkApplicationBackupMapper.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.streampark.console.core.mapper;
import org.apache.streampark.console.core.entity.FlinkApplicationBackup;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
public interface FlinkApplicationBackupMapper extends BaseMapper<FlinkApplicationBackup> {
}
|
apache/streampark | 1,078 | streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/mapper/SparkApplicationBackUpMapper.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.streampark.console.core.mapper;
import org.apache.streampark.console.core.entity.SparkApplicationBackup;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
public interface SparkApplicationBackUpMapper extends BaseMapper<SparkApplicationBackup> {
}
|
apache/streampipes | 1,102 | streampipes-service-core/src/main/java/org/apache/streampipes/service/core/WelcomePageController.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.service.core;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class WelcomePageController {
@RequestMapping(path = "/")
public String index() {
return "/index.html";
}
}
|
apache/struts | 1,117 | apps/rest-showcase/src/test/java/it/org/apache/struts2/rest/example/ParameterUtils.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package it.org.apache.struts2.rest.example;
public class ParameterUtils {
public static String getBaseUrl() {
String port = System.getProperty("http.port");
if (port == null) {
port = "8080";
}
return "http://localhost:"+port+"/struts2-rest-showcase";
}
}
|
apache/tajo | 1,123 | tajo-plan/src/main/java/org/apache/tajo/plan/expr/InvalidEvalException.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
*
*/
package org.apache.tajo.plan.expr;
public class InvalidEvalException extends RuntimeException {
private static final long serialVersionUID = -2897003028483298256L;
public InvalidEvalException() {
}
/**
* @param message
*/
public InvalidEvalException(String message) {
super(message);
}
}
|
apache/tapestry-5 | 1,092 | tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/components/BindParameterComponentContainer.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.components;
import org.apache.tapestry5.annotations.Parameter;
import org.apache.tapestry5.annotations.MixinAfter;
/**
* Used to help prove that BindParameter on a component field throws an intelligible exception, even if the containing
* resources actually do contain a declared parameter of the appropriate name.
*/
public class BindParameterComponentContainer
{
@Parameter("literal:testvalue")
private String value;
}
|
apache/tapestry-5 | 1,103 | tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/NumberBeanDisplayDemo.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;
import org.apache.tapestry5.integration.app1.data.IntegerHolder;
public class NumberBeanDisplayDemo
{
@Persist
private IntegerHolder holder;
// public needed for smarter page invalidation
public Object initialize(IntegerHolder holder)
{
this.holder = holder;
return this;
}
public IntegerHolder getHolder()
{
return holder;
}
}
|
apache/tomee | 1,118 | itests/failover-ejb/src/main/java/org/apache/openejb/itest/failover/ejb/CalculatorBean.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.itest.failover.ejb;
import jakarta.ejb.Stateless;
@Stateless
public class CalculatorBean implements Calculator {
@Override
public int sum(final int a, final int b) {
return a + b;
}
public String name() {
return System.getProperty("name");
}
}
|
apache/tvm | 1,153 | jvm/core/src/main/java/org/apache/tvm/rpc/TVMRemoteDevice.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.tvm.rpc;
import org.apache.tvm.Device;
// always related to RPCSession. Cannot construct by users.
public class TVMRemoteDevice extends Device {
public final RPCSession rpcSession;
TVMRemoteDevice(int deviceType, int deviceId, RPCSession rpcSession) {
super(deviceType, deviceId);
this.rpcSession = rpcSession;
}
}
|
apache/twill | 1,142 | twill-core/src/main/java/org/apache/twill/launcher/FindFreePort.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.twill.launcher;
import java.net.ServerSocket;
/**
* Utility main class to find a free port on a machine.
*/
public class FindFreePort {
public static void main(String[] args) throws Exception {
try (ServerSocket socket = new ServerSocket(0)) {
System.out.println(socket.getLocalPort());
}
}
}
|
apache/uniffle | 1,136 | common/src/test/java/org/apache/uniffle/common/ShuffleIndexResultTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.uniffle.common;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class ShuffleIndexResultTest {
@Test
public void testEmpty() {
assertTrue(new ShuffleIndexResult().isEmpty());
assertTrue(new ShuffleIndexResult((byte[]) null, -1).isEmpty());
}
}
|
apache/usergrid | 1,098 | stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/qakka/exceptions/QakkaException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.usergrid.persistence.qakka.exceptions;
public class QakkaException extends Exception {
public QakkaException(String message) {
super( message );
}
public QakkaException(String message, Throwable cause) {
super( message, cause );
}
}
|
apache/usergrid | 1,115 | chop/webapp/src/main/java/org/apache/usergrid/chop/webapp/service/chart/value/MinValue.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.usergrid.chop.webapp.service.chart.value;
import org.apache.usergrid.chop.api.Run;
class MinValue extends Value {
MinValue() {
value = Double.MAX_VALUE;
}
@Override
protected void calcValue(Run run) {
value = Math.min(value, run.getMinTime());
}
}
|
apache/usergrid | 1,130 | stack/test-utils/src/main/java/org/apache/usergrid/cassandra/SchemaManager.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.usergrid.cassandra;
/** @author zznate */
public interface SchemaManager {
/** Create any schema necessary for test execution. */
void create();
/** Any breath-of-life data needed for the base system */
void populateBaseData();
/** marshall the data removal */
void destroy();
}
|
apache/usergrid | 1,132 | chop/spi/src/main/java/org/apache/usergrid/chop/spi/ClusterManager.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.usergrid.chop.spi;
import java.util.Collection;
import org.apache.usergrid.chop.stack.Cluster;
import org.apache.usergrid.chop.stack.Instance;
/**
*
*/
public interface ClusterManager {
Collection<Instance> getClusterInstances( Cluster cluster );
void createCluster( Cluster cluster );
}
|
apache/wicket | 1,104 | wicket-core-tests/src/test/java/org/apache/wicket/markup/resolver/issue3559/MenuPanel.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.resolver.issue3559;
import org.apache.wicket.markup.html.panel.Panel;
/**
*
*/
public class MenuPanel extends Panel
{
private static final long serialVersionUID = 1L;
/**
* Construct.
*
* @param id
*/
public MenuPanel(String id)
{
super(id);
}
}
|
apache/xmlbeans | 1,164 | src/test/java/dom/common/NewLoader.java | /* Copyright 2004 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 dom.common;
import org.apache.xmlbeans.XmlException;
import org.apache.xmlbeans.XmlObject;
import org.apache.xmlbeans.XmlRuntimeException;
public class NewLoader extends Loader {
public org.w3c.dom.Document load(String sXml) {
try {
return (org.w3c.dom.Document) XmlObject.Factory.parse(sXml).getDomNode();
} catch (XmlException e) {
throw new XmlRuntimeException(e);
}
}
public org.w3c.dom.Document loadSync(String sXml) {
return load(sXml);
}
}
|
apache/xmlgraphics-fop | 1,125 | fop-core/src/test/java/org/apache/fop/complexscripts/util/UtilTestSuite.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* $Id$ */
package org.apache.fop.complexscripts.util;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
/**
* Test suite for bidirectional functionality.
*/
@RunWith(Suite.class)
@SuiteClasses(NumberConverterTestCase.class)
public class UtilTestSuite {
}
|
google/binnavi | 1,117 | src/main/java/com/google/security/zynamics/binnavi/API/debug/DebuggerThreadCreatedReply.java | // Copyright 2011-2016 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.security.zynamics.binnavi.API.debug;
import com.google.security.zynamics.binnavi.debug.connection.packets.replies.ThreadCreatedReply;
public class DebuggerThreadCreatedReply extends DebuggerReply {
public DebuggerThreadCreatedReply(final ThreadCreatedReply reply) {
super(reply);
}
public long getThreadId() {
return ((ThreadCreatedReply) reply).getThreadId();
}
public ThreadState getThreadState() {
return ThreadState.convert(((ThreadCreatedReply) reply).getThreadState());
}
}
|
google/CallBuilder | 1,143 | java/com/google/callbuilder/style/ArrayListAdding.java | /*
* Copyright (C) 2015 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.callbuilder.style;
import java.util.ArrayList;
public class ArrayListAdding {
private ArrayListAdding() {}
public static <T> ArrayList<T> start() {
return new ArrayList<>();
}
public static <T> ArrayList<T> finish(ArrayList<T> list) {
return list;
}
public static <T> ArrayList<T> addTo(ArrayList<T> to, T item) {
to.add(item);
return to;
}
public static <T, E> ArrayList<T> addAllTo(ArrayList<T> to, Iterable<T> items) {
for (T item : items) {
to.add(item);
}
return to;
}
}
|
google/closure-templates | 1,130 | java/src/com/google/template/soy/logging/LoggingMethodsRuntime.java | /*
* Copyright 2020 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.logging;
import com.google.template.soy.data.SoyVisualElement;
import com.google.template.soy.data.SoyVisualElementData;
/** Runtime implementations of the Soy VE metadata methods. */
public final class LoggingMethodsRuntime {
public static LoggableElementMetadata getMetadata(SoyVisualElement ve) {
return ve.metadata();
}
public static LoggableElementMetadata getVeMetadata(SoyVisualElementData veData) {
return getMetadata(veData.ve());
}
private LoggingMethodsRuntime() {}
}
|
google/guava | 1,151 | android/guava/src/com/google/common/math/package-info.java | /*
* Copyright (C) 2011 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.
*/
/**
* Arithmetic functions operating on primitive values and on {@link java.math.BigInteger} and {@link
* java.math.BigDecimal} instances.
*
* <p>This package is a part of the open-source <a href="https://github.com/google/guava">Guava</a>
* library.
*
* <p>See the Guava User Guide article on <a
* href="https://github.com/google/guava/wiki/MathExplained">math utilities</a>.
*/
@CheckReturnValue
@NullMarked
package com.google.common.math;
import com.google.errorprone.annotations.CheckReturnValue;
import org.jspecify.annotations.NullMarked;
|
google/guava | 1,155 | guava/src/com/google/common/base/IgnoreJRERequirement.java | /*
* Copyright 2019 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 static java.lang.annotation.ElementType.CONSTRUCTOR;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
import java.lang.annotation.Target;
/**
* Disables Animal Sniffer's checking of compatibility with older versions of Java/Android.
*
* <p>Each package's copy of this annotation needs to be listed in our {@code pom.xml}.
*/
@Target({METHOD, CONSTRUCTOR, TYPE, FIELD})
@interface IgnoreJRERequirement {}
|
google/guava | 1,155 | guava/src/com/google/common/hash/IgnoreJRERequirement.java | /*
* Copyright 2019 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.hash;
import static java.lang.annotation.ElementType.CONSTRUCTOR;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
import java.lang.annotation.Target;
/**
* Disables Animal Sniffer's checking of compatibility with older versions of Java/Android.
*
* <p>Each package's copy of this annotation needs to be listed in our {@code pom.xml}.
*/
@Target({METHOD, CONSTRUCTOR, TYPE, FIELD})
@interface IgnoreJRERequirement {}
|
google/guava | 1,155 | guava/src/com/google/common/math/IgnoreJRERequirement.java | /*
* Copyright 2019 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.math;
import static java.lang.annotation.ElementType.CONSTRUCTOR;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
import java.lang.annotation.Target;
/**
* Disables Animal Sniffer's checking of compatibility with older versions of Java/Android.
*
* <p>Each package's copy of this annotation needs to be listed in our {@code pom.xml}.
*/
@Target({METHOD, CONSTRUCTOR, TYPE, FIELD})
@interface IgnoreJRERequirement {}
|
google/j2objc | 1,134 | jre_emul/android/platform/libcore/json/src/main/java/org/json/NonNull.java | /*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.json;
import static java.lang.annotation.ElementType.TYPE_USE;
import static java.lang.annotation.RetentionPolicy.SOURCE;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
// J2ObjC: stub version of the annotation used by org.json, so that package
// can be built separately from jre_emul without changing how its doc pages
// are generated.
/**
* Denotes that a type use can never be null.
*
* <p>This is a marker annotation and it has no specific attributes.
*/
@Retention(SOURCE)
@Target({TYPE_USE})
@interface NonNull {}
|
google/kiwi-solver | 1,153 | src/test/java/kiwi/variable/IntVarOffsetTest.java | /*
* Copyright 2016, 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 kiwi.variable;
import kiwi.Solver;
import kiwi.variable.IntVar;
import kiwi.variable.IntVarOffset;
public class IntVarOffsetTest extends IntVarTest {
@Override
public IntVar intVar(Solver solver, int min, int max) {
IntVar x = solver.intVar(min, max);
return new IntVarOffset(new IntVarOffset(new IntVarOffset(x, -10), 12), -2);
}
@Override
public IntVar intVar(Solver solver, int[] values) {
IntVar x = solver.intVar(values);
return new IntVarOffset(new IntVarOffset(new IntVarOffset(x, -10), 12), -2);
}
}
|
google/libphonenumber | 1,088 | java/libphonenumber/test/com/google/i18n/phonenumbers/metadata/source/SingleFileModeFileNameProviderTest.java | /*
* Copyright (C) 2022 The Libphonenumber 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.i18n.phonenumbers.metadata.source;
import junit.framework.TestCase;
public final class SingleFileModeFileNameProviderTest extends TestCase {
private final PhoneMetadataFileNameProvider metadataFileNameProvider =
new SingleFileModeFileNameProvider("some/file");
public void test_getFor_shouldReturnTheFileNameBase() {
String metadataFileName = metadataFileNameProvider.getFor("key1");
assertEquals("some/file", metadataFileName);
}
}
|
google/libphonenumber | 1,117 | java/demo/src/main/java/com/google/phonenumbers/demo/render/InputFormRenderer.java | /*
* Copyright (C) 2022 The Libphonenumber 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.
*
* @author Tobias Rogg
*/
package com.google.phonenumbers.demo.render;
import com.google.phonenumbers.demo.template.InputFormTemplates;
import com.google.phonenumbers.demo.template.InputFormTemplates.InputForm;
public class InputFormRenderer extends LibPhoneNumberRenderer<InputForm> {
@Override
public String genHtml() {
return super.render(
InputFormTemplates.InputForm.builder()
.setWelcomeTitle("Phone Number Parser Demo for LibPhoneNumber")
.build());
}
}
|
google/sagetv | 1,139 | test/java/sage/epg/sd/json/locale/SDRegionDeserializerTest.java | /*
* Copyright 2015 The SageTV Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package sage.epg.sd.json.locale;
import org.testng.annotations.Test;
import sage.epg.sd.DeserializeTest;
import java.io.IOException;
public class SDRegionDeserializerTest extends DeserializeTest
{
@Test(groups = {"gson", "schedulesDirect", "region" })
public void deserialize() throws IOException
{
// Source: https://json.schedulesdirect.org/20141201/available/countries
String regionJson = "epg/sd/json/locale/regions.json";
SDRegion regions[] = deserialize(regionJson, SDRegion[].class);
}
}
|
google/sagetv | 1,167 | third_party/Ogle/java/sage/dvd/DVDReader.java | /*
* Copyright 2015 The SageTV Authors. All Rights Reserved.
*
* Adapted from Ogle - A video player
* Copyright (C) 2000, 2001 Håkan Hjort
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*/
package sage.dvd;
public interface DVDReader
{
final static int DVD_TYPE_IFO = 0;
final static int DVD_TYPE_BUP = 1;
final static int DVD_TYPE_MENU = 2;
final static int DVD_TYPE_TITLE = 3;
boolean open(String path, String hostname);
void close();
DVDSource openFile(int title, int type);
}
|
google/santa-tracker-android | 1,097 | doodles-lib/src/main/java/com/google/android/apps/santatracker/doodles/shared/actor/ActorHelper.java | /*
* Copyright 2019. Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.apps.santatracker.doodles.shared.actor;
/** A collection of helper functions for Actor. */
public class ActorHelper {
public static float distanceBetween(Actor a, Actor b) {
return distanceBetween(a.position.x, a.position.y, b.position.x, b.position.y);
}
public static float distanceBetween(float x1, float y1, float x2, float y2) {
float dx = x1 - x2;
float dy = y1 - y2;
return (float) Math.sqrt(dx * dx + dy * dy);
}
}
|
googleads/googleads-java-lib | 1,100 | modules/ads_lib_axis/src/main/java/com/google/api/ads/common/lib/soap/axis/AxisSoapHeaderFactory.java | // Copyright 2013 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.api.ads.common.lib.soap.axis;
import com.google.api.ads.common.lib.client.AdsServiceDescriptor;
import java.lang.reflect.InvocationTargetException;
/** Factory for creating Axis soap headers. */
public interface AxisSoapHeaderFactory<D extends AdsServiceDescriptor> {
public Object createSoapHeader(D adsServiceDescriptor)
throws ClassNotFoundException, InvocationTargetException, NoSuchMethodException,
IllegalAccessException, InstantiationException;
}
|
googleapis/api-compiler | 1,131 | src/main/java/com/google/api/tools/framework/snippet/Layout.java | /*
* Copyright (C) 2016 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.api.tools.framework.snippet;
import com.google.api.tools.framework.snippet.Doc.GroupKind;
import com.google.auto.value.AutoValue;
/**
* Represents layout information
*/
@AutoValue
abstract class Layout {
static final Layout DEFAULT = create(Doc.BREAK, GroupKind.VERTICAL, 0);
abstract Doc separator();
abstract Doc.GroupKind groupKind();
abstract int nest();
static Layout create(Doc separator, Doc.GroupKind groupKind, int nest) {
return new AutoValue_Layout(separator, groupKind, nest);
}
}
|
googleapis/google-cloud-java | 1,032 | java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/AlterMetadataResourceLocationResponseOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/metastore/v1alpha/metastore.proto
// Protobuf Java Version: 3.25.8
package com.google.cloud.metastore.v1alpha;
public interface AlterMetadataResourceLocationResponseOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/google-cloud-java | 1,039 | java-financialservices/proto-google-cloud-financialservices-v1/src/main/java/com/google/cloud/financialservices/v1/ExportEngineConfigMetadataResponseOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/financialservices/v1/engine_config.proto
// Protobuf Java Version: 3.25.8
package com.google.cloud.financialservices.v1;
public interface ExportEngineConfigMetadataResponseOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.financialservices.v1.ExportEngineConfigMetadataResponse)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/google-cloud-java | 1,045 | java-workspaceevents/proto-google-cloud-workspaceevents-v1/src/main/java/com/google/apps/events/subscriptions/v1/ReactivateSubscriptionMetadataOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/apps/events/subscriptions/v1/subscriptions_service.proto
// Protobuf Java Version: 3.25.8
package com.google.apps.events.subscriptions.v1;
public interface ReactivateSubscriptionMetadataOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.apps.events.subscriptions.v1.ReactivateSubscriptionMetadata)
com.google.protobuf.MessageOrBuilder {}
|
googlearchive/gwt-google-apis | 1,050 | gears/samples/gwtnote/src/com/google/gwt/gears/sample/gwtnote/client/ui/RichTextToolbarStrings.java | // Copyright 2011 Google Inc. All Rights Reserved.
package com.google.gwt.gears.sample.gwtnote.client.ui;
import com.google.gwt.i18n.client.Constants;
/**
* This {@link Constants} interface is used to make the toolbar's strings
* internationalizable.
*/
public interface RichTextToolbarStrings extends Constants {
String black();
String blue();
String bold();
String color();
String createLink();
String font();
String green();
String hr();
String indent();
String insertImage();
String italic();
String justifyCenter();
String justifyLeft();
String justifyRight();
String large();
String medium();
String normal();
String ol();
String outdent();
String red();
String removeFormat();
String removeLink();
String size();
String small();
String strikeThrough();
String subscript();
String superscript();
String ul();
String underline();
String white();
String xlarge();
String xsmall();
String xxlarge();
String xxsmall();
String yellow();
} |
googleworkspace/java-samples | 1,135 | drive/snippets/drive_v2/src/test/java/TestDownloadFile.java | /*
* Copyright 2022 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.
*/
import static org.junit.Assert.assertEquals;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.security.GeneralSecurityException;
import org.junit.Test;
public class TestDownloadFile extends BaseTest {
@Test
public void downloadFile() throws IOException, GeneralSecurityException {
String id = createTestBlob();
ByteArrayOutputStream out = DownloadFile.downloadFile(id);
byte[] bytes = out.toByteArray();
assertEquals((byte) 0xFF, bytes[0]);
assertEquals((byte) 0xD8, bytes[1]);
}
}
|
googleworkspace/java-samples | 1,135 | drive/snippets/drive_v3/src/test/java/TestDownloadFile.java | /*
* Copyright 2022 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.
*/
import static org.junit.Assert.assertEquals;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.security.GeneralSecurityException;
import org.junit.Test;
public class TestDownloadFile extends BaseTest {
@Test
public void downloadFile() throws IOException, GeneralSecurityException {
String id = createTestBlob();
ByteArrayOutputStream out = DownloadFile.downloadFile(id);
byte[] bytes = out.toByteArray();
assertEquals((byte) 0xFF, bytes[0]);
assertEquals((byte) 0xD8, bytes[1]);
}
}
|
hibernate/hibernate-orm | 1,034 | hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/gambit/EntityWithManyToOneWithoutJoinTable.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.testing.orm.domain.gambit;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.ManyToOne;
/**
* @author Chris Cranford
*/
@Entity
public class EntityWithManyToOneWithoutJoinTable {
private Integer id;
private Integer someInteger;
private EntityWithOneToManyNotOwned owner;
EntityWithManyToOneWithoutJoinTable() {
}
public EntityWithManyToOneWithoutJoinTable(Integer id, Integer someInteger) {
this.id = id;
this.someInteger = someInteger;
}
@Id
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getSomeInteger() {
return someInteger;
}
public void setSomeInteger(Integer someInteger) {
this.someInteger = someInteger;
}
@ManyToOne
public EntityWithOneToManyNotOwned getOwner() {
return owner;
}
public void setOwner(EntityWithOneToManyNotOwned owner) {
this.owner = owner;
}
}
|
hibernate/hibernate-orm | 1,040 | hibernate-core/src/test/java/org/hibernate/orm/test/any/annotations/StringProperty.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.any.annotations;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import jakarta.persistence.Column;
@Entity
@Table(name="string_property")
public class StringProperty implements Property {
private Integer id;
private String name;
private String value;
public StringProperty() {
super();
}
public StringProperty(String name, String value) {
super();
this.name = name;
this.value = value;
}
@Id
@GeneratedValue
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public String asString() {
return value;
}
@Column(name = "`value`")
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public void setName(String name) {
this.name = name;
}
}
|
hibernate/hibernate-orm | 1,044 | hibernate-core/src/test/java/org/hibernate/orm/test/annotations/lob/MaterializedBlobEntity.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.annotations.lob;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Lob;
/**
* TODO : javadoc
*
* @author Steve Ebersole
*/
@Entity
public class MaterializedBlobEntity {
@Id()
@GeneratedValue(strategy = GenerationType.SEQUENCE)
private Long id;
private String name;
@Lob
private byte[] theBytes;
public MaterializedBlobEntity() {
}
public MaterializedBlobEntity(String name, byte[] theBytes) {
this.name = name;
this.theBytes = theBytes;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public byte[] getTheBytes() {
return theBytes;
}
public void setTheBytes(byte[] theBytes) {
this.theBytes = theBytes;
}
}
|
hibernate/hibernate-orm | 1,045 | hibernate-core/src/test/java/org/hibernate/orm/test/legacy/CompositeElement.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.legacy;
import java.io.Serializable;
public class CompositeElement implements Comparable, Serializable {
private String foo;
private String bar;
/**
* Returns the bar.
* @return String
*/
public String getBar() {
return bar;
}
/**
* Returns the foo.
* @return String
*/
public String getFoo() {
return foo;
}
/**
* Sets the bar.
* @param bar The bar to set
*/
public void setBar(String bar) {
this.bar = bar;
}
/**
* Sets the foo.
* @param foo The foo to set
*/
public void setFoo(String foo) {
this.foo = foo;
}
/**
* @see Comparable#compareTo(Object)
*/
public int compareTo(Object o) {
return ( (CompositeElement) o ).foo.compareTo(foo);
}
public int hashCode() {
return foo.hashCode() + bar.hashCode();
}
public boolean equals(Object that) {
CompositeElement ce = (CompositeElement) that;
return ce.bar.equals(bar) && ce.foo.equals(foo);
}
}
|
hibernate/hibernate-orm | 1,060 | hibernate-core/src/main/java/org/hibernate/tool/schema/extract/spi/ForeignKeyInformation.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.tool.schema.extract.spi;
import org.hibernate.boot.model.naming.Identifier;
/**
* @author Steve Ebersole
*/
public interface ForeignKeyInformation {
/**
* Obtain the identifier for this FK.
*
* @return The FK identifier.
*/
Identifier getForeignKeyIdentifier();
/**
* Get the column mappings that define the reference. Returned in sequential order.
*
* @return The sequential column reference mappings.
*/
Iterable<ColumnReferenceMapping> getColumnReferenceMappings();
interface ColumnReferenceMapping {
/**
* Obtain the information about the referencing column (the source column, which points to
* the referenced column).
*
* @return The referencing column.
*/
ColumnInformation getReferencingColumnMetadata();
/**
* Obtain the information about the referenced column (the target side).
*
* @return The referenced column
*/
ColumnInformation getReferencedColumnMetadata();
}
}
|
hibernate/hibernate-orm | 1,070 | hibernate-core/src/test/java/org/hibernate/orm/test/softdelete/timestamp/BadAss.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.softdelete.timestamp;
import jakarta.persistence.ElementCollection;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Basic;
import org.hibernate.annotations.Bag;
import org.hibernate.annotations.SoftDelete;
import org.hibernate.annotations.SoftDeleteType;
import org.hibernate.orm.test.softdelete.CustomTrueFalseConverter;
import java.util.List;
/**
* @author Steve Ebersole
*/
@Entity
public class BadAss {
@Id
private Integer id;
@Basic
private String name;
@Bag
@ElementCollection
@SoftDelete(strategy = SoftDeleteType.TIMESTAMP, converter = CustomTrueFalseConverter.class)
private List<String> labels;
protected BadAss() {
// for Hibernate use
}
public BadAss(Integer id, String name) {
this.id = id;
this.name = name;
}
public Integer getId() {
return id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
|
hibernate/hibernate-orm | 1,082 | hibernate-core/src/test/java/org/hibernate/orm/test/mapping/type/java/OffsetDateTimeDescriptorTest.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.mapping.type.java;
import java.time.LocalDateTime;
import java.time.OffsetDateTime;
import java.time.ZoneOffset;
import org.hibernate.type.descriptor.java.OffsetDateTimeJavaType;
/**
* @author Jordan Gigov
*/
public class OffsetDateTimeDescriptorTest extends AbstractDescriptorTest<OffsetDateTime> {
final OffsetDateTime original = OffsetDateTime.of(LocalDateTime.of( 2016, 10, 8, 15, 13 ), ZoneOffset.ofHoursMinutes( 2, 0));
final OffsetDateTime copy = OffsetDateTime.of(LocalDateTime.of( 2016, 10, 8, 15, 13 ), ZoneOffset.ofHoursMinutes( 2, 0));
final OffsetDateTime different = OffsetDateTime.of(LocalDateTime.of( 2016, 10, 8, 15, 13 ), ZoneOffset.ofHoursMinutes( 4, 30));
public OffsetDateTimeDescriptorTest() {
super( OffsetDateTimeJavaType.INSTANCE);
}
@Override
protected Data<OffsetDateTime> getTestData() {
return new Data<>( original, copy, different );
}
@Override
protected boolean shouldBeMutable() {
return false;
}
}
|
hibernate/hibernate-orm | 1,086 | hibernate-core/src/main/java/org/hibernate/stat/EntityStatistics.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.stat;
import java.io.Serializable;
/**
* Entity-related statistics.
*
* @author Gavin King
* @author Steve Ebersole
*/
public interface EntityStatistics extends CacheableDataStatistics, Serializable {
/**
* Number of times (since last Statistics clearing) this entity
* has been deleted
*/
long getDeleteCount();
/**
* Number of times (since last Statistics clearing) this entity
* has been inserted
*/
long getInsertCount();
/**
* Number of times (since last Statistics clearing) this entity
* has been updated
*/
long getUpdateCount();
/**
* Number of times (since last Statistics clearing) this entity
* has been loaded
*/
long getLoadCount();
/**
* Number of times (since last Statistics clearing) this entity
* has been fetched
*/
long getFetchCount();
/**
* Number of times (since last Statistics clearing) this entity
* has experienced an optimistic lock failure.
*/
long getOptimisticFailureCount();
}
|
hibernate/hibernate-search | 1,039 | backend/elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/types/dsl/provider/impl/Elasticsearch812IndexFieldTypeFactoryProvider.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.backend.elasticsearch.types.dsl.provider.impl;
import org.hibernate.search.backend.elasticsearch.types.mapping.impl.Elasticsearch812VectorFieldTypeMappingContributor;
import org.hibernate.search.backend.elasticsearch.types.mapping.impl.ElasticsearchVectorFieldTypeMappingContributor;
import com.google.gson.Gson;
/**
* The index field type factory provider for ES8.12-8.13.
*/
public class Elasticsearch812IndexFieldTypeFactoryProvider extends AbstractIndexFieldTypeFactoryProvider {
private final Elasticsearch812VectorFieldTypeMappingContributor vectorFieldTypeMappingContributor =
new Elasticsearch812VectorFieldTypeMappingContributor();
public Elasticsearch812IndexFieldTypeFactoryProvider(Gson userFacingGson) {
super( userFacingGson );
}
@Override
protected ElasticsearchVectorFieldTypeMappingContributor vectorFieldTypeMappingContributor() {
return vectorFieldTypeMappingContributor;
}
}
|
hibernate/hibernate-search | 1,090 | v5migrationhelper/engine/src/main/java/org/hibernate/search/scope/spi/V5MigrationSearchScope.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.scope.spi;
import java.util.Set;
import org.hibernate.search.engine.backend.index.IndexManager;
import org.hibernate.search.engine.search.aggregation.dsl.SearchAggregationFactory;
import org.hibernate.search.engine.search.predicate.dsl.SearchPredicateFactory;
import org.hibernate.search.engine.search.projection.SearchProjection;
import org.hibernate.search.engine.search.projection.dsl.SearchProjectionFactory;
import org.hibernate.search.engine.search.sort.dsl.SearchSortFactory;
/**
* @deprecated This class will be removed without replacement. Use actual API instead.
*/
@Deprecated
public interface V5MigrationSearchScope {
Set<Class<?>> targetTypes();
Set<IndexManager> indexManagers();
SearchPredicateFactory predicate();
SearchSortFactory sort();
SearchProjectionFactory<?, ?> projection();
SearchProjection<Object> idProjection();
SearchProjection<? extends Class<?>> objectClassProjection();
SearchAggregationFactory aggregation();
}
|
hibernate/hibernate-shards | 1,123 | src/test/java/org/hibernate/shards/criteria/SubcriteriaFactoryDefaultMock.java | /**
* Copyright (C) 2007 Google Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
package org.hibernate.shards.criteria;
import org.hibernate.Criteria;
/**
* @author maxr@google.com (Max Ross)
*/
public class SubcriteriaFactoryDefaultMock implements SubcriteriaFactory {
public Criteria createSubcriteria(Criteria parent,
Iterable<CriteriaEvent> events) {
throw new UnsupportedOperationException();
}
}
|
openjdk/jdk8 | 1,150 | langtools/test/tools/javac/processing/model/element/8009367/p/Q.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.
*/
package p;
import java.lang.annotation.Repeatable;
@Repeatable(QQ.class)
public @interface Q {}
|
openjdk/jdk8 | 1,179 | jdk/test/sun/nio/cs/X11CNS11643P1.java | /*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
public class X11CNS11643P1 extends X11CNS11643 {
public X11CNS11643P1() {
super(1, "X11CNS11643P1");
}
}
|
openjdk/jdk8 | 1,179 | jdk/test/sun/nio/cs/X11CNS11643P2.java | /*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
public class X11CNS11643P2 extends X11CNS11643 {
public X11CNS11643P2() {
super(2, "X11CNS11643P2");
}
}
|
openjdk/jdk8 | 1,179 | jdk/test/sun/nio/cs/X11CNS11643P3.java | /*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
public class X11CNS11643P3 extends X11CNS11643 {
public X11CNS11643P3() {
super(3, "X11CNS11643P3");
}
}
|
oracle/coherence | 1,115 | prj/coherence-core/src/main/java/com/tangosol/run/component/ExecutionContextAware.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.run.component;
/**
* This interface is implemented by any class that wishes to be registered
* within an execution context. There are two reasons to implement this
* interface:
* <ol>
* <li> To react to registration within a context
* <li> To react to deregistration from the same
* </ol>
* Most importantly, the deregistration allows the object to clean itself
* up. One example is a session EJB client "removing" its session beans.
*
* @version 1.00, 2001.04.13
* @author Cameron Purdy
*/
public interface ExecutionContextAware
{
/**
* Invoked when the object is registered within an execution context.
*
* @param ctx the ExecutionContext
*/
public void valueBound(ExecutionContext ctx);
/**
* Invoked when the object is unregistered by an execution context.
*
* @param ctx the ExecutionContext
*/
public void valueUnbound(ExecutionContext ctx);
}
|
oracle/coherence | 1,117 | prj/coherence-core/src/main/java/com/tangosol/dev/assembler/If_icmpeq.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.dev.assembler;
import java.io.IOException;
import java.io.DataInput;
import java.io.DataOutput;
/**
* The IF_ICMPEQ op branches to the label if the top two integers on the stack
* are equal.
* <p><code><pre>
* JASM op : IF_ICMPEQ (0x9f)
* JVM byte code(s): IF_ICMPEQ (0x9f)
* Details :
* </pre></code>
*
* @version 0.50, 06/14/98, assembler/dis-assembler
* @author Cameron Purdy
*/
public class If_icmpeq extends OpBranch implements Constants
{
// ----- constructors ---------------------------------------------------
/**
* Construct the op.
*
* @param label the label to branch to
*/
public If_icmpeq(Label label)
{
super(IF_ICMPEQ, label);
}
// ----- data members ---------------------------------------------------
/**
* The name of this class.
*/
private static final String CLASS = "If_icmpeq";
}
|
apache/deltaspike | 1,095 | deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/RequestScopedJob.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.deltaspike.test.scheduler.custom;
import org.apache.deltaspike.scheduler.api.Scheduled;
import jakarta.enterprise.context.RequestScoped;
@RequestScoped
@Scheduled(cronExpression = "*/1 * * * * ?", onStartup = false)
public class RequestScopedJob implements CustomJob
{
}
|
apache/deltaspike | 1,098 | deltaspike/core/api/obsolete/src/main/java/org/apache/deltaspike/core/api/control/ExceptionHandlingFlow.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.deltaspike.core.api.exception.control;
/**
* Enum of exception handling states. Used in the dispatcher to determine how to markHandled.
*/
public enum ExceptionHandlingFlow
{
HANDLED,
HANDLED_AND_CONTINUE,
SKIP_CAUSE,
ABORT,
THROW_ORIGINAL,
THROW
}
|
apache/deltaspike | 1,100 | deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/audit/AuditPropertyException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.deltaspike.data.impl.audit;
public class AuditPropertyException extends RuntimeException
{
private static final long serialVersionUID = -8725707870578473975L;
public AuditPropertyException(String message, Throwable cause)
{
super(message, cause);
}
}
|
apache/deltaspike | 1,104 | deltaspike/modules/jpa/api/src/main/java/org/apache/deltaspike/jpa/spi/transaction/TransactionStrategy.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.deltaspike.jpa.spi.transaction;
import org.apache.deltaspike.core.spi.InterceptorStrategy;
/**
* Marker interface for a plugable strategy for {@link org.apache.deltaspike.jpa.api.transaction.Transactional}.
*/
public interface TransactionStrategy extends InterceptorStrategy
{
}
|
apache/derby | 1,127 | java/org.apache.derby.engine/org/apache/derby/impl/store/access/btree/WaitError.java | /*
Derby - Class org.apache.derby.impl.store.access.btree.WaitError
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to you under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS 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.impl.store.access.btree;
/**
This error is never seen outside of the btree implementation. It is raised
when an operation could not procede because it would have had to wait.
**/
public class WaitError extends Throwable
{
}
|
apache/directory-scimple | 1,099 | scim-spec/scim-spec-schema/src/main/java/org/apache/directory/scim/spec/filter/CompareOperator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.directory.scim.spec.filter;
public enum CompareOperator {
EQ, // equal
NE, // not equal
CO, // contains
SW, // starts with
EW, // ends with
PR, // present (has value)
GT, // greater than
GE, // greater than or equal
LT, // greater than
LE; // greater than or equal
}
|
apache/drill | 1,131 | exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/PhysicalConfig.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.drill.exec.physical.impl;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface PhysicalConfig {
Class<?> value();
}
|
apache/druid | 1,121 | processing/src/main/java/org/apache/druid/segment/filter/cnf/CNFFilterExplosionException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.druid.segment.filter.cnf;
import org.apache.druid.java.util.common.StringUtils;
public class CNFFilterExplosionException extends Exception
{
public CNFFilterExplosionException(String formatText, Object... arguments)
{
super(StringUtils.nonStrictFormat(formatText, arguments));
}
}
|
apache/druid | 1,135 | processing/src/test/java/org/apache/druid/segment/TestFloatColumnSelector.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.druid.segment;
import org.apache.druid.query.monomorphicprocessing.RuntimeShapeInspector;
public abstract class TestFloatColumnSelector implements FloatColumnSelector
{
@Override
public void inspectRuntimeShape(RuntimeShapeInspector inspector)
{
// Don't care about runtime shape in tests
}
}
|
apache/dubbo-spi-extensions | 1,092 | dubbo-rpc-extensions/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/Constants.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.rpc.protocol.rest;
/**
* Constants definition.
*/
public interface Constants {
String KEEP_ALIVE_KEY = "keepalive";
boolean DEFAULT_KEEP_ALIVE = true;
String EXTENSION_KEY = "extension";
// http server
String NETTY_HTTP = "netty_http";
}
|
apache/eagle | 1,130 | eagle-core/eagle-common/src/main/java/org/apache/eagle/common/security/PermitAll.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eagle.common.security;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface PermitAll {
}
|
apache/fineract | 1,089 | fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauReadPlatformService.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.infrastructure.creditbureau.service;
import java.util.Collection;
import org.apache.fineract.infrastructure.creditbureau.data.CreditBureauData;
public interface CreditBureauReadPlatformService {
Collection<CreditBureauData> retrieveCreditBureau();
}
|
apache/fineract | 1,112 | fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/HashingService.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.infrastructure.core.service;
import com.google.common.hash.Hashing;
import org.springframework.stereotype.Component;
@Component
public class HashingService {
public int consistentHash(long input, int buckets) {
return Hashing.consistentHash(input, buckets);
}
}
|
apache/fineract | 1,122 | fineract-command/src/test/java/org/apache/fineract/command/sample/command/DummyCommand.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.command.sample.command;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.fineract.command.core.Command;
import org.apache.fineract.command.sample.data.DummyRequest;
@Data
@EqualsAndHashCode(callSuper = true)
public class DummyCommand extends Command<DummyRequest> {}
|
apache/flink | 1,104 | flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/lineage/TableSourceLineageVertex.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.flink.table.planner.lineage;
import org.apache.flink.annotation.PublicEvolving;
import org.apache.flink.streaming.api.lineage.SourceLineageVertex;
/** Source lineage vertex for table. */
@PublicEvolving
public interface TableSourceLineageVertex extends SourceLineageVertex {}
|
apache/flink | 1,129 | flink-runtime/src/main/java/org/apache/flink/runtime/webmonitor/stats/Statistics.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.flink.runtime.webmonitor.stats;
/** Represents one or more statistics samples. */
public interface Statistics {
/**
* Returns the timestamp when the last sample of this {@link Statistics} was collected.
*
* @return the timestamp of the last sample.
*/
long getEndTime();
}
|
apache/freemarker | 1,131 | freemarker-core/src/main/java/freemarker/core/FlowControlException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package freemarker.core;
/**
* Exception that's not really an exception, just used for flow control.
*/
@SuppressWarnings("serial")
class FlowControlException extends RuntimeException {
FlowControlException() {
super();
}
FlowControlException(String message) {
super(message);
}
}
|
apache/geaflow | 1,080 | geaflow-console/app/common/util/src/main/java/org/apache/geaflow/console/common/util/type/GeaflowOperationType.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.util.type;
public enum GeaflowOperationType {
CREATE,
UPDATE,
DELETE,
/**
* operations for job.
*/
PUBLISH,
START,
STOP,
REFRESH,
RESET,
STARTUP_NOTIFY,
FINISH,
}
|
apache/geaflow | 1,095 | geaflow-console/app/common/dal/src/main/java/org/apache/geaflow/console/common/dal/mapper/GraphStructMappingMapper.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.GraphStructMappingEntity;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface GraphStructMappingMapper extends GeaflowBaseMapper<GraphStructMappingEntity> {
}
|
apache/geaflow | 1,095 | geaflow-console/app/common/dal/src/main/java/org/apache/geaflow/console/common/dal/mapper/JobResourceMappingMapper.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.JobResourceMappingEntity;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface JobResourceMappingMapper extends GeaflowBaseMapper<JobResourceMappingEntity> {
}
|
apache/geaflow | 1,096 | geaflow/geaflow-core/geaflow-api/src/main/java/org/apache/geaflow/api/function/iterator/RichIteratorFunction.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.iterator;
public interface RichIteratorFunction {
/**
* Initialize the windowId iteration.
*/
void initIteration(long windowId);
/**
* Finish the windowId iteration.
*/
void finishIteration(long windowId);
}
|
apache/geode | 1,119 | geode-junit/src/main/java/org/apache/geode/management/internal/cli/commands/TestCompressor.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.management.internal.cli.commands;
import org.apache.geode.compression.Compressor;
public class TestCompressor implements Compressor {
@Override
public byte[] compress(byte[] input) {
return new byte[0];
}
@Override
public byte[] decompress(byte[] input) {
return new byte[0];
}
}
|
apache/giraph | 1,121 | giraph-block-app/src/main/java/org/apache/giraph/block_app/framework/api/local/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.
*/
/**
* Local (single machine) implementation of graph processing system API used by
* Blocks Framework.
*
* Allows efficient execution of Block Applications on small graphs, as well as
* comprehensive set of optional checks helping with unit tests.
*/
package org.apache.giraph.block_app.framework.api.local;
|
apache/giraph | 1,130 | giraph-core/src/main/java/org/apache/giraph/types/ByteWritableToLongUnwrapper.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.giraph.types;
import org.apache.hadoop.io.ByteWritable;
/**
* Converts ByteWritables to Longs
*/
public class ByteWritableToLongUnwrapper
implements WritableUnwrapper<ByteWritable, Long> {
@Override
public Long unwrap(ByteWritable writableValue) {
return (long) writableValue.get();
}
}
|
apache/gobblin | 1,119 | gobblin-core/src/main/java/org/apache/gobblin/source/extractor/schema/ArrayDataType.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.gobblin.source.extractor.schema;
import lombok.Getter;
public class ArrayDataType extends DataType {
@Getter
String items;
public ArrayDataType(String type, String items) {
super(type);
this.items = items;
}
public void setItems(String items) {
this.items = items;
}
}
|
apache/gobblin | 1,127 | gobblin-runtime/src/main/java/org/apache/gobblin/runtime/job/TaskProgress.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.gobblin.runtime.job;
import org.apache.gobblin.configuration.WorkUnitState;
/**
* Interface used to retrieve the progress of a task in a Gobblin job.
*/
public interface TaskProgress {
String getJobId();
String getTaskId();
WorkUnitState.WorkingState getWorkingState();
boolean isCompleted();
}
|
apache/gobblin | 1,135 | gobblin-runtime/src/test/java/org/apache/hadoop/fs/FileSystemTestUtils.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.fs;
import java.io.IOException;
import java.net.URI;
import org.apache.hadoop.conf.Configuration;
public class FileSystemTestUtils {
public static void addFileSystemForTest(URI uri, Configuration conf, FileSystem fs) throws IOException {
FileSystem.addFileSystemForTesting(uri, conf, fs);
}
}
|
apache/hadoop | 1,050 | hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/store/sql/ResultSetHandler.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.yarn.server.federation.store.sql;
import java.sql.SQLException;
/**
* Result Set Handler.
*
* @param <T> Generic T.
*/
public interface ResultSetHandler<T> {
T handle(Object... params) throws SQLException;
}
|
apache/hadoop | 1,103 | hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/util/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.
*/
/**
* General helpers for implementing raw erasure coders.
*/
@InterfaceAudience.Private
@InterfaceStability.Unstable
package org.apache.hadoop.io.erasurecode.rawcoder.util;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability; |
apache/hadoop | 1,107 | hadoop-cloud-storage-project/hadoop-tos/src/main/java/org/apache/hadoop/fs/tosfs/ops/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.
*/
/**
* Classes for hadoop-tos ops.
*/
@InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce", "YARN", "Hive"})
@InterfaceStability.Evolving
package org.apache.hadoop.fs.tosfs.ops;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
|
apache/hama | 1,147 | core/src/main/java/org/apache/hama/bsp/Schedulable.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hama.bsp;
import java.io.IOException;
/**
* This is the class that schedules commands to GroomServer(s)
*/
public interface Schedulable {
/**
* Schedule job immediately.
*
* @param job to be scheduled.
* @throws IOException
*/
void schedule(JobInProgress job)
throws IOException;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.