repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
apache/fory | 1,142 | java/fory-test-core/src/test/java/org/apache/fory/test/bean/StructTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fory.test.bean;
import org.testng.Assert;
import org.testng.annotations.Test;
public class StructTest {
@Test
public void testStruct() {
Class<?> structClass = Struct.createStructClass("StructTestClass", 1);
Assert.assertEquals(Struct.createPOJO(structClass), Struct.createPOJO(structClass));
}
}
|
apache/fory | 1,144 | java/fory-core/src/main/java/org/apache/fory/exception/InsecureException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fory.exception;
/**
* If class registration is enabled, and class of object which is being serialized is not
* registered(i.e. not in white-list), then this exception will be thrown.
*/
public class InsecureException extends ForyException {
public InsecureException(String message) {
super(message);
}
}
|
apache/geaflow | 1,075 | geaflow-kubernetes-operator/geaflow-kubernetes-operator-web/src/main/java/org/apache/geaflow/kubernetes/operator/web/view/GeaflowJobView.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.kubernetes.operator.web.view;
import lombok.Data;
import org.apache.geaflow.kubernetes.operator.core.model.customresource.GeaflowJobSpec;
@Data
public class GeaflowJobView {
private String name;
private GeaflowJobSpec spec;
}
|
apache/geaflow | 1,097 | geaflow/geaflow-dsl/geaflow-dsl-runtime/src/main/java/org/apache/geaflow/dsl/runtime/function/table/JoinTableFunction.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.geaflow.dsl.runtime.function.table;
import java.io.Serializable;
import org.apache.calcite.sql.JoinType;
import org.apache.geaflow.dsl.common.data.Row;
public interface JoinTableFunction extends Serializable {
Row join(Row left, Row right, JoinType joinType);
}
|
apache/geaflow | 1,119 | geaflow/geaflow-core/geaflow-api/src/main/java/org/apache/geaflow/api/partition/IPartition.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.partition;
import java.io.Serializable;
/**
* Interface for defining partition rule.
*/
@FunctionalInterface
public interface IPartition<T> extends Serializable {
/**
* Compute the partition list for value.
*/
int[] partition(T value, int numPartition);
}
|
apache/geode | 1,111 | extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/Tomcat6CommitSessionValve.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.modules.session.catalina;
import org.apache.catalina.connector.Response;
@Deprecated
public final class Tomcat6CommitSessionValve
extends AbstractCommitSessionValve<Tomcat6CommitSessionValve> {
@Override
protected Response wrapResponse(Response response) {
return response;
}
}
|
apache/giraph | 1,137 | giraph-core/src/main/java/org/apache/giraph/types/ByteWritableToIntUnwrapper.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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 Integers to ByteWritables
*/
public class ByteWritableToIntUnwrapper
implements WritableUnwrapper<ByteWritable, Integer> {
@Override
public Integer unwrap(ByteWritable writableValue) {
return (int) writableValue.get();
}
}
|
apache/giraph | 1,139 | giraph-core/src/main/java/org/apache/giraph/types/IntToIntWritableWrapper.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.IntWritable;
/**
* Converts Integers to IntWritables
*/
public class IntToIntWritableWrapper
implements WritableWrapper<IntWritable, Integer> {
@Override
public void wrap(Integer javaValue, IntWritable writableValue) {
writableValue.set(javaValue);
}
}
|
apache/gobblin | 1,142 | gobblin-api/src/test/java/org/apache/gobblin/util/test/BaseClass.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.util.test;
import lombok.EqualsAndHashCode;
import java.util.Random;
/**
* Used for {@link org.apache.gobblin.util.io.GsonInterfaceAdapterTest}.
*/
@EqualsAndHashCode
public class BaseClass {
public BaseClass() {
this.field = Integer.toString(new Random().nextInt());
}
private String field;
}
|
apache/grails-core | 1,120 | grails-gsp/plugin/src/test/groovy/org/grails/web/taglib/JsessionIdMockHttpServletResponse.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.grails.web.taglib;
import org.springframework.mock.web.MockHttpServletResponse;
public class JsessionIdMockHttpServletResponse extends MockHttpServletResponse {
@Override
public String encodeURL(String url) {
return super.encodeURL(url + ";jsessionid=test");
}
}
|
apache/groovy | 1,153 | src/main/java/org/codehaus/groovy/runtime/memoize/FlexibleCache.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.codehaus.groovy.runtime.memoize;
/**
* An EvictableCache supporting a getAndPut variant with additional control over caching.
*
* @since 5.0.0
*/
public interface FlexibleCache<K, V> extends EvictableCache<K, V> {
V getAndPut(K key, ValueProvider<? super K, ? extends V> valueProvider, boolean shouldCache);
}
|
apache/hadoop-mapreduce | 1,129 | src/contrib/raid/src/java/org/apache/hadoop/raid/RaidConfigurationException.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.raid;
/**
* Thrown when the config file for {@link CronNode} is malformed.
*/
public class RaidConfigurationException extends Exception {
private static final long serialVersionUID = 4046516718965587999L;
public RaidConfigurationException(String message) {
super(message);
}
}
|
apache/hadoop-mapreduce | 1,163 | src/java/org/apache/hadoop/mapred/TIPStatus.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.mapred;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
/** The states of a {@link TaskInProgress} as seen by the JobTracker.
*/
@InterfaceAudience.Private
@InterfaceStability.Unstable
public enum TIPStatus {
PENDING, RUNNING, COMPLETE, KILLED, FAILED;
} |
apache/hadoop | 1,053 | hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/GetCountersRequest.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.mapreduce.v2.api.protocolrecords;
import org.apache.hadoop.mapreduce.v2.api.records.JobId;
public interface GetCountersRequest {
public abstract JobId getJobId();
public abstract void setJobId(JobId jobId);
}
|
apache/hadoop | 1,053 | hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/GetJobReportRequest.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.mapreduce.v2.api.protocolrecords;
import org.apache.hadoop.mapreduce.v2.api.records.JobId;
public interface GetJobReportRequest {
public abstract JobId getJobId();
public abstract void setJobId(JobId jobId);
}
|
apache/hadoop | 1,075 | hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/volume/csi/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.
*/
/**
* This package contains common volume related classes.
*/
@Private
@Unstable
package org.apache.hadoop.yarn.server.volume.csi;
import org.apache.hadoop.classification.InterfaceAudience.Private;
import org.apache.hadoop.classification.InterfaceStability.Unstable; |
apache/hadoop | 1,112 | hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/diskbalancer/planner/Planner.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.hdfs.server.diskbalancer.planner;
import org.apache.hadoop.hdfs.server.diskbalancer.datamodel
.DiskBalancerDataNode;
/**
* Planner interface allows different planners to be created.
*/
public interface Planner {
NodePlan plan(DiskBalancerDataNode node) throws Exception;
}
|
apache/harmony | 1,108 | classlib/modules/security/src/test/impl/java/org/apache/harmony/security/tests/x509/DistributionPointTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.harmony.security.tests.x509;
import org.apache.harmony.security.x509.DistributionPoint;
import junit.framework.TestCase;
public class DistributionPointTest extends TestCase {
public void test_Ctor() {
// no exceptions
new DistributionPoint();
}
}
|
apache/harmony | 1,120 | classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/png/PNGImageReader.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.harmony.x.imageio.plugins.png;
import javax.imageio.spi.ImageReaderSpi;
import org.apache.harmony.x.imageio.plugins.AwtImageReader;
public class PNGImageReader extends AwtImageReader {
public PNGImageReader(ImageReaderSpi imageReaderSpi) {
super(imageReaderSpi);
}
}
|
apache/harmony | 1,123 | classlib/modules/auth/src/main/java/common/javax/security/auth/login/CredentialException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package javax.security.auth.login;
public class CredentialException extends LoginException {
private static final long serialVersionUID = -4772893876810601859L;
public CredentialException() {
super();
}
public CredentialException(String message) {
super(message);
}
}
|
apache/harmony | 1,123 | classlib/modules/auth/src/main/java/common/javax/security/auth/login/FailedLoginException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package javax.security.auth.login;
public class FailedLoginException extends LoginException {
private static final long serialVersionUID = 802556922354616286L;
public FailedLoginException() {
super();
}
public FailedLoginException(String message) {
super(message);
}
} |
apache/hbase | 1,133 | hbase-server/src/test/java/org/apache/hadoop/hbase/constraint/AllFailConstraint.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hbase.constraint;
import org.apache.hadoop.hbase.client.Put;
/**
* Always fail the put.
*/
public class AllFailConstraint extends BaseConstraint {
@Override
public void check(Put p) throws ConstraintException {
throw new ConstraintException("AllFailConstraint fails for all puts");
}
}
|
apache/hcatalog | 1,122 | storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/RevisionManagerProtocol.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.hcatalog.hbase.snapshot;
import org.apache.hadoop.hbase.ipc.CoprocessorProtocol;
/**
* Interface marker to implement RevisionManager as Coprocessor.
* (needs to extend CoprocessorProtocol)
*/
public interface RevisionManagerProtocol extends RevisionManager,
CoprocessorProtocol {
}
|
apache/ignite-3 | 1,114 | modules/cli/src/main/java/org/apache/ignite/internal/cli/config/ini/SectionAlreadyExistsException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.internal.cli.config.ini;
/**
* Exception when already created INI section trying to create.
*/
public class SectionAlreadyExistsException extends RuntimeException {
public SectionAlreadyExistsException(String name) {
super("Section " + name + " already exists");
}
}
|
apache/ignite-3 | 1,116 | modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/RowPartitionExtractor.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.internal.sql.engine.exec;
/** Calculate partition according to supplied row. */
@FunctionalInterface
public interface RowPartitionExtractor<RowT> {
/**
* Calculate partition based on supplied row.
*
* @return Resolved partition.
*/
int partition(RowT row);
}
|
apache/ignite | 1,084 | modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOnheapMultiNodeFullApiSelfTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.ignite.internal.processors.cache.distributed.near;
/** */
public class GridCacheAtomicOnheapMultiNodeFullApiSelfTest extends GridCacheAtomicOnheapFullApiSelfTest {
/** {@inheritDoc} */
@Override protected int gridCount() {
return 3;
}
}
|
apache/ignite | 1,095 | modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryNoPairedConnectionsTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.spi.communication.tcp;
/**
*
*/
public class GridTcpCommunicationSpiRecoveryNoPairedConnectionsTest extends GridTcpCommunicationSpiRecoverySelfTest {
/** {@inheritDoc} */
@Override protected boolean usePairedConnections() {
return false;
}
}
|
apache/incubator-atlas | 1,120 | catalog/src/main/java/org/apache/atlas/catalog/exception/ResourceAlreadyExistsException.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.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.atlas.catalog.exception;
/**
* Exception used when an attempt is made to create a resource which already exists.
*/
public class ResourceAlreadyExistsException extends CatalogException {
public ResourceAlreadyExistsException(String message) {
super(message, 409);
}
}
|
apache/incubator-hivemall | 1,136 | core/src/main/java/hivemall/utils/collections/IMapIterator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package hivemall.utils.collections;
import hivemall.utils.lang.Copyable;
public interface IMapIterator<K, V> {
public boolean hasNext();
/**
* @return -1 if not found
*/
public int next();
public K getKey();
public V getValue();
public <T extends Copyable<V>> void getValue(T probe);
}
|
apache/incubator-hugegraph-computer | 1,102 | computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/network/ClientHandler.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with this
* work for additional information regarding copyright ownership. The ASF
* licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package org.apache.hugegraph.computer.core.network;
public interface ClientHandler extends TransportHandler {
/**
* Invoked when the channel associated with the given connectionId channel
* is able to send data immediately.
*/
void sendAvailable(ConnectionId connectionId);
}
|
apache/incubator-kie-drools | 1,110 | drools-model/drools-model-compiler/src/test/java/org/drools/modelcompiler/domain/Man.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.drools.modelcompiler.domain;
public class Man extends Adult {
private Woman wife;
public Man(String name, int age) {
super(name, age);
}
public Woman getWife() {
return wife;
}
public void setWife(Woman wife) {
this.wife = wife;
}
}
|
apache/incubator-kie-drools | 1,130 | kie-api/src/main/java/org/kie/api/definition/type/PropertyChangeSupport.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.kie.api.definition.type;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = ElementType.TYPE)
public @interface PropertyChangeSupport {
}
|
apache/incubator-kie-kogito-apps | 1,076 | jobs-service/jobs-service-storage-jpa/src/test/java/org/kie/kogito/jobs/service/profiles/PostgreSQLQuarkusTestProfile.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.kie.kogito.jobs.service.profiles;
import io.quarkus.test.junit.QuarkusTestProfile;
public class PostgreSQLQuarkusTestProfile implements QuarkusTestProfile {
@Override
public String getConfigProfile() {
return "test-postgresql";
}
}
|
apache/incubator-kie-kogito-apps | 1,082 | jobs-service/jobs-service-infinispan/src/test/java/org/kie/kogito/jobs/service/messaging/InfinispanMessagingApiTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.kie.kogito.jobs.service.messaging;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
@QuarkusTest
@TestProfile(InfinispanEventSupportTestProfile.class)
public class InfinispanMessagingApiTest extends BaseMessagingApiTest {
}
|
apache/incubator-kie-kogito-apps | 1,083 | jobs-service/jobs-service-mongodb/src/test/java/org/kie/kogito/jobs/service/resource/KeycloakMongoDBJobServiceTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.kie.kogito.jobs.service.resource;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
@QuarkusTest
@TestProfile(KeycloakQuarkusTestProfile.class)
public class KeycloakMongoDBJobServiceTest extends BaseKeycloakJobServiceTest {
}
|
apache/incubator-kie-kogito-runtimes | 1,086 | kogito-codegen-modules/kogito-codegen-processes/src/test/java/org/kie/kogito/codegen/data/JacksonData.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.kie.kogito.codegen.data;
import com.fasterxml.jackson.databind.JsonNode;
public class JacksonData {
private JsonNode node;
public JsonNode getNode() {
return node;
}
public void setNode(JsonNode node) {
this.node = node;
}
}
|
apache/incubator-nemo | 1,132 | common/src/main/java/org/apache/nemo/common/partitioner/IntactPartitioner.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.nemo.common.partitioner;
/**
* An implementation of {@link Partitioner} which makes an output data
* from a source task to a single partition.
*/
public final class IntactPartitioner implements Partitioner<Integer> {
@Override
public Integer partition(final Object element) {
return 0;
}
}
|
apache/incubator-xtable | 1,133 | xtable-api/src/main/java/org/apache/xtable/spi/extractor/TableExtractor.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.xtable.spi.extractor;
import org.apache.xtable.model.InternalTable;
/**
* Extracts {@link InternalTable} from given {@link CLIENT}.
*
* @param <CLIENT> Extracts canonical table model from table client.
*/
public interface TableExtractor<CLIENT> {
InternalTable table(CLIENT tableServiceClient);
}
|
apache/inlong | 1,122 | inlong-common/src/main/java/org/apache/inlong/common/pojo/sdk/SortSourceConfigResponse.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.inlong.common.pojo.sdk;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class SortSourceConfigResponse {
String msg;
int code;
String md5;
CacheZoneConfig data;
}
|
apache/iotdb-extras | 1,114 | connectors/flink-iotdb-connector/src/main/java/org/apache/iotdb/flink/IoTSerializationSchema.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.iotdb.flink;
import java.io.Serializable;
/**
* IoTSerializationSchema serializes the input tuple data into events for inserting into IoTDB
* server.
*
* @param <T> the input data type
*/
public interface IoTSerializationSchema<T> extends Serializable {
Event serialize(T tuple);
}
|
apache/iotdb | 1,068 | iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/exception/CompactionTargetFileCountExceededException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.iotdb.db.storageengine.dataregion.compaction.execute.exception;
public class CompactionTargetFileCountExceededException extends RuntimeException {
public CompactionTargetFileCountExceededException(String msg) {
super(msg);
}
}
|
apache/iotdb | 1,115 | iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/load/LoadAnalyzeTypeMismatchException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.iotdb.db.exception.load;
import org.apache.iotdb.rpc.TSStatusCode;
public class LoadAnalyzeTypeMismatchException extends LoadAnalyzeException {
public LoadAnalyzeTypeMismatchException(String message) {
super(message, TSStatusCode.VERIFY_METADATA_ERROR.getStatusCode());
}
}
|
apache/iotdb | 1,119 | iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/IScheduler.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.iotdb.db.queryengine.plan.scheduler;
import org.apache.iotdb.db.queryengine.execution.fragment.FragmentInfo;
import io.airlift.units.Duration;
public interface IScheduler {
void start();
void stop(Throwable t);
Duration getTotalCpuTime();
FragmentInfo getFragmentInfo();
}
|
apache/jackrabbit-oak | 1,128 | oak-upgrade/src/main/java/org/apache/jackrabbit/oak/segment/CheckpointAccessor.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jackrabbit.oak.segment;
import org.apache.jackrabbit.oak.spi.state.NodeState;
public final class CheckpointAccessor {
private CheckpointAccessor() {
}
public static NodeState getCheckpointsRoot(SegmentNodeStore segmentNodeStore) {
return segmentNodeStore.getCheckpoints();
}
}
|
apache/jclouds | 1,126 | providers/aws-sqs/src/test/java/org/jclouds/aws/sqs/features/AWSMessageApiLiveTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jclouds.aws.sqs.features;
import org.jclouds.sqs.features.MessageApiLiveTest;
import org.testng.annotations.Test;
@Test(groups = "live", testName = "AWSMessageApiLiveTest")
public class AWSMessageApiLiveTest extends MessageApiLiveTest {
public AWSMessageApiLiveTest() {
provider = "aws-sqs";
}
}
|
apache/jena | 1,118 | jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionErrorException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jena.fuseki.servlets;
public class ActionErrorException extends RuntimeException {
private final int rc;
public ActionErrorException(int rc, String message, Throwable ex) {
super(message, ex);
this.rc = rc;
}
public int getRC() {
return rc;
}
}
|
apache/jena | 1,122 | jena-db/jena-dboe-storage/src/test/java/org/apache/jena/dboe/storage/storage/TestStorageSimple.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jena.dboe.storage.storage;
import org.apache.jena.dboe.storage.StorageRDF;
import org.apache.jena.dboe.storage.simple.StorageSimpleMem;
public class TestStorageSimple extends BaseTestStorageRDF {
@Override
protected StorageRDF create() {
return new StorageSimpleMem();
}
}
|
apache/jena | 1,135 | jena-permissions/src/main/java/org/apache/jena/permissions/model/SecuredProperty.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jena.permissions.model;
import org.apache.jena.rdf.model.Property;
/**
* The interface for secured Property instances.
*
* Use the SecuredProperty.Factory to create instances
* @deprecated To be removed.
*/
@Deprecated(forRemoval = true)
public interface SecuredProperty extends SecuredResource, Property {
}
|
apache/jena | 1,138 | jena-arq/src/main/java/org/apache/jena/sparql/function/library/leviathan/cos1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jena.sparql.function.library.leviathan;
import org.apache.jena.sparql.expr.NodeValue;
import org.apache.jena.sparql.function.FunctionBase1;
public class cos1 extends FunctionBase1 {
@Override
public NodeValue exec(NodeValue v) {
return NodeValue.makeDouble(Math.acos(v.getDouble()));
}
}
|
apache/jena | 1,138 | jena-arq/src/main/java/org/apache/jena/sparql/function/library/leviathan/sin1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jena.sparql.function.library.leviathan;
import org.apache.jena.sparql.expr.NodeValue;
import org.apache.jena.sparql.function.FunctionBase1;
public class sin1 extends FunctionBase1 {
@Override
public NodeValue exec(NodeValue v) {
return NodeValue.makeDouble(Math.asin(v.getDouble()));
}
}
|
apache/jena | 1,138 | jena-arq/src/main/java/org/apache/jena/sparql/function/library/leviathan/sqrt.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jena.sparql.function.library.leviathan;
import org.apache.jena.sparql.expr.NodeValue;
import org.apache.jena.sparql.function.FunctionBase1;
public class sqrt extends FunctionBase1 {
@Override
public NodeValue exec(NodeValue v) {
return NodeValue.makeDouble(Math.sqrt(v.getDouble()));
}
}
|
apache/jena | 1,138 | jena-arq/src/main/java/org/apache/jena/sparql/function/library/leviathan/tan1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jena.sparql.function.library.leviathan;
import org.apache.jena.sparql.expr.NodeValue;
import org.apache.jena.sparql.function.FunctionBase1;
public class tan1 extends FunctionBase1 {
@Override
public NodeValue exec(NodeValue v) {
return NodeValue.makeDouble(Math.atan(v.getDouble()));
}
}
|
apache/jspwiki | 1,143 | jspwiki-api/src/test/java/org/apache/wiki/api/spi/EngineSPITestImpl.java | /*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
package org.apache.wiki.api.spi;
import org.apache.wiki.api.core.Engine;
import jakarta.servlet.ServletContext;
import java.util.Properties;
public class EngineSPITestImpl implements EngineSPI {
@Override
public Engine find( final ServletContext context, final Properties props ) {
return null;
}
}
|
apache/kylin | 1,113 | src/common-service/src/main/java/org/apache/kylin/rest/response/OpenPartitionColumnFormatResponse.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.kylin.rest.response;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
@Data
public class OpenPartitionColumnFormatResponse {
@JsonProperty("column_name")
private String columnName;
@JsonProperty("column_format")
private String columnFormat;
}
|
apache/kylin | 1,116 | src/streaming-service/src/main/java/org/apache/kylin/rest/request/StreamingJobExecuteRequest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.kylin.rest.request;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
@Data
public class StreamingJobExecuteRequest {
private String project;
@JsonProperty("job_ids")
private List<String> jobIds;
private String action;
}
|
apache/kylin | 1,121 | src/modeling-service/src/main/java/org/apache/kylin/rest/request/StorageCleanupRequest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.kylin.rest.request;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
@Data
public class StorageCleanupRequest {
@JsonProperty("cleanup_storage")
private boolean cleanupStorage;
@JsonProperty("projects_to_clean")
private String[] projectsToClean;
}
|
apache/linkis | 1,083 | linkis-computation-governance/linkis-manager/linkis-label-common/src/main/java/org/apache/linkis/manager/label/entity/UserModifiable.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.linkis.manager.label.entity;
import org.apache.linkis.manager.label.exception.LabelErrorException;
public interface UserModifiable {
default Boolean getModifiable() {
return true;
}
void valueCheck(String stringValue) throws LabelErrorException;
}
|
apache/linkis | 1,086 | linkis-engineconn-plugins/openlookeng/src/main/java/org/apache/linkis/engineplugin/openlookeng/exception/OpenLooKengClientException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.linkis.engineplugin.openlookeng.exception;
import org.apache.linkis.common.exception.ErrorException;
public class OpenLooKengClientException extends ErrorException {
public OpenLooKengClientException(int errCode, String desc) {
super(errCode, desc);
}
}
|
apache/linkis | 1,111 | linkis-commons/linkis-protocol/src/main/java/org/apache/linkis/protocol/query/cache/FailedToDeleteCache.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.linkis.protocol.query.cache;
public class FailedToDeleteCache implements ResponseDeleteCache {
private String errorMessage;
public FailedToDeleteCache(String errorMessage) {
this.errorMessage = errorMessage;
}
public String getErrorMessage() {
return errorMessage;
}
}
|
apache/linkis | 1,114 | linkis-commons/linkis-protocol/src/main/java/org/apache/linkis/protocol/query/cache/CacheTaskResult.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.linkis.protocol.query.cache;
public class CacheTaskResult implements ResponseReadCache {
private String resultLocation;
public CacheTaskResult(String resultLocation) {
this.resultLocation = resultLocation;
}
public String getResultLocation() {
return resultLocation;
}
}
|
apache/logging-log4j1 | 1,139 | src/main/java/org/apache/log4j/spi/DefaultRepositorySelector.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.log4j.spi;
public class DefaultRepositorySelector implements RepositorySelector {
final LoggerRepository repository;
public
DefaultRepositorySelector(LoggerRepository repository) {
this.repository = repository;
}
public
LoggerRepository getLoggerRepository() {
return repository;
}
}
|
apache/lucene | 1,123 | lucene/analysis/common/src/test/org/apache/lucene/analysis/hunspell/TestZeroAffix2.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.lucene.analysis.hunspell;
import org.junit.BeforeClass;
public class TestZeroAffix2 extends StemmerTestBase {
@BeforeClass
public static void beforeClass() throws Exception {
init("zeroaffix2.aff", "zeroaffix2.dic");
}
public void testStemming() {
assertStemsTo("b", "beer");
}
}
|
apache/manifoldcf | 1,131 | framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IShutdownHook.java | /* $Id: IShutdownHook.java 988245 2010-08-23 18:39:35Z kwright $ */
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.manifoldcf.core.interfaces;
/** This interface describes functionality needed for a shutdown hook */
public interface IShutdownHook
{
/** Do the requisite cleanup.
*/
public void doCleanup(IThreadContext threadContext)
throws ManifoldCFException;
}
|
apache/marmotta | 1,094 | libraries/ldcache/ldcache-core/src/test/java/org/apache/marmotta/ldcache/services/test/dummy/DummyEndpoint.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.marmotta.ldcache.services.test.dummy;
import org.apache.marmotta.ldclient.api.endpoint.Endpoint;
public class DummyEndpoint extends Endpoint {
public DummyEndpoint() {
super("Dummy", "Dummy", "^http://localhost", null, 86400l);
setPriority(PRIORITY_HIGH);
}
}
|
apache/maven-archetype | 1,104 | archetype-common/src/main/java/org/apache/maven/archetype/old/descriptor/ArchetypeDescriptorGenerator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.maven.archetype.old.descriptor;
/**
* Pass over the directory containing the sources of the archetype and create
* the appropriate descriptor.
*
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
* @version $Id$
*/
public class ArchetypeDescriptorGenerator {}
|
apache/maven-plugins | 1,119 | maven-compiler-plugin/src/it/MCOMPILER-298/src/test/java/com/foo/ParameterTest.java | package com.foo;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT 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.*;
import org.junit.Test;
public class ParameterTest
{
@Test
public void testParameter() throws Exception
{
assertEquals( "parameterName", ParameterClass.class.getMethod( "method", String.class ).getParameters()[0].getName() );
}
}
|
apache/nifi | 1,072 | nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-optimistic-locking/src/main/java/org/apache/nifi/web/revision/LockVerificationFailedException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.nifi.web.revision;
public class LockVerificationFailedException extends IllegalStateException {
private static final long serialVersionUID = 1L;
public LockVerificationFailedException(final String message) {
super(message);
}
}
|
apache/nifi | 1,088 | nifi-extension-bundles/nifi-evtx-bundle/nifi-evtx-processors/src/main/java/org/apache/nifi/processors/evtx/parser/FileHeaderFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.nifi.processors.evtx.parser;
import org.apache.nifi.logging.ComponentLog;
import java.io.IOException;
import java.io.InputStream;
public interface FileHeaderFactory {
FileHeader create(InputStream inputStream, ComponentLog componentLog) throws IOException;
}
|
apache/nutch | 1,131 | src/plugin/protocol-file/src/java/org/apache/nutch/protocol/file/FileError.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.nutch.protocol.file;
/**
* Thrown for File error codes.
*/
public class FileError extends FileException {
@SuppressWarnings("unused")
private int code;
public int getCode(int code) {
return code;
}
public FileError(int code) {
super("File Error: " + code);
this.code = code;
}
}
|
apache/openjpa | 1,134 | openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/All.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.openjpa.jdbc.kernel.exps;
/**
* All.
*
* @author Marc Prud'hommeaux
*/
class All
extends UnaryOp {
private static final long serialVersionUID = 1L;
public All(Val val) {
super(val, true);
}
@Override
protected String getOperator() {
return "ALL";
}
}
|
apache/openjpa | 1,134 | openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/Any.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.openjpa.jdbc.kernel.exps;
/**
* Any.
*
* @author Marc Prud'hommeaux
*/
class Any
extends UnaryOp {
private static final long serialVersionUID = 1L;
public Any(Val val) {
super(val, true);
}
@Override
protected String getOperator() {
return "ANY";
}
}
|
apache/openmeetings | 1,123 | openmeetings-util/src/main/java/org/apache/openmeetings/util/logging/TimedApplication.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License") + you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.openmeetings.util.logging;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface TimedApplication {
}
|
apache/ozhera | 1,103 | ozhera-monitor/ozhera-monitor-service/src/main/java/org/apache/ozhera/monitor/bo/GrafanaCreateDataSourceReq.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.ozhera.monitor.bo;
import lombok.Data;
/**
* @author zhangxiaowei6
* @date 2023-02-23
*/
@Data
public class GrafanaCreateDataSourceReq {
private String name;
private String type;
private String url;
private String access;
private Boolean basicAuth;
}
|
apache/paimon-webui | 1,113 | paimon-web-server/src/main/java/org/apache/paimon/web/server/data/model/MetadataOptionModel.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.paimon.web.server.data.model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/** Model of metadata options. */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class MetadataOptionModel {
private String key;
private Object value;
}
|
apache/pekko-http | 1,127 | http-core/src/main/java/org/apache/pekko/http/javadsl/model/headers/HttpCookiePair.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* license agreements; and to You under the Apache License, version 2.0:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* This file is part of the Apache Pekko project, which was derived from Akka.
*/
/*
* Copyright (C) 2009-2022 Lightbend Inc. <https://www.lightbend.com>
*/
package org.apache.pekko.http.javadsl.model.headers;
/**
* Represents a cookie pair as used in the `Cookie` header as specified in
* http://tools.ietf.org/search/rfc6265#section-4.2.1
*/
public abstract class HttpCookiePair {
public abstract String name();
public abstract String value();
/** Converts this cookie pair into an HttpCookie to be used with the `Set-Cookie` header. */
public abstract HttpCookie toCookie();
public static HttpCookiePair create(String name, String value) {
return org.apache.pekko.http.scaladsl.model.headers.HttpCookiePair.apply(name, value);
}
public static HttpCookiePair createRaw(String name, String value) {
return org.apache.pekko.http.scaladsl.model.headers.HttpCookiePair.raw(name, value);
}
}
|
apache/phoenix-omid | 1,129 | transaction-client/src/main/java/org/apache/omid/tso/client/ConnectionException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.omid.tso.client;
import java.io.IOException;
/**
* Thrown when there are problems with the comm channel with the TSO server
* (e.g. when it is closed or disconnected)
*/
public class ConnectionException extends IOException {
private static final long serialVersionUID = -8489539195700267443L;
}
|
apache/qpid-broker-j | 1,097 | broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/FlowCreditManager_0_10.java | /*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
package org.apache.qpid.server.protocol.v0_10;
import org.apache.qpid.server.flow.FlowCreditManager;
public interface FlowCreditManager_0_10 extends FlowCreditManager
{
long INFINITE_CREDIT = 0xFFFFFFFFL;
void addCredit(long count, long bytes);
void clearCredit();
}
|
apache/qpid-broker-j | 1,099 | broker-core/src/main/java/org/apache/qpid/server/message/mimecontentconverter/MimeContentToObjectConverter.java | /*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
package org.apache.qpid.server.message.mimecontentconverter;
import org.apache.qpid.server.plugin.Pluggable;
public interface MimeContentToObjectConverter<O extends Object> extends Pluggable
{
String getMimeType();
Class<O> getObjectClass();
O toObject(byte[] data);
}
|
apache/ranger | 1,128 | security-admin/src/test/java/org/apache/ranger/service/TestRestResourceA.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.ranger.service;
import org.springframework.stereotype.Component;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
@Component
@Path("/zztest")
public class TestRestResourceA {
@GET
@Path("item")
public void getItem() {
}
@GET
@Path("{id}")
public void getById() {
}
}
|
apache/ratis | 1,137 | ratis-metrics-api/src/main/java/org/apache/ratis/metrics/RatisMetricRegistry.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ratis.metrics;
import java.util.function.Supplier;
public interface RatisMetricRegistry {
Timekeeper timer(String name);
LongCounter counter(String name);
boolean remove(String name);
<T> void gauge(String name, Supplier<Supplier<T>> gaugeSupplier);
MetricRegistryInfo getMetricRegistryInfo();
}
|
apache/rocketmq | 1,156 | remoting/src/main/java/org/apache/rocketmq/remoting/RPCHook.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.rocketmq.remoting;
import org.apache.rocketmq.remoting.protocol.RemotingCommand;
public interface RPCHook {
void doBeforeRequest(final String remoteAddr, final RemotingCommand request);
void doAfterResponse(final String remoteAddr, final RemotingCommand request,
final RemotingCommand response);
}
|
apache/seatunnel-web | 1,123 | seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/utils/Md5Utils.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.utils;
import org.springframework.util.DigestUtils;
import java.nio.charset.StandardCharsets;
public class Md5Utils {
private Md5Utils() {}
public static String toMd5(String origin) {
return DigestUtils.md5DigestAsHex(origin.getBytes(StandardCharsets.UTF_8));
}
}
|
apache/seatunnel | 1,060 | seatunnel-connectors-v2/connector-google-sheets/src/main/java/org/apache/seatunnel/connectors/seatunnel/google/sheets/deserialize/SeaTunnelRowDeserializer.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.connectors.seatunnel.google.sheets.deserialize;
import org.apache.seatunnel.api.table.type.SeaTunnelRow;
import java.util.List;
public interface SeaTunnelRowDeserializer {
SeaTunnelRow deserializeRow(List<Object> row);
}
|
apache/shardingsphere | 1,082 | parser/distsql/statement/src/main/java/org/apache/shardingsphere/distsql/statement/type/rql/rule/global/ShowGlobalRulesStatement.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.distsql.statement.type.rql.rule.global;
import org.apache.shardingsphere.distsql.statement.type.rql.rule.RuleQueryStatement;
/**
* Show global rules statement.
*/
public abstract class ShowGlobalRulesStatement extends RuleQueryStatement {
}
|
apache/shardingsphere | 1,105 | database/protocol/core/src/main/java/org/apache/shardingsphere/database/protocol/binary/BinaryCell.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
/**
* Binary cell.
*/
@RequiredArgsConstructor
@Getter
public final class BinaryCell {
private final BinaryColumnType columnType;
private final Object data;
}
|
apache/sis | 1,141 | endorsed/src/org.apache.sis.storage/main/org/apache/sis/io/stream/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.
*/
/**
* Utility classes for the implementation of SIS storage classes.
*
* <STRONG>Do not use!</STRONG>
*
* This package is for internal use by SIS only. Classes in this package
* may change in incompatible ways in any future version without notice.
*
* @author Martin Desruisseaux (Geomatys)
*/
package org.apache.sis.io.stream;
|
apache/storm | 1,145 | storm-client/src/jvm/org/apache/storm/metric/api/rpc/AssignableShellMetric.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version
* 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package org.apache.storm.metric.api.rpc;
import org.apache.storm.metric.api.AssignableMetric;
public class AssignableShellMetric extends AssignableMetric implements IShellMetric {
public AssignableShellMetric(Object value) {
super(value);
}
@Override
public void updateMetricFromRPC(Object value) {
setValue(value);
}
}
|
apache/stratos | 1,077 | components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/policy/DeploymentPolicyNotExistsException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.stratos.autoscaler.exception.policy;
/**
* Cartridge already exists exception.
*/
public class DeploymentPolicyNotExistsException extends Exception {
public DeploymentPolicyNotExistsException(String message) {
super(message);
}
}
|
apache/streampipes | 1,050 | streampipes-extensions/streampipes-processors-enricher-jvm/src/main/java/org/apache/streampipes/processors/enricher/jvm/processor/math/operation/OperationAddition.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.processors.enricher.jvm.processor.math.operation;
public class OperationAddition implements Operation {
@Override
public Double operate(Double valLeft, Double valRight) {
return valLeft + valRight;
}
}
|
apache/streampipes | 1,050 | streampipes-extensions/streampipes-processors-enricher-jvm/src/main/java/org/apache/streampipes/processors/enricher/jvm/processor/math/operation/OperationMultiply.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.processors.enricher.jvm.processor.math.operation;
public class OperationMultiply implements Operation {
@Override
public Double operate(Double valLeft, Double valRight) {
return valLeft * valRight;
}
}
|
apache/streampipes | 1,097 | streampipes-wrapper-siddhi/src/main/java/org/apache/streampipes/wrapper/siddhi/query/expression/GreaterThanExpression.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.wrapper.siddhi.query.expression;
public class GreaterThanExpression extends RelationalOperatorExpression {
public GreaterThanExpression(PropertyExpressionBase exp1, PropertyExpressionBase exp2) {
super(RelationalOperator.GREATER_THAN, exp1, exp2);
}
}
|
apache/submarine | 1,122 | submarine-client/src/main/java/org/apache/submarine/client/cli/param/yaml/Scheduling.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.submarine.client.cli.param.yaml;
/**
* Class that holds values found in 'scheduling' section of YAML configuration.
*/
public class Scheduling {
private String queue;
public String getQueue() {
return queue;
}
public void setQueue(String queue) {
this.queue = queue;
}
}
|
apache/tomee | 1,109 | examples/connector-ear/connector-sample-api/src/main/java/org/superbiz/connector/api/SampleConnectionFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.superbiz.connector.api;
import jakarta.resource.Referenceable;
import jakarta.resource.ResourceException;
import java.io.Serializable;
public interface SampleConnectionFactory extends Serializable, Referenceable {
public SampleConnection getConnection() throws ResourceException;
}
|
apache/tomee | 1,113 | itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateful/PersistenceContextStatefulHome.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.test.stateful;
import jakarta.ejb.EJBHome;
import java.rmi.RemoteException;
/**
* @version $Rev$ $Date$
*/
public interface PersistenceContextStatefulHome extends EJBHome {
PersistenceContextStatefulObject create() throws jakarta.ejb.CreateException, RemoteException;
}
|
apache/tomee | 1,114 | arquillian/functional-tests/spring-cxf-tomee-4332/src/main/java/org/example/spring/DemoApplication.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.example.spring;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
}
|
apache/tomee | 1,117 | arquillian/arquillian-tomee-remote/src/test/java/org/apache/openejb/arquillian/handletypes/Decoration.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.openejb.arquillian.handletypes;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface Decoration {
}
|
apache/tomee | 1,121 | container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodPermissionInfo.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.openejb.assembler.classic;
import java.util.ArrayList;
import java.util.List;
public class MethodPermissionInfo extends MethodAttributeInfo {
public String description;
public final List<String> roleNames = new ArrayList<>();
public boolean excluded;
public boolean unchecked;
}
|
apache/tsfile | 1,147 | java/tsfile/src/main/java/org/apache/tsfile/read/TsFileCheckStatus.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.tsfile.read;
public class TsFileCheckStatus {
public static final long COMPLETE_FILE = 0;
public static final long FILE_EXISTS_MISTAKES = -1;
public static final long INCOMPATIBLE_FILE = -2;
public static final long FILE_NOT_FOUND = -3;
private TsFileCheckStatus() {
// forbidding instantiation
}
}
|
apache/usergrid | 1,137 | stack/core/src/main/java/org/apache/usergrid/corepersistence/CpVisitor.java | /*
* Copyright 2014 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.usergrid.corepersistence;
import org.apache.usergrid.persistence.Entity;
import org.apache.usergrid.persistence.EntityManager;
/**
* Interface for classes that need to visit all collections, connections and entities.
*/
public interface CpVisitor {
/**
* Visit the entity as we're walking the structure
* @param em
* @param collName
* @param visitedEntity
*/
public void visitCollectionEntry(
EntityManager em, String collName, Entity visitedEntity );
}
|
apache/wicket | 1,109 | wicket-core-tests/src/test/java/org/apache/wicket/markup/html/internal/EnclosurePage_5_Base.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.wicket.markup.html.internal;
import org.apache.wicket.markup.html.WebPage;
/**
* Mock page for testing.
*
*/
public class EnclosurePage_5_Base extends WebPage
{
private static final long serialVersionUID = 1L;
/**
* Construct.
*
*/
public EnclosurePage_5_Base()
{
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.