use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project atlasdb by palantir.
the class ConnectionConfig method getHikariConfig.
@JsonIgnore
@Value.Derived
public HikariConfig getHikariConfig() {
// Initialize the Hikari configuration
HikariConfig config = new HikariConfig();
Properties props = getHikariProperties();
config.setPoolName("db-pool-" + getConnId() + "-" + getDbLogin());
config.setRegisterMbeans(true);
config.setMetricRegistry(SharedMetricRegistries.getOrCreate("com.palantir.metrics"));
config.setMinimumIdle(getMinConnections());
config.setMaximumPoolSize(getMaxConnections());
config.setMaxLifetime(TimeUnit.SECONDS.toMillis(getMaxConnectionAge()));
config.setIdleTimeout(TimeUnit.SECONDS.toMillis(getMaxIdleTime()));
config.setLeakDetectionThreshold(getUnreturnedConnectionTimeout());
// Not a bug - we don't want to use connectionTimeout here, since Hikari uses a different terminology.
// See https://github.com/brettwooldridge/HikariCP/wiki/Configuration - connectionTimeout = how long to wait for a connection to be opened.
// ConnectionConfig.connectionTimeoutSeconds is passed in via getHikariProperties(), in subclasses.
config.setConnectionTimeout(getCheckoutTimeout());
// TODO: See if driver supports JDBC4 (isValid()) and use it.
config.setConnectionTestQuery(getTestQuery());
if (!props.isEmpty()) {
config.setDataSourceProperties(props);
}
config.setJdbcUrl(getUrl());
DataSource dataSource = wrapDataSourceWithVisitor(new DriverDataSource(getUrl(), getDriverClass(), props, null, null), getOnAcquireConnectionVisitor());
config.setDataSource(dataSource);
return config;
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project uploader by smoketurner.
the class AwsConfiguration method getCredentials.
@JsonIgnore
public AwsCredentialsProvider getCredentials() {
final AwsCredentialsProvider credentials;
if (!Strings.isNullOrEmpty(accessKey) && !Strings.isNullOrEmpty(secretKey)) {
credentials = StaticCredentialsProvider.create(AwsCredentials.create(accessKey, secretKey));
} else {
credentials = DefaultCredentialsProvider.create();
}
if (Strings.isNullOrEmpty(stsRoleArn)) {
return credentials;
}
final STSClient stsClient = STSClient.builder().credentialsProvider(credentials).region(region).build();
final AssumeRoleRequest assumeRoleRequest = AssumeRoleRequest.builder().roleArn(stsRoleArn).build();
return StsAssumeRoleCredentialsProvider.builder().stsClient(stsClient).refreshRequest(assumeRoleRequest).build();
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project irida by phac-nml.
the class IridaSequenceFilePair method getReverseSequenceFile.
/**
* Get the reverse oriented {@link SequenceFile}
*
* @return reverse {@link SequenceFile}
*/
@JsonIgnore
public default IridaSequenceFile getReverseSequenceFile() {
IridaSequenceFile[] pair = getFiles().toArray(new IridaSequenceFile[getFiles().size()]);
String[] filenames = { pair[0].getFile().getFileName().toString(), pair[1].getFile().getFileName().toString() };
int index = StringUtils.indexOfDifference(filenames[0], filenames[1]);
if (Stream.of(reverseMatches).anyMatch(x -> String.valueOf(filenames[0].charAt(index)).equals(x))) {
return pair[0];
} else if (Stream.of(reverseMatches).anyMatch(x -> String.valueOf(filenames[1].charAt(index)).equals(x))) {
return pair[1];
} else {
throw new NoSuchElementException();
}
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project api-core by ca-cwds.
the class BaseAttorney method getPhones.
// =======================
// ApiMultiplePhonesAware:
// =======================
@JsonIgnore
@Override
@Transient
public ApiPhoneAware[] getPhones() {
List<ApiPhoneAware> phones = new ArrayList<>();
if (this.primaryPhoneNumber != null && this.messagePhoneNumber != 0) {
phones.add(new ReadablePhone(null, String.valueOf(this.primaryPhoneNumber), this.primaryPhoneExtensionNumber != null ? this.primaryPhoneExtensionNumber.toString() : null, null));
}
if (this.messagePhoneNumber != null && this.messagePhoneNumber != 0) {
LOGGER.debug("add message phone");
phones.add(new ReadablePhone(null, String.valueOf(this.messagePhoneNumber), this.messagePhoneExtensionNumber != null ? this.messagePhoneExtensionNumber.toString() : null, ApiPhoneAware.PhoneType.Cell));
}
return phones.toArray(new ApiPhoneAware[0]);
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project SONG by overture-stack.
the class StudyWithDonors method getStudy.
@JsonIgnore
public Study getStudy() {
val s = Study.create(getStudyId(), getName(), getOrganization(), getDescription());
s.setInfo(getInfoAsString());
return s;
}
Aggregations