repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
apache/dubbo | 1,150 | dubbo-common/src/test/java/org/apache/dubbo/metadata/definition/service/annotation/MockTypeAnnotation.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.metadata.definition.service.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface MockTypeAnnotation {
int value();
}
|
apache/dubbo | 1,159 | dubbo-plugin/dubbo-qos/src/test/java/org/apache/dubbo/qos/command/impl/TestRegistryFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.qos.command.impl;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.registry.Registry;
import org.apache.dubbo.registry.RegistryFactory;
public class TestRegistryFactory implements RegistryFactory {
static Registry registry;
@Override
public Registry getRegistry(URL url) {
return registry;
}
}
|
apache/dubbo | 1,163 | dubbo-common/src/test/java/org/apache/dubbo/common/extension/director/FooModuleProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.extension.director;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.Adaptive;
import org.apache.dubbo.common.extension.ExtensionScope;
import org.apache.dubbo.common.extension.SPI;
@SPI(scope = ExtensionScope.MODULE)
public interface FooModuleProvider {
@Adaptive
void process(URL url);
}
|
apache/eagle | 1,141 | eagle-examples/eagle-app-example/src/main/java/org/apache/eagle/app/example/extensions/ExampleCommonServiceImpl.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eagle.app.example.extensions;
import org.apache.eagle.common.module.GlobalScope;
import org.apache.eagle.common.module.ModuleScope;
public class ExampleCommonServiceImpl implements ExampleCommonService{
@Override
public Class<? extends ModuleScope> getScope() {
return GlobalScope.class;
}
}
|
apache/eventmesh | 1,106 | eventmesh-connectors/eventmesh-connector-rabbitmq/src/main/java/org/apache/eventmesh/connector/rabbitmq/exception/RabbitmqConnectorException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eventmesh.connector.rabbitmq.exception;
public class RabbitmqConnectorException extends Exception {
public RabbitmqConnectorException(String message) {
super(message);
}
public RabbitmqConnectorException(Throwable throwable) {
super(throwable);
}
}
|
apache/eventmesh | 1,144 | eventmesh-common/src/main/java/org/apache/eventmesh/common/config/connector/rdb/jdbc/JdbcSourceConfig.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eventmesh.common.config.connector.rdb.jdbc;
import org.apache.eventmesh.common.config.connector.SourceConfig;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = true)
public class JdbcSourceConfig extends SourceConfig {
private SourceConnectorConfig sourceConnectorConfig;
}
|
apache/eventmesh | 1,144 | eventmesh-common/src/main/java/org/apache/eventmesh/common/config/connector/spring/SpringSourceConfig.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eventmesh.common.config.connector.spring;
import org.apache.eventmesh.common.config.connector.SourceConfig;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = true)
public class SpringSourceConfig extends SourceConfig {
private SourceConnectorConfig sourceConnectorConfig;
}
|
apache/eventmesh | 1,151 | eventmesh-common/src/main/java/org/apache/eventmesh/common/remote/job/JobConnectorConfig.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eventmesh.common.remote.job;
import java.util.Map;
import lombok.Data;
/**
* Description:
*/
@Data
public class JobConnectorConfig {
private Map<String, Object> sourceConnectorConfig;
private String sourceConnectorDesc;
private Map<String, Object> sinkConnectorConfig;
private String sinkConnectorDesc;
}
|
apache/felix-dev | 1,160 | gogo/command/src/main/java/org/apache/felix/gogo/command/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.
*/
@org.osgi.annotation.bundle.Capability(
namespace = "org.apache.felix.gogo",
name = "command.implementation",
version = "1.0.0"
)
@org.osgi.annotation.bundle.Requirement(
effective = "active",
namespace = "org.apache.felix.gogo",
name = "runtime.implementation",
version = "1.0.0"
)
package org.apache.felix.gogo.command;
|
apache/fineract | 1,132 | fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationMapperReadRepositoryWrapper.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.notification.service;
import java.util.List;
import org.apache.fineract.notification.domain.NotificationMapper;
public interface NotificationMapperReadRepositoryWrapper {
NotificationMapper findById(Long id);
List<NotificationMapper> fetchAllNotifications();
void delete(Long id);
}
|
apache/fineract | 1,141 | fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntity.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.infrastructure.entityaccess.domain;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;
@Getter
@Setter
@NoArgsConstructor
@Accessors(chain = true)
public class FineractEntity {
private Long entityId;
private FineractEntityType type;
}
|
apache/fineract | 1,152 | fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccountService.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.portfolio.loanaccount.domain;
public interface LoanAccountService {
LoanTransaction saveLoanTransactionWithDataIntegrityViolationChecks(LoanTransaction newRepaymentTransaction);
Loan saveAndFlushLoanWithDataIntegrityViolationChecks(Loan loan);
Loan saveLoanWithDataIntegrityViolationChecks(Loan loan);
}
|
apache/flink | 1,120 | flink-connectors/flink-hadoop-compatibility/src/main/java/org/apache/flink/api/java/hadoop/mapred/wrapper/HadoopDummyProgressable.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.flink.api.java.hadoop.mapred.wrapper;
import org.apache.flink.annotation.PublicEvolving;
import org.apache.hadoop.util.Progressable;
/** This is a dummy progress. */
@PublicEvolving
public class HadoopDummyProgressable implements Progressable {
@Override
public void progress() {}
}
|
apache/flink | 1,136 | flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/hybrid/tiered/storage/TieredStorageResource.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.flink.runtime.io.network.partition.hybrid.tiered.storage;
/** The resource (e.g., local files, remote storage files, etc.) for the Tiered Storage. */
public interface TieredStorageResource {
/** Release all the resources, e.g. delete the files, recycle the occupied memory, etc. */
void release();
}
|
apache/freemarker | 1,173 | freemarker-core/src/test/java/freemarker/core/CustomTemplateHTMLModel.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package freemarker.core;
public final class CustomTemplateHTMLModel extends TemplateHTMLOutputModel {
CustomTemplateHTMLModel(String plainTextContent, String markupContent) {
super(plainTextContent, markupContent);
}
@Override
public CustomHTMLOutputFormat getOutputFormat() {
return CustomHTMLOutputFormat.INSTANCE;
}
}
|
apache/geaflow | 1,122 | geaflow/geaflow-core/geaflow-engine/geaflow-cluster/src/main/java/org/apache/geaflow/cluster/collector/CloseEmitterRequest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.cluster.collector;
public class CloseEmitterRequest extends AbstractEmitterRequest {
public CloseEmitterRequest(int taskId, long windowId) {
super(taskId, windowId);
}
@Override
public RequestType getRequestType() {
return RequestType.CLOSE;
}
}
|
apache/geaflow | 1,122 | geaflow/geaflow-core/geaflow-engine/geaflow-cluster/src/main/java/org/apache/geaflow/cluster/collector/StashEmitterRequest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.cluster.collector;
public class StashEmitterRequest extends AbstractEmitterRequest {
public StashEmitterRequest(int taskId, long windowId) {
super(taskId, windowId);
}
@Override
public RequestType getRequestType() {
return RequestType.STASH;
}
}
|
apache/geode | 1,149 | geode-old-client-support/src/distributedTest/java/com/gemstone/gemfire/ClientPDXSerializableObject.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package com.gemstone.gemfire;
import org.apache.geode.pdx.PdxReader;
import org.apache.geode.pdx.PdxSerializable;
import org.apache.geode.pdx.PdxWriter;
public class ClientPDXSerializableObject implements PdxSerializable {
@Override
public void toData(final PdxWriter writer) {
}
@Override
public void fromData(final PdxReader reader) {
}
}
|
apache/geode | 1,151 | geode-junit/src/main/resources/org/apache/geode/management/internal/deployment/ExtendsFunctionAdapter.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.apache.geode.management.internal.deployment;
import org.apache.geode.cache.execute.FunctionAdapter;
import org.apache.geode.cache.execute.FunctionContext;
public class ExtendsFunctionAdapter extends FunctionAdapter {
public void execute(FunctionContext context) {
context.getResultSender().lastResult("ExtendsFunctionAdapterResult");
}
}
|
apache/geode | 1,157 | geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/InternalAsyncEventQueue.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.geode.cache.asyncqueue.internal;
import org.apache.geode.cache.asyncqueue.AsyncEventQueue;
import org.apache.geode.internal.cache.wan.InternalGatewaySender;
public interface InternalAsyncEventQueue extends AsyncEventQueue {
InternalGatewaySender getSender();
AsyncEventQueueStats getStatistics();
void stop();
void destroy();
}
|
apache/gobblin | 1,154 | gobblin-core-base/src/main/java/org/apache/gobblin/source/extractor/extract/EventBasedSource.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.gobblin.source.extractor.extract;
import org.apache.gobblin.configuration.SourceState;
/**
* A base implementation of {@link org.apache.gobblin.source.Source} for
* event-based sources.
*/
public abstract class EventBasedSource<S, D> extends AbstractSource<S, D> {
@Override
public void shutdown(SourceState state) {
}
}
|
apache/groovy | 1,166 | subprojects/groovy-xml/src/main/java/groovy/xml/markupsupport/DoubleQuoteFilter.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package groovy.xml.markupsupport;
import java.util.Optional;
import java.util.function.Function;
public class DoubleQuoteFilter implements Function<Character, Optional<String>> {
@Override
public Optional<String> apply(Character ch) {
if (ch == '"') return Optional.of(""");
else return Optional.empty();
}
}
|
apache/groovy | 1,205 | src/test/groovy/gls/annotations/Require.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package gls.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD})
@Repeatable(Requires.class)
public @interface Require {
String value() default "";
}
|
apache/hadoop-common | 1,053 | hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/event/LocalizationEventType.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.event;
public enum LocalizationEventType {
INIT_APPLICATION_RESOURCES,
INIT_CONTAINER_RESOURCES,
CACHE_CLEANUP,
CLEANUP_CONTAINER_RESOURCES,
DESTROY_APPLICATION_RESOURCES,
}
|
apache/hadoop-common | 1,131 | hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/factories/RecordFactory.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.yarn.factories;
import org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate;
import org.apache.hadoop.classification.InterfaceStability.Unstable;
@LimitedPrivate({ "MapReduce", "YARN" })
@Unstable
public interface RecordFactory {
public <T> T newRecordInstance(Class<T> clazz);
}
|
apache/hadoop-common | 1,138 | hadoop-tools/hadoop-streaming/src/main/java/org/apache/hadoop/streaming/io/KeyOnlyTextInputWriter.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.streaming.io;
import java.io.IOException;
public class KeyOnlyTextInputWriter extends TextInputWriter {
@Override
public void writeKey(Object key) throws IOException {
writeUTF8(key);
clientOut.write('\n');
}
@Override
public void writeValue(Object value) throws IOException {}
}
|
apache/hadoop | 1,085 | hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/GetTaskReportResponse.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.mapreduce.v2.api.protocolrecords;
import org.apache.hadoop.mapreduce.v2.api.records.TaskReport;
public interface GetTaskReportResponse {
public abstract TaskReport getTaskReport();
public abstract void setTaskReport(TaskReport taskReport);
}
|
apache/hadoop | 1,115 | hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/lib/db/DBWritable.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.lib.db;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
@InterfaceAudience.Public
@InterfaceStability.Stable
public interface DBWritable
extends org.apache.hadoop.mapreduce.lib.db.DBWritable {
}
|
apache/harmony | 1,172 | classlib/modules/awt/src/main/java/common/java/awt/GridBagLayoutInfo.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT 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 Michael Danilov
*/
package java.awt;
class GridBagLayoutInfo {
int widths[];
int heights[];
GridBagLayoutInfo(int widths[], int heights[]) {
this.widths = widths;
this.heights = heights;
}
void update(int widths[], int heights[]) {
this.widths = widths;
this.heights = heights;
}
}
|
apache/hop | 1,133 | plugins/transforms/salesforce/src/test/java/org/apache/hop/pipeline/transforms/salesforce/SalesforceTransformDataTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hop.pipeline.transforms.salesforce;
import static org.junit.jupiter.api.Assertions.assertNull;
import org.junit.jupiter.api.Test;
class SalesforceTransformDataTest {
@Test
void testConstructor() {
SalesforceTransformData data = new SalesforceTransformData();
assertNull(data.connection);
}
}
|
apache/hop | 1,183 | core/src/main/java/org/apache/hop/core/plugins/IPluginTypeListener.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hop.core.plugins;
/**
* Listeners can be registered with the plugin registry to receive notifications of plugins being
* added/remove/modified
*
* <p>User: nbaker Date: 11/11/10
*/
public interface IPluginTypeListener {
void pluginAdded(Object serviceObject);
void pluginRemoved(Object serviceObject);
void pluginChanged(Object serviceObject);
}
|
apache/hop | 1,186 | rap/src/main/java/org/apache/hop/ui/hopgui/TextSizeUtilFacadeImpl.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hop.ui.hopgui;
import org.eclipse.rap.rwt.internal.textsize.TextSizeUtil;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Display;
public class TextSizeUtilFacadeImpl extends TextSizeUtilFacade {
@Override
Point textExtentInternal(String text) {
return TextSizeUtil.stringExtent(Display.getCurrent().getSystemFont(), text);
}
}
|
apache/hudi | 1,150 | hudi-utilities/src/main/java/org/apache/hudi/utilities/exception/HoodieIncrementalPullSQLException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.utilities.exception;
import java.sql.SQLException;
public class HoodieIncrementalPullSQLException extends HoodieIncrementalPullException {
public HoodieIncrementalPullSQLException(String msg, SQLException e) {
super(msg, e);
}
public HoodieIncrementalPullSQLException(String msg) {
super(msg);
}
}
|
apache/hudi | 1,172 | hudi-common/src/main/java/org/apache/hudi/common/util/DefaultSizeEstimator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.common.util;
import java.io.Serializable;
/**
* Default implementation of size-estimator that uses Twitter's ObjectSizeCalculator.
*
* @param <T>
*/
public class DefaultSizeEstimator<T> implements SizeEstimator<T>, Serializable {
@Override
public long sizeEstimate(T t) {
return ObjectSizeCalculator.getObjectSize(t);
}
}
|
apache/hudi | 1,172 | hudi-common/src/main/java/org/apache/hudi/exception/HoodieAvroSchemaException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.exception;
/**
* Thrown when we detect in Hudi code that a record schema
* violates Avro rules. This can happen even when using Spark
* because we use Avro schema internally
*/
public class HoodieAvroSchemaException extends SchemaCompatibilityException {
public HoodieAvroSchemaException(String message) {
super(message);
}
}
|
apache/iggy | 1,172 | foreign/java/java-sdk/src/main/java/org/apache/iggy/user/GlobalPermissions.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.user;
public record GlobalPermissions(
boolean manageServers,
boolean readServers,
boolean manageUsers,
boolean readUsers,
boolean manageStreams,
boolean readStreams,
boolean manageTopics,
boolean readTopics,
boolean pollMessages,
boolean sendMessages
) {
}
|
apache/ignite-3 | 1,148 | modules/runner/src/integrationTest/java/org/apache/ignite/internal/table/ItTablePutGetEmbeddedTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.table;
import org.apache.ignite.table.IgniteTables;
/**
* Tests to check that rows can be inserted and retrieved through embedded client.
*/
public class ItTablePutGetEmbeddedTest extends ItTablePutGetBaseTest {
@Override
IgniteTables tables() {
return CLUSTER.aliveNode().tables();
}
}
|
apache/ignite-3 | 1,160 | modules/storage-api/src/main/java/org/apache/ignite/internal/storage/AddWriteResultStatus.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.storage;
/** Status of result {@link MvPartitionStorage#addWrite add} of write intent. */
public enum AddWriteResultStatus {
/** Successful add of write intent or replace for same transaction. */
SUCCESS,
/** Failed to add write intent because it already exists for another transaction. */
TX_MISMATCH;
}
|
apache/ignite | 1,113 | modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOnheapMultiNodeFullApiSelfTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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 GridCachePartitionedOnheapMultiNodeFullApiSelfTest extends GridCachePartitionedMultiNodeFullApiSelfTest {
/** {@inheritDoc} */
@Override protected boolean onheapCacheEnabled() {
return true;
}
}
|
apache/ignite | 1,123 | modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteQueryTableLockAndConnectionPoolLazyModeOnTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.query;
/**
* Tests for lazy query execution.
*/
public class IgniteQueryTableLockAndConnectionPoolLazyModeOnTest
extends AbstractQueryTableLockAndConnectionPoolSelfTest {
/** {@inheritDoc} */
@Override protected boolean lazy() {
return true;
}
}
|
apache/ignite | 1,144 | modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/tree/io/PageIoResolver.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.persistence.tree.io;
import org.apache.ignite.IgniteCheckedException;
/** */
public interface PageIoResolver {
/** */
public static final PageIoResolver DEFAULT_PAGE_IO_RESOLVER = PageIO::getPageIO;
/** */
PageIO resolve(long pageAddr) throws IgniteCheckedException;
}
|
apache/ignite | 1,164 | modules/core/src/test/java/org/apache/ignite/testframework/assertions/AlwaysAssertion.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.testframework.assertions;
/** An {@link Assertion} that always passes. */
public class AlwaysAssertion implements Assertion {
/** Singleton instance */
public static final Assertion INSTANCE = new AlwaysAssertion();
/** {@inheritDoc} */
@Override public void test() throws AssertionError {
// No-op.
}
}
|
apache/incubator-heron | 1,156 | storm-compatibility/v0.10.2/src/java/backtype/storm/metric/api/MetricDelegate.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package backtype.storm.metric.api;
@SuppressWarnings("rawtypes")
public class MetricDelegate implements org.apache.heron.api.metric.IMetric {
private IMetric delegate;
public MetricDelegate(IMetric delegate) {
this.delegate = delegate;
}
@Override
public Object getValueAndReset() {
return delegate.getValueAndReset();
}
}
|
apache/incubator-kie-drools | 1,129 | drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/model/CheeseInterface.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.mvel.model;
public interface CheeseInterface {
public String getType();
public int getPrice();
/**
* @param price the price to set
*/
public void setPrice(final int price);
/**
* @param type the type to set
*/
public void setType(final String type);
}
|
apache/incubator-kie-drools | 1,131 | drools-verifier/drools-verifier-drl/src/main/java/org/drools/verifier/components/ReturnValueFieldDescr.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.verifier.components;
public class ReturnValueFieldDescr extends PatternComponent {
public ReturnValueFieldDescr(Pattern pattern) {
super( pattern );
}
public VerifierComponentType getVerifierComponentType() {
return VerifierComponentType.RETURN_VALUE_FIELD_DESCR;
}
}
|
apache/incubator-kie-drools | 1,143 | kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/internal/utils/FailedConversionException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.dmn.core.internal.utils;
import org.kie.dmn.api.feel.runtime.events.FEELEvent;
public class FailedConversionException extends RuntimeException {
private static final long serialVersionUID = -8455184925130529001L;
public FailedConversionException(FEELEvent event) {
super(event.getMessage());
}
} |
apache/incubator-kie-drools | 1,151 | kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/api/BusinessKnowledgeModel.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.dmn.model.api;
import java.util.List;
public interface BusinessKnowledgeModel extends Invocable {
FunctionDefinition getEncapsulatedLogic();
void setEncapsulatedLogic(FunctionDefinition value);
List<KnowledgeRequirement> getKnowledgeRequirement();
List<AuthorityRequirement> getAuthorityRequirement();
}
|
apache/incubator-kie-drools | 1,163 | kie-api/src/main/java/org/kie/api/runtime/process/StatefulProcessSession.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.kie.api.runtime.process;
/**
* There are currently no process related methods that are used with the external KieSession class. So this
* interface is just a marker at the moment, but may find more uses in the future as requirements are discovered.
*
* @see org.kie.api.runtime.KieSession
*/
public interface StatefulProcessSession {
}
|
apache/incubator-kie-kogito-examples | 1,111 | kogito-quarkus-examples/process-knative-quickstart-quarkus/src/main/java/org/acme/travel/TravellerValidationService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.acme.travel;
import org.drools.ruleunits.api.*;
public class TravellerValidationService implements RuleUnitData {
private final SingletonStore<Traveller> traveller = DataSource.createSingleton();
public SingletonStore<Traveller> getTraveller() {
return traveller;
}
}
|
apache/incubator-kie-kogito-runtimes | 1,158 | jbpm/jbpm-tests/src/main/java/org/jbpm/bpmn2/objects/Address.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jbpm.bpmn2.objects;
import java.io.Serializable;
import jakarta.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public class Address implements Serializable {
private String street;
public String getStreet() {
return street;
}
public void setStreet(String street) {
this.street = street;
}
}
|
apache/incubator-kie-optaplanner | 1,118 | core/optaplanner-core-impl/src/main/java/org/optaplanner/core/impl/domain/valuerange/util/ValueRangeIterator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.optaplanner.core.impl.domain.valuerange.util;
import java.util.Iterator;
public abstract class ValueRangeIterator<S> implements Iterator<S> {
@Override
public void remove() {
throw new UnsupportedOperationException("The optional operation remove() is not supported.");
}
}
|
apache/incubator-kie-optaplanner | 1,128 | core/optaplanner-core-impl/src/main/java/org/optaplanner/core/config/constructionheuristic/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.
*/
@XmlSchema(
namespace = SolverConfig.XML_NAMESPACE,
elementFormDefault = XmlNsForm.QUALIFIED)
package org.optaplanner.core.config.constructionheuristic;
import jakarta.xml.bind.annotation.XmlNsForm;
import jakarta.xml.bind.annotation.XmlSchema;
import org.optaplanner.core.config.solver.SolverConfig;
|
apache/incubator-kie-optaplanner | 1,130 | core/optaplanner-core-impl/src/main/java/org/optaplanner/core/impl/solver/thread/ChildThreadType.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.optaplanner.core.impl.solver.thread;
import org.optaplanner.core.impl.partitionedsearch.PartitionedSearchPhase;
public enum ChildThreadType {
/**
* Used by {@link PartitionedSearchPhase}.
*/
PART_THREAD,
/**
* Used by multithreaded incremental solving.
*/
MOVE_THREAD;
}
|
apache/incubator-seata-samples | 1,140 | saga-sample/spring-seata-saga/src/main/java/org/apache/seata/action/InventoryAction.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.seata.provider.action;
/**
* Inventory Actions
*/
public interface InventoryAction {
/**
* reduce
*
* @param count
* @return
*/
boolean reduce(String businessKey, int count);
/**
* increase
*
* @return
*/
boolean compensateReduce(String businessKey);
}
|
apache/incubator-tez | 1,162 | tez-runtime-internals/src/main/java/org/apache/tez/runtime/api/impl/EventType.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.tez.runtime.api.impl;
public enum EventType {
TASK_ATTEMPT_COMPLETED_EVENT,
TASK_ATTEMPT_FAILED_EVENT,
DATA_MOVEMENT_EVENT,
INPUT_READ_ERROR_EVENT,
INPUT_FAILED_EVENT,
TASK_STATUS_UPDATE_EVENT,
VERTEX_MANAGER_EVENT,
ROOT_INPUT_DATA_INFORMATION_EVENT,
COMPOSITE_DATA_MOVEMENT_EVENT,
ROOT_INPUT_INITIALIZER_EVENT,
}
|
apache/incubator-tuweni | 1,168 | junit/src/test/java/org/apache/tuweni/junit/BouncyCastleExtensionTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE
* file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
* to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package org.apache.tuweni.junit;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import java.security.Security;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
@ExtendWith(BouncyCastleExtension.class)
class BouncyCastleExtensionTest {
@Test
void testExtensionLoaded() {
assertNotNull(Security.getProvider("BC"));
}
}
|
apache/incubator-xtable | 1,172 | xtable-core/src/main/java/org/apache/xtable/schema/SchemaUtils.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.schema;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class SchemaUtils {
public static String getFullyQualifiedPath(String path, String fieldName) {
if (path == null || path.isEmpty()) {
return fieldName;
}
return path + "." + fieldName;
}
}
|
apache/jackrabbit | 1,163 | jackrabbit-core/src/test/java/org/apache/jackrabbit/core/integration/JCRAPITest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.core.integration;
import junit.framework.Test;
import junit.framework.TestCase;
import org.apache.jackrabbit.test.JCRTestSuite;
/**
* Test suite that includes all test suites from jackrabbit-jcr-tests.
*/
public class JCRAPITest extends TestCase {
public static Test suite() {
return new JCRTestSuite();
}
}
|
apache/jclouds | 1,151 | providers/aws-route53/src/test/java/org/jclouds/aws/route53/features/AWSHostedZoneApiLiveTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jclouds.aws.route53.features;
import org.jclouds.route53.features.HostedZoneApiLiveTest;
import org.testng.annotations.Test;
@Test(groups = "live", testName = "AWSHostedZoneApiLiveTest")
public class AWSHostedZoneApiLiveTest extends HostedZoneApiLiveTest {
public AWSHostedZoneApiLiveTest() {
provider = "aws-route53";
}
}
|
apache/jclouds | 1,189 | core/src/main/java/org/jclouds/concurrent/SingleThreaded.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.concurrent;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
* designates that the object must not exist in an environment that spawns threads.
*/
@Retention(RUNTIME)
@Target(TYPE)
public @interface SingleThreaded {
}
|
apache/jclouds | 1,192 | core/src/main/java/org/jclouds/rest/ConfiguresHttpApi.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.rest;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
* designates the module configures a top-level api which is annotated with http methods.
*/
@Retention(RUNTIME)
@Target(TYPE)
public @interface ConfiguresHttpApi {
}
|
apache/jena | 1,145 | jena-geosparql/src/main/java/org/apache/jena/geosparql/spatial/property_functions/cardinal/NorthGeomPF.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jena.geosparql.spatial.property_functions.cardinal;
import org.apache.jena.geosparql.spatial.CardinalDirection;
/**
*
*
*/
public class NorthGeomPF extends GenericCardinalGeomPropertyFunction {
@Override
protected CardinalDirection getCardinalDirection() {
return CardinalDirection.NORTH;
}
}
|
apache/jena | 1,145 | jena-geosparql/src/main/java/org/apache/jena/geosparql/spatial/property_functions/cardinal/SouthGeomPF.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jena.geosparql.spatial.property_functions.cardinal;
import org.apache.jena.geosparql.spatial.CardinalDirection;
/**
*
*
*/
public class SouthGeomPF extends GenericCardinalGeomPropertyFunction {
@Override
protected CardinalDirection getCardinalDirection() {
return CardinalDirection.SOUTH;
}
}
|
apache/jena | 1,168 | jena-arq/src/main/java/org/apache/jena/sparql/function/library/FN_ImplicitTimezone.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jena.sparql.function.library;
import org.apache.jena.sparql.expr.NodeValue;
import org.apache.jena.sparql.expr.nodevalue.XSDFuncOp;
import org.apache.jena.sparql.function.FunctionBase0;
public class FN_ImplicitTimezone extends FunctionBase0 {
@Override
public NodeValue exec() {
return XSDFuncOp.implicitTimezone();
}
}
|
apache/kafka | 1,158 | coordinator-common/src/main/java/org/apache/kafka/coordinator/common/runtime/Serializer.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.kafka.coordinator.common.runtime;
/**
* Serializer to translate T to bytes.
*
* @param <T> The record type.
*/
public interface Serializer<T> {
/**
* Serializes the key of the record.
*/
byte[] serializeKey(T record);
/**
* Serializes the value of the record.
*/
byte[] serializeValue(T record);
}
|
apache/kafka | 1,172 | clients/src/main/java/org/apache/kafka/common/errors/FencedInstanceIdException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.kafka.common.errors;
public class FencedInstanceIdException extends ApplicationRecoverableException {
private static final long serialVersionUID = 1L;
public FencedInstanceIdException(String message) {
super(message);
}
public FencedInstanceIdException(String message, Throwable cause) {
super(message, cause);
}
}
|
apache/kylin | 1,154 | src/core-common/src/main/java/org/apache/kylin/common/event/ProjectCleanOldQueryResultEvent.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.kylin.common.event;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class ProjectCleanOldQueryResultEvent {
// clean old query result
private String project;
}
|
apache/lucene | 1,180 | lucene/monitor/src/test/org/apache/lucene/monitor/TestParallelMatcher.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.lucene.monitor;
import java.util.concurrent.ExecutorService;
public class TestParallelMatcher extends ConcurrentMatcherTestBase {
@Override
protected <T extends QueryMatch> MatcherFactory<T> matcherFactory(
ExecutorService executor, MatcherFactory<T> factory, int threads) {
return ParallelMatcher.factory(executor, factory, threads);
}
}
|
apache/maven-jlink-plugin | 1,146 | src/it/projects/MJLINK-9_reactor/app/src/main/java/com/reactor/project/app/App.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.reactor.project.app;
import com.reactor.project.api.Currency;
import com.reactor.project.api.Money;
import java.math.BigDecimal;
public class App
{
public static void main ( String[] args )
{
Money money = new Money(new Currency("Euro"), BigDecimal.ZERO);
System.out.println("Money: [" + money + "]");
}
}
|
apache/mina-ftpserver | 1,152 | core/src/test/java/org/apache/ftpserver/ftpletcontainer/FtpLetThrowIOExceptionTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.ftpserver.ftpletcontainer;
import java.io.IOException;
/**
*
* @author <a href="http://mina.apache.org">Apache MINA Project</a>
*
*/
public class FtpLetThrowIOExceptionTest extends FtpLetThrowFtpExceptionTest {
@Override
protected void throwException() throws IOException {
throw new IOException();
}
}
|
apache/mina-sshd | 1,160 | sshd-sftp/src/main/java/org/apache/sshd/sftp/server/SftpFileSystemAccessorProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.sshd.sftp.server;
/**
* @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
*/
@FunctionalInterface
public interface SftpFileSystemAccessorProvider {
/**
* @return The {@link SftpFileSystemAccessor} to use for accessing files and directories
*/
SftpFileSystemAccessor getFileSystemAccessor();
}
|
apache/nifi | 1,108 | nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/queue/clustered/client/LoadBalanceFlowFileCodec.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.nifi.controller.queue.clustered.client;
import org.apache.nifi.controller.repository.FlowFileRecord;
import java.io.IOException;
import java.io.OutputStream;
public interface LoadBalanceFlowFileCodec {
void encode(FlowFileRecord flowFile, OutputStream out) throws IOException;
}
|
apache/nifi | 1,121 | nifi-extension-bundles/nifi-slack-bundle/nifi-slack-processors/src/main/java/org/apache/nifi/processors/slack/consume/UserInfoClient.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.nifi.processors.slack.consume;
import com.slack.api.methods.SlackApiException;
import com.slack.api.methods.response.users.UsersInfoResponse;
import java.io.IOException;
public interface UserInfoClient {
UsersInfoResponse fetchUserInfo(String userId) throws IOException, SlackApiException;
}
|
apache/oodt | 1,183 | cli/src/main/java/org/apache/oodt/cas/cli/parser/CmdLineParser.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.oodt.cas.cli.parser;
//JDK imports
import java.util.List;
//OODT imports
import org.apache.oodt.cas.cli.util.ParsedArg;
/**
* Command Line parser which parse command line arguments into a {@link Set} of
* {@link CmdLineOptionInstance}s.
*
* @author bfoster (Brian Foster)
*/
public interface CmdLineParser {
List<ParsedArg> parse(String[] args);
}
|
apache/openjpa | 1,141 | openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/discriminator/CharLeafEntity.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.discriminator;
import jakarta.persistence.Entity;
@Entity(name="chrLeaf")
public class CharLeafEntity
extends CharRootEntity {
private int subInt;
public int getSubInt() {
return subInt;
}
public void setSubInt(int subInt) {
this.subInt = subInt;
}
}
|
apache/openmeetings | 1,133 | openmeetings-web/src/main/java/org/apache/openmeetings/web/user/dashboard/RecentRoomsWidgetDescriptor.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License") + you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.web.user.dashboard;
public class RecentRoomsWidgetDescriptor extends OmWidgetDescriptor {
private static final long serialVersionUID = 1L;
public RecentRoomsWidgetDescriptor() {
super("widget.recent.title", "widget.recent.desc", "om.widget.recentrooms", RecentRoomsWidget.class);
}
}
|
apache/openwebbeans | 1,121 | webbeans-arquillian/owb-arquillian-standalone/src/test/java/org/apache/webbeans/arquillian/test/beans/NonCdiBean.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.arquillian.test.beans;
import java.io.Serializable;
/**
* A class which doesn't use any CDI stuff.
*/
public class NonCdiBean implements Serializable
{
private int i;
public int getI()
{
return i;
}
public void setI(int i)
{
this.i = i;
}
}
|
apache/openwebbeans | 1,140 | webbeans-impl/src/test/java/org/apache/webbeans/test/decorators/multiple/RequestStringBuilder.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.decorators.multiple;
import jakarta.enterprise.inject.Model;
@Model
public class RequestStringBuilder
{
private StringBuilder sb = new StringBuilder();
public void addOutput(String s)
{
sb.append(s);
}
public String toString()
{
return sb.toString();
}
}
|
apache/ozone | 1,175 | hadoop-hdds/config/src/main/java/org/apache/hadoop/hdds/conf/ConfigGroup.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.hdds.conf;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Mark pojo which holds configuration variables.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface ConfigGroup {
String prefix();
}
|
apache/parquet-java | 1,145 | parquet-format-structures/src/main/java/org/apache/parquet/format/InvalidParquetMetadataException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.parquet.format;
/**
* A specific RuntimeException thrown when invalid values are found in the Parquet file metadata (including the footer,
* page header etc.).
*/
public class InvalidParquetMetadataException extends RuntimeException {
InvalidParquetMetadataException(String message) {
super(message);
}
}
|
apache/parquet-java | 1,162 | parquet-common/src/main/java/org/apache/parquet/ParquetSizeOverflowException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.parquet;
/**
* RuntimeException occurs when size overflow.
*/
public class ParquetSizeOverflowException extends ParquetRuntimeException {
private static final long serialVersionUID = 1L;
public ParquetSizeOverflowException() {
super();
}
public ParquetSizeOverflowException(String message) {
super(message);
}
}
|
apache/pig | 1,189 | src/org/apache/pig/impl/io/ResourceNotFoundException.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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;
public class ResourceNotFoundException extends Exception
{
private static final long serialVersionUID = 1L;
private String resourceName;
public ResourceNotFoundException(String resourceName)
{
this.resourceName = resourceName;
}
public String toString()
{
return "Resource '" + resourceName + "' does not exist";
}
}
|
apache/plc4x | 1,141 | plc4j/transports/serial/src/main/java/org/apache/plc4x/java/transport/serial/SerialTransportConfiguration.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.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.transport.serial;
import org.apache.plc4x.java.spi.configuration.PlcTransportConfiguration;
public interface SerialTransportConfiguration extends PlcTransportConfiguration {
int getBaudRate();
int getNumDataBits();
int getNumStopBits();
SerialChannelOptionsParity getParity();
}
|
apache/plc4x | 1,165 | plc4j/api/src/main/java/org/apache/plc4x/java/api/model/PlcConsumerRegistration.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.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.api.model;
import java.util.List;
/**
* Represents the registration of one consumer for a given subscription handle.
* Also provides the means to unsubscribe.
*/
public interface PlcConsumerRegistration {
Integer getConsumerId();
List<PlcSubscriptionHandle> getSubscriptionHandles();
void unregister();
}
|
apache/poi | 1,183 | poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/Bookmark.java | /* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
package org.apache.poi.hwpf.usermodel;
/**
* User friendly interface to access information about document bookmarks
*/
public interface Bookmark
{
int getEnd();
String getName();
int getStart();
void setName( String name );
}
|
apache/pulsar | 1,130 | pulsar-transaction/coordinator/src/main/java/org/apache/pulsar/transaction/coordinator/impl/TxnLogBufferedWriterConfig.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.pulsar.transaction.coordinator.impl;
import lombok.Data;
@Data
public class TxnLogBufferedWriterConfig {
private int batchedWriteMaxRecords = 512;
private int batchedWriteMaxSize = 1024 * 1024 * 4;
private int batchedWriteMaxDelayInMillis = 1;
private boolean batchEnabled = false;
}
|
apache/pulsar | 1,139 | pulsar-functions/java-examples/src/main/java/org/apache/pulsar/functions/api/examples/serde/CustomObject.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.pulsar.functions.api.examples.serde;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
/**
* This class simulates a user defined POJO.
*/
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class CustomObject {
private long value;
}
|
apache/pulsar | 1,157 | pulsar-client-admin-api/src/main/java/org/apache/pulsar/common/policies/data/SegmentStats.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.pulsar.common.policies.data;
public class SegmentStats {
public String lastTxnID;
public String persistentPosition;
public SegmentStats(String lastTxnID, String persistentPosition) {
this.lastTxnID = lastTxnID;
this.persistentPosition = persistentPosition;
}
public SegmentStats() {
}
}
|
apache/pulsar | 1,171 | managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ScanOutcome.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.bookkeeper.mledger;
/**
* Outcome of a Scan operation.
*/
public enum ScanOutcome {
/**
* The scan run fully.
*/
COMPLETED,
/**
* The scan was aborted by the system (timed out or too many entries...).
*/
ABORTED,
/**
* The provided user condition aborted the scan.
*/
USER_INTERRUPTED
}
|
apache/qpid-broker-j | 1,157 | broker-core/src/main/java/org/apache/qpid/server/model/DefaultVirtualHostAlias.java | /*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
package org.apache.qpid.server.model;
@ManagedObject( category = false, type = DefaultVirtualHostAlias.TYPE_NAME)
public interface DefaultVirtualHostAlias<X extends VirtualHostAlias<X>> extends VirtualHostAlias<X>
{
String TYPE_NAME = "defaultAlias";
@Override
@ManagedAttribute( defaultValue = "500" )
int getPriority();
}
|
apache/reef | 1,139 | lang/java/reef-examples/src/main/java/org/apache/reef/examples/group/bgd/operatornames/ControlMessageBroadcaster.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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;
/**
* Used to identify the broadcast operator for control flow messages.
*/
@NamedParameter()
public final class ControlMessageBroadcaster implements Name<String> {
}
|
apache/reef | 1,142 | lang/java/reef-runtime-azbatch/src/main/java/org/apache/reef/runtime/azbatch/parameters/ContainerIdentifier.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.reef.runtime.azbatch.parameters;
import org.apache.reef.tang.annotations.Name;
import org.apache.reef.tang.annotations.NamedParameter;
/**
* The container identifier for the evaluator shim.
*/
@NamedParameter(doc = "The container identifier.")
public final class ContainerIdentifier implements Name<String> {
}
|
apache/reef | 1,147 | lang/java/reef-io/src/main/java/org/apache/reef/io/network/group/impl/config/parameters/OperatorName.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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;
/**
* Name of the operator.
*/
@NamedParameter(doc = "Name of the operator")
public final class OperatorName implements Name<String> {
private OperatorName() {
}
}
|
apache/reef | 1,163 | lang/java/reef-common/src/main/java/org/apache/reef/driver/parameters/DriverMemory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.driver.parameters;
import org.apache.reef.tang.annotations.Name;
import org.apache.reef.tang.annotations.NamedParameter;
/**
* Driver RAM allocation in MB.
*/
@NamedParameter(doc = "Driver RAM allocation in MB", default_value = "256")
public final class DriverMemory implements Name<Integer> {
private DriverMemory() {
}
}
|
apache/rocketmq-clients | 1,155 | java/client/src/main/java/org/apache/rocketmq/client/java/misc/RequestIdGenerator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.rocketmq.client.java.misc;
import java.util.UUID;
public class RequestIdGenerator {
private static final RequestIdGenerator INSTANCE = new RequestIdGenerator();
public static RequestIdGenerator getInstance() {
return INSTANCE;
}
public String next() {
return UUID.randomUUID().toString();
}
}
|
apache/samza | 1,175 | samza-rest/src/test/java/org/apache/samza/rest/resources/BaseJerseyTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.samza.rest.resources;
import org.glassfish.jersey.test.JerseyTest;
import org.glassfish.jersey.test.TestProperties;
public class BaseJerseyTest extends JerseyTest {
public BaseJerseyTest() {
// Configure port as 0 to let Jersey test HTTP server choose an available port dynamically
forceSet(TestProperties.CONTAINER_PORT, "0");
}
}
|
apache/seatunnel | 1,113 | seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/executor/StatementFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.seatunnel.connectors.seatunnel.jdbc.internal.executor;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
@FunctionalInterface
public interface StatementFactory {
PreparedStatement createStatement(Connection connection) throws SQLException;
}
|
apache/seatunnel | 1,123 | seatunnel-engine/seatunnel-engine-common/src/main/java/org/apache/seatunnel/engine/common/exception/JobDefineCheckException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.seatunnel.engine.common.exception;
public class JobDefineCheckException extends SeaTunnelEngineException {
public JobDefineCheckException(String message) {
super(message);
}
public JobDefineCheckException(String message, Throwable cause) {
super(message, cause);
}
}
|
apache/seatunnel | 1,152 | seatunnel-api/src/main/java/org/apache/seatunnel/api/table/schema/event/AlterTableColumnEvent.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.table.schema.event;
import org.apache.seatunnel.api.table.catalog.TableIdentifier;
import lombok.ToString;
@ToString(callSuper = true)
public abstract class AlterTableColumnEvent extends AlterTableEvent {
public AlterTableColumnEvent(TableIdentifier tableIdentifier) {
super(tableIdentifier);
}
}
|
apache/sedona | 1,180 | common/src/main/java/org/apache/sedona/common/raster/PixelRecord.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.sedona.common.raster;
import org.locationtech.jts.geom.Geometry;
public class PixelRecord {
public final Geometry geom;
public final double value;
public final int colX, rowY;
public PixelRecord(Geometry geom, double value, int colX, int rowY) {
this.geom = geom;
this.value = value;
this.colX = colX;
this.rowY = rowY;
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.