repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
apache/geaflow | 1,123 | geaflow/geaflow-core/geaflow-api/src/main/java/org/apache/geaflow/api/graph/function/vc/VertexCentricCombineFunction.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.graph.function.vc;
/**
* Interface for vertex centric combine function.
*
* @param <M> The type of combine message.
*/
public interface VertexCentricCombineFunction<M> {
/**
* Combine old message with new message.
*/
M combine(M oldMessage, M newMessage);
}
|
apache/giraph | 1,162 | giraph-core/src/main/java/org/apache/giraph/types/BooleanToBooleanWritableWrapper.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.BooleanWritable;
/**
* Converts Booleans to BooleanWritables
*/
public class BooleanToBooleanWritableWrapper
implements WritableWrapper<BooleanWritable, Boolean> {
@Override
public void wrap(Boolean javaValue, BooleanWritable writableValue) {
writableValue.set(javaValue);
}
}
|
apache/hadoop | 1,120 | hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/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 Tasks.
*/
@InterfaceAudience.Private
@InterfaceStability.Unstable
public enum TIPStatus {
PENDING, RUNNING, COMPLETE, KILLED, FAILED;
} |
apache/hadoop | 1,131 | hadoop-cloud-storage-project/hadoop-tos/src/main/java/org/apache/hadoop/fs/tosfs/object/response/package-info.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Classes for hadoop-tos object response.
*/
@InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce", "YARN", "Hive"})
@InterfaceStability.Evolving
package org.apache.hadoop.fs.tosfs.object.response;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
|
apache/harmony | 1,141 | classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/test_protocol/Handler.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.harmony.luni.tests.java.net.test_protocol;
import java.io.IOException;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLStreamHandler;
public class Handler extends URLStreamHandler {
protected URLConnection openConnection(URL u) throws IOException {
return null;
}
}
|
apache/harmony | 1,150 | jdktools/modules/jdktools/src/main/java/org/apache/harmony/tools/jarsigner/JSLogFormatter.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.tools.jarsigner;
import java.util.logging.LogRecord;
import java.util.logging.SimpleFormatter;
/**
* Simple formatter to output given Strings without formatting.
*/
class JSLogFormatter extends SimpleFormatter {
@Override
public String format(LogRecord r) {
return r.getMessage();
}
}
|
apache/harmony | 1,156 | classlib/modules/swing/src/test/api/java.injected/javax/swing/text/html/ImageViewRTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES 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.swing.text.html;
import junit.framework.TestCase;
public class ImageViewRTest extends TestCase {
/**
* Make sure no exception is thrown
* if constructor parameter is <code>null</code>.
*/
public void testImageViewNull() {
// Regression test for HARMONY-1747
new ImageView(null);
}
}
|
apache/hbase | 1,164 | hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/factories/CalmMonkeyFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.chaos.factories;
import org.apache.hadoop.hbase.chaos.monkies.CalmChaosMonkey;
import org.apache.hadoop.hbase.chaos.monkies.ChaosMonkey;
/**
* Factory to create a calm ChaosMonkey.
*/
public class CalmMonkeyFactory extends MonkeyFactory {
@Override
public ChaosMonkey build() {
return new CalmChaosMonkey();
}
}
|
apache/helix | 1,151 | metrics-common/src/main/java/org/apache/helix/monitoring/mbeans/exception/MetricException.java | package org.apache.helix.monitoring.mbeans.exception;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
public class MetricException extends RuntimeException {
public MetricException(String message) {
super(message);
}
public MetricException(Throwable cause) {
super(cause);
}
public MetricException(String message, Throwable cause) {
super(message, cause);
}
}
|
apache/helix | 1,166 | helix-core/src/main/java/org/apache/helix/store/HelixPropertyListener.java | package org.apache.helix.store;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
public interface HelixPropertyListener {
/**
* Invoked on data change
* @param path
*/
void onDataChange(String path);
/**
* Invoked on data creation
* @param path
*/
void onDataCreate(String path);
/**
* Invoked on data deletion
* @param path
*/
void onDataDelete(String path);
}
|
apache/hive | 1,182 | ql/src/java/org/apache/hadoop/hive/ql/exec/MemoryExhaustionChecker.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hive.ql.exec;
/**
* Checks the memory overhead when running {@link HashTableSinkOperator}. Throws a
* {@link org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionError}
* if too much memory is being used.
*/
interface MemoryExhaustionChecker {
void checkMemoryOverhead(long rowNumber, long hashTableScale, int tableContainerSize);
}
|
apache/hudi | 1,139 | hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/index/bloom/HoodieBloomFilterProbingResult.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.hudi.index.bloom;
import java.util.List;
class HoodieBloomFilterProbingResult {
private final List<String> candidateKeys;
HoodieBloomFilterProbingResult(List<String> candidateKeys) {
this.candidateKeys = candidateKeys;
}
public List<String> getCandidateKeys() {
return candidateKeys;
}
}
|
apache/iceberg | 1,187 | core/src/main/java/org/apache/iceberg/avro/ValueWriter.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.iceberg.avro;
import java.io.IOException;
import java.util.stream.Stream;
import org.apache.avro.io.Encoder;
import org.apache.iceberg.FieldMetrics;
public interface ValueWriter<D> {
void write(D datum, Encoder encoder) throws IOException;
default Stream<FieldMetrics> metrics() {
return Stream.empty(); // TODO will populate in following PRs
}
}
|
apache/iggy | 1,151 | foreign/java/java-sdk/src/test/java/org/apache/iggy/client/blocking/http/StreamHttpClientTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.iggy.client.blocking.http;
import org.apache.iggy.client.blocking.IggyBaseClient;
import org.apache.iggy.client.blocking.StreamClientBaseTest;
class StreamHttpClientTest extends StreamClientBaseTest {
@Override
protected IggyBaseClient getClient() {
return HttpClientFactory.create(iggyServer);
}
}
|
apache/iggy | 1,151 | foreign/java/java-sdk/src/test/java/org/apache/iggy/client/blocking/http/SystemHttpClientTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.iggy.client.blocking.http;
import org.apache.iggy.client.blocking.IggyBaseClient;
import org.apache.iggy.client.blocking.SystemClientBaseTest;
class SystemHttpClientTest extends SystemClientBaseTest {
@Override
protected IggyBaseClient getClient() {
return HttpClientFactory.create(iggyServer);
}
}
|
apache/iggy | 1,151 | foreign/java/java-sdk/src/test/java/org/apache/iggy/client/blocking/http/TopicsHttpClientTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.iggy.client.blocking.http;
import org.apache.iggy.client.blocking.IggyBaseClient;
import org.apache.iggy.client.blocking.TopicsClientBaseTest;
class TopicsHttpClientTest extends TopicsClientBaseTest {
@Override
protected IggyBaseClient getClient() {
return HttpClientFactory.create(iggyServer);
}
}
|
apache/ignite | 1,104 | modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedSnapshotEnabledQuerySelfTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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 IgniteCachePartitionedSnapshotEnabledQuerySelfTest extends IgniteCachePartitionedQuerySelfTest {
/** {@inheritDoc} */
@Override protected boolean snapshotableIndex() {
return true;
}
}
|
apache/ignite | 1,113 | modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreBinaryMarshallerStoreKeepBinaryWithSqlEscapeSelfTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.cache.store.jdbc;
/**
*
*/
public class CacheJdbcPojoStoreBinaryMarshallerStoreKeepBinaryWithSqlEscapeSelfTest
extends CacheJdbcPojoStoreBinaryMarshallerWithSqlEscapeSelfTest {
/** {@inheritDoc} */
@Override protected boolean storeKeepBinary() {
return true;
}
}
|
apache/ignite | 1,154 | modules/dev-utils/src/main/java/org/apache/ignite/development/utils/ProcessSensitiveData.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.development.utils;
/**
* Strategy for the processing of sensitive data.
*/
enum ProcessSensitiveData {
/** Show sensitive data. */
SHOW,
/** Hide sensitive data. */
HIDE,
/** Replace sensitive data with {@link Object#hashCode}. */
HASH,
/** Replace sensitive data with MD5 hash. */
MD5;
}
|
apache/incubator-crail | 1,173 | client/src/main/java/org/apache/crail/rpc/RpcRenameFile.java | /*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.crail.rpc;
import org.apache.crail.metadata.BlockInfo;
import org.apache.crail.metadata.FileInfo;
public interface RpcRenameFile extends RpcResponse {
public FileInfo getSrcParent();
public FileInfo getSrcFile();
public FileInfo getDstParent();
public FileInfo getDstFile();
public BlockInfo getSrcBlock();
public BlockInfo getDstBlock();
}
|
apache/incubator-heron | 1,143 | storm-compatibility/v0.10.2/src/java/org/apache/storm/spout/NothingEmptyEmitStrategy.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.spout;
import java.util.Map;
public class NothingEmptyEmitStrategy implements ISpoutWaitStrategy {
@Override
public void emptyEmit(long streak) {
}
@Override
@SuppressWarnings("rawtypes")
public void prepare(Map conf) {
throw new UnsupportedOperationException("Not supported yet.");
}
}
|
apache/incubator-hivemall | 1,160 | core/src/test/java/hivemall/utils/collections/lists/IntArrayListTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES 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.lists;
import org.junit.Assert;
import org.junit.Test;
public class IntArrayListTest {
@Test
public void testExpandZeroSizedList() {
IntArrayList list = new IntArrayList(0);
list.add(100);
Assert.assertEquals(1, list.size());
Assert.assertEquals(100, list.get(0));
}
}
|
apache/incubator-hugegraph | 1,137 | hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/ram/RamMap.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.backend.store.ram;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
public interface RamMap {
void clear();
long size();
void writeTo(DataOutputStream buffer) throws IOException;
void readFrom(DataInputStream buffer) throws IOException;
}
|
apache/incubator-kie-drools | 1,138 | drools-model/drools-model-compiler/src/test/java/org/drools/modelcompiler/domain/Woman.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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 Woman extends Adult {
private String husband;
public Woman(String name, int age) {
super(name, age);
}
public String getHusband() {
return husband;
}
public void setHusband(String husband) {
this.husband = husband;
}
}
|
apache/incubator-kie-drools | 1,158 | drools-beliefs/src/main/java/org/drools/beliefs/bayes/model/Bif.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.beliefs.bayes.model;
import com.thoughtworks.xstream.annotations.XStreamAlias;
@XStreamAlias("BIF")
public class Bif {
@XStreamAlias("NETWORK")
private Network network;
public Network getNetwork() {
return network;
}
public void setNetwork(Network network) {
this.network = network;
}
}
|
apache/incubator-kie-drools | 1,161 | drools-core/src/test/java/org/drools/core/util/asm/BaseBean.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.drools.core.util.asm;
public class BaseBean {
private final String text = "hola";
private int number = 42;
public String getText() {
return this.text;
}
public int getNumber() {
return this.number;
}
public void setNumber(final int number) {
this.number = number;
}
}
|
apache/incubator-kie-kogito-apps | 1,084 | data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/mapper/ProcessDefinitionEntityMapperIT.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.index.postgresql.mapper;
import org.kie.kogito.index.jpa.mapper.AbstractProcessDefinitionEntityMapperIT;
import io.quarkus.test.junit.QuarkusTest;
@QuarkusTest
class ProcessDefinitionEntityMapperIT extends AbstractProcessDefinitionEntityMapperIT {
}
|
apache/incubator-kie-kogito-runtimes | 1,124 | api/kogito-api-incubation-processes/src/main/java/org/kie/kogito/incubation/processes/CommentIds.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.incubation.processes;
public class CommentIds {
private final TaskInstanceId taskId;
public CommentIds(TaskInstanceId taskId) {
this.taskId = taskId;
}
public CommentId get(String processInstanceId) {
return new CommentId(taskId, processInstanceId);
}
}
|
apache/incubator-kie-optaplanner-quickstarts | 1,126 | use-cases/facility-location/src/main/java/org/acme/facilitylocation/domain/Location.java | package org.acme.facilitylocation.domain;
import static java.lang.Math.ceil;
import static java.lang.Math.sqrt;
import com.fasterxml.jackson.annotation.JsonFormat;
@JsonFormat(shape = JsonFormat.Shape.ARRAY)
public class Location {
// Approximate Metric Equivalents for Degrees. At the equator for longitude and for latitude anywhere,
// the following approximations are valid: 1° = 111 km (or 60 nautical miles) 0.1° = 11.1 km.
public static final double METERS_PER_DEGREE = 111_000;
public final double latitude;
public final double longitude;
public Location(double latitude, double longitude) {
this.latitude = latitude;
this.longitude = longitude;
}
@Override
public String toString() {
return String.format("[%.4fN, %.4fE]", latitude, longitude);
}
public long getDistanceTo(Location other) {
double latitudeDiff = other.latitude - this.latitude;
double longitudeDiff = other.longitude - this.longitude;
return (long) ceil(sqrt(latitudeDiff * latitudeDiff + longitudeDiff * longitudeDiff) * METERS_PER_DEGREE);
}
}
|
apache/incubator-myriad | 1,153 | myriad-scheduler/src/main/java/org/apache/myriad/policy/NodeScaleDownPolicy.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.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.myriad.policy;
import java.util.List;
import org.apache.mesos.Protos;
/**
* Policy for scaling down the node managers.
*/
public interface NodeScaleDownPolicy {
/**
* Apply a scale down policy to the given list of taskIDs.
*
* @param taskIDs
*/
public void apply(List<Protos.TaskID> taskIDs);
}
|
apache/incubator-xtable | 1,156 | xtable-api/src/main/java/org/apache/xtable/model/schema/PartitionFieldSpec.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.model.schema;
import lombok.Value;
/**
* PartitionFieldSpec represents a schema for the partition format as specified through the user
* configuration for the conversion
*
* @since 0.3
*/
@Value
public class PartitionFieldSpec {
String sourceFieldPath;
PartitionTransformType transformType;
String format;
}
|
apache/inlong | 1,136 | inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/queue/pulsar/PulsarTenantInfo.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.manager.pojo.queue.pulsar;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Set;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PulsarTenantInfo {
Set<String> adminRoles;
Set<String> allowedClusters;
}
|
apache/iotdb-web-workbench | 1,161 | backend/src/main/java/org/apache/iotdb/admin/model/vo/GroupInfoVO.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.admin.model.vo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class GroupInfoVO implements Serializable {
private Integer groupCount;
private List<GroupInfo> groupInfoList;
}
|
apache/jackrabbit-oak | 1,148 | oak-benchmarks-elastic/src/main/java/org/apache/jackrabbit/oak/run/BenchmarkElasticCommand.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.run;
import org.apache.jackrabbit.oak.benchmark.ElasticBenchmarkRunner;
import org.apache.jackrabbit.oak.run.commons.Command;
public class BenchmarkElasticCommand implements Command {
@Override
public void execute(String... args) throws Exception {
ElasticBenchmarkRunner.main(args);
}
}
|
apache/jclouds | 1,157 | apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/DomainLimitApiLiveTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.cloudstack.features;
import org.jclouds.cloudstack.internal.BaseCloudStackApiLiveTest;
import org.testng.annotations.Test;
/**
* Tests behavior of {@code DomainLimitApi}
*/
@Test(groups = "live", singleThreaded = true, testName = "DomainLimitApiLiveTest")
public class DomainLimitApiLiveTest extends BaseCloudStackApiLiveTest {
}
|
apache/karaf | 1,144 | features/core/src/test/java/org/apache/karaf/features/internal/download/impl/MavenDownloadTaskTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.karaf.features.internal.download.impl;
import org.junit.Test;
import static org.junit.Assert.assertThrows;
public class MavenDownloadTaskTest {
@Test
public void testNullResolver(){
assertThrows(NullPointerException.class, () -> {
new MavenDownloadTask(null, null, "");
});
}
}
|
apache/logging-log4j2 | 1,159 | log4j-core-test/src/main/java/org/apache/logging/log4j/core/test/junit/Tags.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to you under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.logging.log4j.core.test.junit;
/**
* Container for a Junit 5 tags used in tests.
*/
public final class Tags {
/**
* Tests that use LMAX Disruptor. Same name as the JUnit 4 category.
*/
public static final String ASYNC_LOGGERS = "org.apache.logging.log4j.core.test.categories.AsyncLoggers";
private Tags() {}
}
|
apache/manifoldcf | 1,126 | connectors/generic/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/generic/api/DateAdapter.java | /*
* Copyright 2013 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.manifoldcf.crawler.connectors.generic.api;
import java.util.Date;
import javax.xml.bind.annotation.adapters.XmlAdapter;
import org.apache.manifoldcf.core.common.DateParser;
/**
*
* @author krycek
*/
public class DateAdapter extends XmlAdapter<String, Date> {
@Override
public Date unmarshal(String v) throws Exception {
return DateParser.parseISO8601Date(v);
}
@Override
public String marshal(Date v) throws Exception {
return DateParser.formatISO8601Date(v);
}
}
|
apache/maven-javadoc-plugin | 1,147 | src/it/projects/MJAVADOC-262/src/main/java/com/mycompany/myapp/App.java | package com.mycompany.myapp;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/**
* Hello world!
*
* <img src="doc-files/maven-feather.png" alt="Maven">
*/
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
}
private static void main2()
{
System.out.println( "Hello World!" );
}
}
|
apache/maven-plugins | 1,116 | maven-project-info-reports-plugin/src/test/java/org/apache/maven/report/projectinfo/stubs/DependencyManagementStub.java | package org.apache.maven.report.projectinfo.stubs;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/**
* @author Nick Stolwijk
* @version $Id$
* @since 2.1
*/
public class DependencyManagementStub
extends ProjectInfoProjectStub
{
@Override
protected String getPOM()
{
return "dependency-management-plugin-config.xml";
}
}
|
apache/maven-plugins | 1,138 | maven-compiler-plugin/src/test/java/org/apache/maven/plugin/compiler/stubs/DebugEnabledLog.java | package org.apache.maven.plugin.compiler.stubs;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT 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 org.apache.maven.plugin.logging.SystemStreamLog;
/**
* @author Edwin Punzalan
*/
public class DebugEnabledLog
extends SystemStreamLog
{
public DebugEnabledLog()
{
super();
}
public boolean isDebugEnabled()
{
return true;
}
}
|
apache/maven | 1,154 | compat/maven-compat/src/main/java/org/apache/maven/profiles/activation/ProfileActivator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.profiles.activation;
import org.apache.maven.model.Profile;
/**
* ProfileActivator
*/
@Deprecated
public interface ProfileActivator {
String ROLE = ProfileActivator.class.getName();
boolean canDetermineActivation(Profile profile);
boolean isActive(Profile profile) throws ProfileActivationException;
}
|
apache/maven | 1,158 | api/maven-api-core/src/main/java/org/apache/maven/api/services/xml/ToolchainsXmlFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.api.services.xml;
import org.apache.maven.api.annotations.Experimental;
import org.apache.maven.api.toolchain.PersistedToolchains;
/**
* Reads and writes a {@link PersistedToolchains} object to/from XML.
*
* @since 4.0.0
*/
@Experimental
public interface ToolchainsXmlFactory extends XmlFactory<PersistedToolchains> {}
|
apache/myfaces | 1,154 | impl/src/main/java/org/apache/myfaces/view/facelets/el/ContextAwareExceptionWrapper.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.myfaces.view.facelets.el;
import jakarta.faces.FacesWrapper;
/**
* A exception wrapper that "knows" interesting info about place where problem occurred.
* @author martinkoci
*
* @see ContextAware
* @see FacesWrapper
*/
public interface ContextAwareExceptionWrapper extends FacesWrapper<Throwable>, ContextAware
{
}
|
apache/nifi | 1,157 | nifi-toolkit/nifi-toolkit-client/src/main/java/org/apache/nifi/toolkit/client/AccessClient.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.toolkit.client;
import java.io.IOException;
public interface AccessClient {
String getToken(String username, String password) throws NiFiClientException, IOException;
String getTokenFromKerberosTicket() throws NiFiClientException, IOException;
void logout(String token) throws NiFiClientException, IOException;
}
|
apache/olingo-odata4 | 1,165 | lib/server-api/src/main/java/org/apache/olingo/server/api/uri/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.
*/
/**
* Olingo URI
* <p>
* The URI package is used to condense all information about the OData path used to query the data.
* <br> In order to support filter and orderby statements the
* {@link org.apache.olingo.server.api.uri.queryoption.expression.ExpressionVisitor} has to be implemented by an
* application.
*/
package org.apache.olingo.server.api.uri;
|
apache/oozie | 1,175 | core/src/main/java/org/apache/oozie/service/AuthorizationException.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.oozie.service;
import org.apache.oozie.XException;
import org.apache.oozie.ErrorCode;
public class AuthorizationException extends XException {
public AuthorizationException(ErrorCode errorCode, Object... params) {
super(errorCode, params);
}
public AuthorizationException(XException cause) {
super(cause);
}
}
|
apache/openjpa | 1,144 | openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/SquareRootExpression.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.openjpa.persistence.query;
/**
* Denotes SQRT(e) Expression.
*
* @author Pinaki Poddar
*
*/
public class SquareRootExpression extends UnaryOperatorExpression {
private static final long serialVersionUID = 1L;
public SquareRootExpression(Expression op) {
super(op, UnaryFunctionalOperator.SQRT);
}
}
|
apache/openjpa | 1,151 | openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/AllExpression.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.openjpa.persistence.query;
/**
* Denotes All(SubQuery) Expression.
*
* @author Pinaki Poddar
*
*/
class AllExpression extends QueryExpression implements Subquery {
private static final long serialVersionUID = 1L;
public AllExpression(QueryDefinitionImpl sub) {
super(sub, UnaryFunctionalOperator.ALL);
}
}
|
apache/openjpa | 1,169 | openjpa-kernel/src/main/java/org/apache/openjpa/kernel/LockScopes.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.kernel;
/**
* Defines lock scope levels used for MixedLockManager.
*
* @since 2.0.0
*/
public interface LockScopes {
/**
* Generic Normal lock scope level. Value of 0.
*
*/
int LOCKSCOPE_NORMAL = 0;
/**
* Generic extended lock scope level. Value of 10.
*/
int LOCKSCOPE_EXTENDED = 10;
}
|
apache/openmeetings | 1,143 | openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/Core.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License") + you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.screenshare;
import static org.slf4j.LoggerFactory.getLogger;
import org.slf4j.Logger;
public class Core {
private static final Logger log = getLogger(Core.class);
public Core(String[] args) {
log.debug("Core constructor");
}
public static void main(String[] args) {
new Core(args);
}
}
|
apache/opennlp | 1,162 | opennlp-api/src/main/java/opennlp/tools/util/ext/ExtensionNotLoadedException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package opennlp.tools.util.ext;
/**
* Exception indicates that an OpenNLP extension could not be loaded.
*/
@SuppressWarnings("serial")
public class ExtensionNotLoadedException extends RuntimeException {
public ExtensionNotLoadedException(String message) {
super(message);
}
public ExtensionNotLoadedException(Throwable t) {
super(t);
}
}
|
apache/openwebbeans | 1,110 | webbeans-impl/src/test/java/org/apache/webbeans/test/concepts/initializerMethods/beans/BrokenInitializerMethodBecauseofGeneric.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.webbeans.test.concepts.initializerMethods.beans;
import java.util.ArrayList;
import jakarta.inject.Inject;
public class BrokenInitializerMethodBecauseofGeneric
{
@Inject
public <T> ArrayList<T> initializer(ArrayList<T> list)
{
return new ArrayList<T>();
}
}
|
apache/openwebbeans | 1,128 | webbeans-impl/src/test/java/org/apache/webbeans/test/component/producer/broken/BrokenProducerComponent5.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.webbeans.test.component.producer.broken;
import jakarta.enterprise.event.Observes;
import jakarta.enterprise.inject.Produces;
public class BrokenProducerComponent5
{
public BrokenProducerComponent5()
{
}
@Produces
public int broken5(@Observes int y)
{
return 0;
}
}
|
apache/openwebbeans | 1,156 | webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/util/EjbConstants.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.webbeans.ejb.common.util;
/**
*/
public final class EjbConstants
{
private EjbConstants()
{
}
public static final String EJB_WEBBEANS_ERROR_PREFIX ="Ejb WebBeans Component ";
public static final String EJB_WEBBEANS_ERROR_CLASS_PREFIX = EJB_WEBBEANS_ERROR_PREFIX + "with implementation class : ";
}
|
apache/ozhera | 1,111 | ozhera-monitor/ozhera-monitor-service/src/main/java/org/apache/ozhera/monitor/service/model/prometheus/MetricStandardResponse.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.ozhera.monitor.service.model.prometheus;
import lombok.Data;
import java.io.Serializable;
/**
* @author gaoxihui
* @date 2021/8/16 11:25 上午
*/
@Data
public class MetricStandardResponse implements Serializable {
private String status;
private MetricStandardData data;
}
|
apache/ozone | 1,167 | hadoop-hdds/erasurecode/src/main/java/org/apache/ozone/erasurecode/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.
*/
/**
* Erasure coding utilities for Apache Ozone.
*
* Initial implementation is imported from Apache Hadoop see that repo for full
* history.
*/
@InterfaceAudience.Private
@InterfaceStability.Unstable
package org.apache.ozone.erasurecode;
import org.apache.hadoop.hdds.annotation.InterfaceAudience;
import org.apache.hadoop.hdds.annotation.InterfaceStability;
|
apache/paimon-webui | 1,156 | paimon-web-api/src/main/java/org/apache/paimon/web/api/action/context/ActionConf.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.api.action.context;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/** ActionConf. */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface ActionConf {
String value();
}
|
apache/paimon | 1,175 | paimon-core/src/main/java/org/apache/paimon/table/sink/InnerTableWrite.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.table.sink;
import org.apache.paimon.operation.WriteRestore;
/** Inner {@link TableWrite} contains overwrite setter. */
public interface InnerTableWrite extends StreamTableWrite, BatchTableWrite {
InnerTableWrite withWriteRestore(WriteRestore writeRestore);
InnerTableWrite withIgnorePreviousFiles(boolean ignorePreviousFiles);
}
|
apache/pig | 1,183 | src/org/apache/pig/impl/io/compress/BZip2CodecWithExtensionBZ.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.pig.impl.io.compress;
import org.apache.hadoop.io.compress.BZip2Codec;
public class BZip2CodecWithExtensionBZ extends BZip2Codec {
/**
* For historical reasons, Pig supports .bz and .bz2 for bzip2 extension
*
* @return A String telling the additional bzip2 file extension 'bz'
*/
public String getDefaultExtension() {
return ".bz";
}
}
|
apache/pinot | 1,165 | pinot-core/src/test/java/org/apache/pinot/core/transport/ServerInstanceTest.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.pinot.core.transport;
import nl.jqno.equalsverifier.EqualsVerifier;
import org.testng.annotations.Test;
public class ServerInstanceTest {
@Test
public void equalsVerifier() {
EqualsVerifier.configure().forClass(ServerInstance.class).withOnlyTheseFields("_instanceId")
.withNonnullFields("_instanceId").verify();
}
}
|
apache/plc4x | 1,168 | plc4j/spi/src/main/java/org/apache/plc4x/java/spi/connection/PlcTagHandler.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.plc4x.java.spi.connection;
import org.apache.plc4x.java.api.model.PlcTag;
import org.apache.plc4x.java.api.model.PlcQuery;
/**
* Tag Handler which handles the parsing of string to {@link PlcTag} or {@link PlcQuery}.
*/
public interface PlcTagHandler {
PlcTag parseTag(String tagAddress);
PlcQuery parseQuery(String query);
}
|
apache/polygene-java | 1,138 | libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/RestServerException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*
*/
package org.apache.polygene.library.rest.server;
public class RestServerException extends RuntimeException
{
public RestServerException( String message, Throwable cause )
{
super( message, cause );
}
public RestServerException( String message )
{
super( message );
}
}
|
apache/polygene-java | 1,157 | libraries/uid/src/main/java/org/apache/polygene/library/uid/sequence/Sequence.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*
*/
package org.apache.polygene.library.uid.sequence;
import org.apache.polygene.api.common.UseDefaults;
import org.apache.polygene.api.entity.Queryable;
import org.apache.polygene.api.property.Property;
/**
* JAVADOC Add JavaDoc
*/
@Queryable( false )
public interface Sequence
{
@UseDefaults Property<Long> currentValue();
}
|
apache/qpid-broker-j | 1,160 | perftests/src/main/java/org/apache/qpid/disttest/client/property/PropertyValue.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.disttest.client.property;
/**
* Provides a message property value. Property values can be simple (e.g. a string
* or a number) or can represent a function that is capable of returning a sequence of values,
* so that each message is sent with a different value.
*/
public interface PropertyValue
{
Object getValue();
}
|
apache/qpid | 1,154 | qpid/tools/src/java/qpid-qmf2/src/main/java/org/apache/qpid/qmf2/common/QmfQueryTarget.java | /*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.qmf2.common;
/**
* An enum containing the QMF type code indicating a QMF query target defined in
* <a href=https://cwiki.apache.org/qpid/qmf-map-message-protocol.html>QMF Map Message Protocol</a>
*
* @author Fraser Adams
*/
public enum QmfQueryTarget
{
SCHEMA_ID,
SCHEMA,
OBJECT_ID,
OBJECT;
}
|
apache/ratis | 1,173 | ratis-test/src/test/java/org/apache/ratis/grpc/TestGroupManagementWithGrpc.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.grpc;
import org.apache.ratis.server.impl.MiniRaftCluster;
import org.apache.ratis.server.impl.GroupManagementBaseTest;
public class TestGroupManagementWithGrpc extends GroupManagementBaseTest {
@Override
public MiniRaftCluster.Factory<? extends MiniRaftCluster> getClusterFactory() {
return MiniRaftClusterWithGrpc.FACTORY;
}
}
|
apache/reef | 1,136 | lang/java/reef-io/src/main/java/org/apache/reef/io/network/group/impl/config/parameters/CommunicationGroupName.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.reef.io.network.group.impl.config.parameters;
import org.apache.reef.tang.annotations.Name;
import org.apache.reef.tang.annotations.NamedParameter;
@NamedParameter(doc = "Name of the comm group")
public final class CommunicationGroupName implements Name<String> {
private CommunicationGroupName() {
}
}
|
apache/reef | 1,138 | lang/java/reef-examples/src/main/java/org/apache/reef/examples/group/bgd/operatornames/LossAndGradientReducer.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.reef.examples.group.bgd.operatornames;
import org.apache.reef.tang.annotations.Name;
import org.apache.reef.tang.annotations.NamedParameter;
/**
* Name used for the Reduce operator for loss and gradient aggregation.
*/
@NamedParameter()
public final class LossAndGradientReducer implements Name<String> {
}
|
apache/reef | 1,164 | lang/java/reef-tang/tang/src/main/java/org/apache/reef/tang/annotations/Parameter.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.reef.tang.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.PARAMETER)
@Retention(RetentionPolicy.RUNTIME)
public @interface Parameter {
Class<? extends Name<? extends Object>> value();
}
|
apache/roller | 1,180 | app/src/main/java/org/apache/roller/util/UUIDGenerator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. The ASF licenses this file to You
* under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License. For additional information regarding
* copyright in this work, please see the NOTICE file in the top level
* directory of this distribution.
*/
package org.apache.roller.util;
import java.util.UUID;
/**
* Generates UUID values.
*/
public final class UUIDGenerator {
// non-instantiable
private UUIDGenerator() {}
/**
* Generate a new UUID.
*/
public static String generateUUID() {
return UUID.randomUUID().toString();
}
}
|
apache/royale-compiler | 1,163 | compiler-jx/src/main/java/org/apache/royale/compiler/driver/js/IJSBackend.java | /*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.royale.compiler.driver.js;
import org.apache.royale.compiler.codegen.ISourceMapEmitter;
import org.apache.royale.compiler.codegen.js.IMappingEmitter;
import org.apache.royale.compiler.driver.IBackend;
public interface IJSBackend extends IBackend
{
ISourceMapEmitter createSourceMapEmitter(IMappingEmitter emitter);
}
|
apache/seatunnel | 1,157 | seatunnel-api/src/main/java/org/apache/seatunnel/api/transform/SeaTunnelMapTransform.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.seatunnel.api.transform;
public interface SeaTunnelMapTransform<T> extends SeaTunnelTransform<T> {
/**
* Transform input data to {@link this#getProducedCatalogTable().getSeaTunnelRowType()} types
* data.
*
* @param row the data need be transformed.
* @return transformed data.
*/
T map(T row);
}
|
apache/servicecomb-java-chassis | 1,123 | foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/part/InputStreamPart.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.servicecomb.foundation.common.part;
import java.io.InputStream;
import org.springframework.core.io.InputStreamResource;
public class InputStreamPart extends ResourcePart {
public InputStreamPart(String name, InputStream inputStream) {
super(name, new InputStreamResource(inputStream));
}
}
|
apache/servicecomb-pack | 1,142 | demo/tcc-spring-demo/payment/src/main/java/org/apache/servicecomb/pack/demo/payment/AccountDao.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.servicecomb.pack.demo.payment;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
public interface AccountDao extends JpaRepository<Account, Long> {
@Query("select a from Account a where a.userName =?1 ")
Account findByUserName(String userName);
}
|
apache/servicecomb-saga-actuator | 1,151 | saga-core/src/test/java/org/apache/servicecomb/saga/core/TransactionImpl.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.servicecomb.saga.core;
import java.util.Map;
public class TransactionImpl extends RestOperation implements Transaction {
public TransactionImpl(String path, String method, Map<String, Map<String, String>> params) {
super(path, method, params);
}
@Override
public int retries() {
return INFINITE_RETRY;
}
}
|
apache/shardingsphere | 1,111 | parser/distsql/statement/src/main/java/org/apache/shardingsphere/distsql/statement/type/rdl/rule/database/type/AlterRuleStatement.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.rdl.rule.database.type;
import org.apache.shardingsphere.distsql.statement.type.rdl.rule.database.DatabaseRuleDefinitionStatement;
/**
* Alter rule statement.
*/
public abstract class AlterRuleStatement extends DatabaseRuleDefinitionStatement {
}
|
apache/shardingsphere | 1,153 | features/mask/core/src/main/java/org/apache/shardingsphere/mask/rule/MaskColumn.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.mask.rule;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import org.apache.shardingsphere.mask.spi.MaskAlgorithm;
/**
* Mask column.
*/
@RequiredArgsConstructor
@Getter
public final class MaskColumn {
private final String name;
private final MaskAlgorithm<?, ?> maskAlgorithm;
}
|
apache/sirona | 1,178 | agent/performance/cdi/src/main/java/org/apache/sirona/cdi/Monitored.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.sirona.cdi;
import javax.interceptor.InterceptorBinding;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@InterceptorBinding
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface Monitored {
}
|
apache/skywalking-java | 1,101 | apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/support/MongoConstants.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.plugin.mongodb.v3.support;
public class MongoConstants {
private MongoConstants() {
}
public static final String DB_TYPE = "MongoDB";
public static final String MONGO_DB_OP_PREFIX = "MongoDB/";
public static final String EMPTY = "";
}
|
apache/skywalking-java | 1,101 | apm-sniffer/apm-sdk-plugin/mongodb-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v4/support/MongoConstants.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.plugin.mongodb.v4.support;
public class MongoConstants {
private MongoConstants() {
}
public static final String DB_TYPE = "MongoDB";
public static final String MONGO_DB_OP_PREFIX = "MongoDB/";
public static final String EMPTY = "";
}
|
apache/skywalking-java | 1,104 | test/plugin/scenarios/dubbo-2.7.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/dubbo/services/impl/GreetServiceImpl.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.testcase.dubbo.services.impl;
import org.apache.skywalking.apm.testcase.dubbo.services.GreetService;
public class GreetServiceImpl implements GreetService {
@Override
public String doBusiness(String s) {
return "{name:'" + s + "'}";
}
}
|
apache/skywalking-java | 1,126 | apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/ids/NewDistributedTraceId.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.agent.core.context.ids;
/**
* The <code>NewDistributedTraceId</code> is a {@link DistributedTraceId} with a new generated id.
*/
public class NewDistributedTraceId extends DistributedTraceId {
public NewDistributedTraceId() {
super(GlobalIdGenerator.generate());
}
}
|
apache/solr | 1,150 | solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/stream/expr/DefaultStreamFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.solr.client.solrj.io.stream.expr;
import org.apache.solr.client.solrj.io.Lang;
/**
* A default collection of mappings, used to convert strings into stream expressions.
*
* @since 7.4
*/
public class DefaultStreamFactory extends StreamFactory {
public DefaultStreamFactory() {
super();
Lang.register(this);
}
}
|
apache/stanbol | 1,132 | ontologymanager/sources/owlapi/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/io/RootOntologySource.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.stanbol.ontologymanager.ontonet.api.io;
import org.semanticweb.owlapi.model.OWLOntology;
@Deprecated
public class RootOntologySource extends org.apache.stanbol.ontologymanager.sources.owlapi.RootOntologySource {
public RootOntologySource(OWLOntology rootOntology) {
super(rootOntology);
}
}
|
apache/storm | 1,180 | storm-client/src/jvm/org/apache/storm/metric/api/CountMetric.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version
* 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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;
public class CountMetric implements IMetric {
long value = 0;
public CountMetric() {
}
public void incr() {
value++;
}
public void incrBy(long incrementBy) {
value += incrementBy;
}
@Override
public Object getValueAndReset() {
long ret = value;
value = 0;
return ret;
}
}
|
apache/storm | 1,181 | storm-server/src/main/java/org/apache/storm/nimbus/ITopologyValidator.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version
* 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.nimbus;
import java.util.Map;
import org.apache.storm.generated.InvalidTopologyException;
import org.apache.storm.generated.StormTopology;
public interface ITopologyValidator {
void prepare(Map<String, Object> stormConf);
void validate(String topologyName, Map<String, Object> topologyConf, StormTopology topology)
throws InvalidTopologyException;
}
|
apache/storm | 1,188 | storm-client/src/jvm/org/apache/storm/windowing/TriggerHandler.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version
* 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.windowing;
/**
* The callback fired by {@link TriggerPolicy} when the trigger condition is satisfied.
*/
public interface TriggerHandler {
/**
* The code to execute when the {@link TriggerPolicy} condition is satisfied.
*
* @return true if the window was evaluated with at least one event in the window, false otherwise
*/
boolean onTrigger();
}
|
apache/struts | 1,151 | apps/showcase/src/main/java/org/apache/struts2/showcase/chat/ChatException.java | /*
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.showcase.chat;
public class ChatException extends RuntimeException {
private static final long serialVersionUID = 1L;
public enum ErrorType {
ROOM_ALREADY_EXISTS,
USER_ALREADY_EXISTS,
NO_SUCH_ROOM_EXISTS
}
public ChatException(String description, ErrorType type) {
super(description);
}
}
|
apache/syncope | 1,144 | core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/OIDCJWKSDataBinder.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.syncope.core.provisioning.api.data;
import org.apache.syncope.common.lib.to.OIDCJWKSTO;
import org.apache.syncope.core.persistence.api.entity.am.OIDCJWKS;
public interface OIDCJWKSDataBinder {
OIDCJWKSTO getOIDCJWKSTO(OIDCJWKS jwks);
OIDCJWKS create(String jwksKeyId, String jwksType, int jwksKeySize);
}
|
apache/tajo | 1,155 | tajo-storage/tajo-storage-hdfs/src/main/java/org/apache/tajo/storage/index/IndexReader.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.tajo.storage.index;
import org.apache.tajo.storage.Tuple;
import java.io.IOException;
public interface IndexReader {
/**
* Find the offset corresponding to key which is equal to a given key.
*
* @param key
* @return
* @throws java.io.IOException
*/
public long find(Tuple key) throws IOException;
}
|
apache/tajo | 1,168 | tajo-plan/src/main/java/org/apache/tajo/plan/rewrite/LogicalPlanPreprocessEngine.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.tajo.plan.rewrite;
import org.apache.tajo.algebra.Expr;
import org.apache.tajo.exception.TajoException;
import org.apache.tajo.plan.LogicalPlanner.PlanContext;
import org.apache.tajo.plan.logical.LogicalNode;
public interface LogicalPlanPreprocessEngine {
LogicalNode process(PlanContext planContext, Expr expr) throws TajoException;
}
|
apache/tapestry-5 | 1,150 | tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/ValidForm.java | // Copyright 2006, 2007, 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.tapestry5.integration.app1.pages;
import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.integration.app1.data.IncidentData;
public class ValidForm
{
@Persist
private IncidentData incident;
@Property
private String emailValidator;
public IncidentData getIncident()
{
return incident;
}
void onPrepare()
{
if (incident == null)
incident = new IncidentData();
}
}
|
apache/tapestry-5 | 1,155 | tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/test/IndirectResources.java | // Copyright 2010 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package org.apache.tapestry5.ioc.test;
import org.apache.tapestry5.ioc.ServiceResources;
import org.slf4j.Logger;
public class IndirectResources
{
private final Logger logger;
private final ServiceResources serviceResources;
public IndirectResources(Logger logger, ServiceResources resources)
{
this.logger = logger;
this.serviceResources = resources;
}
public Logger getLogger()
{
return logger;
}
public ServiceResources getResources()
{
return serviceResources;
}
}
|
apache/thrift | 1,181 | lib/java/src/main/java/org/apache/thrift/meta_data/MapMetaData.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.thrift.meta_data;
public class MapMetaData extends FieldValueMetaData {
public final FieldValueMetaData keyMetaData;
public final FieldValueMetaData valueMetaData;
public MapMetaData(byte type, FieldValueMetaData kMetaData, FieldValueMetaData vMetaData) {
super(type);
this.keyMetaData = kMetaData;
this.valueMetaData = vMetaData;
}
}
|
apache/tika | 1,078 | tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/onenote/ObjectStreamCounters.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.tika.parser.microsoft.onenote;
class ObjectStreamCounters {
long oids_count;
long osids_count;
long context_ids_count;
public ObjectStreamCounters() {
oids_count = 0;
osids_count = 0;
context_ids_count = 0;
}
}
|
apache/tomcat | 1,189 | java/org/apache/jasper/el/JspMethodNotFoundException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jasper.el;
import java.io.Serial;
import jakarta.el.MethodNotFoundException;
public class JspMethodNotFoundException extends MethodNotFoundException {
@Serial
private static final long serialVersionUID = 1L;
public JspMethodNotFoundException(String mark, MethodNotFoundException e) {
super(mark + " " + e.getMessage(), e.getCause());
}
}
|
apache/tomcat | 1,197 | java/org/apache/tomcat/dbcp/pool2/DestroyMode.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.tomcat.dbcp.pool2;
/**
* Destroy context provided to object factories via {@code destroyObject} and {@code invalidateObject} methods. Values
* provide information about why the pool is asking for a pooled object to be destroyed.
*
* @since 2.9.0
*/
public enum DestroyMode {
/** Normal destroy. */
NORMAL,
/** Destroy abandoned object. */
ABANDONED
}
|
apache/tomcat80 | 1,184 | java/org/apache/jasper/el/JspPropertyNotWritableException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jasper.el;
import javax.el.PropertyNotWritableException;
public class JspPropertyNotWritableException extends
PropertyNotWritableException {
private static final long serialVersionUID = 1L;
public JspPropertyNotWritableException(String mark, PropertyNotWritableException e) {
super(mark + " " + e.getMessage(), e.getCause());
}
}
|
apache/tomee | 1,117 | arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/jsp/Data.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.openejb.arquillian.tests.jsp;
import java.io.Serializable;
public class Data implements Serializable {
private String someText;
public String getSomeText() {
return someText;
}
public void setSomeText(String someText) {
this.someText = someText;
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.