org.wicketstuff.datastores.cassandra.CassandraSettings Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wicketstuff-datastore-cassandra Show documentation
Show all versions of wicketstuff-datastore-cassandra Show documentation
An implementation of Apache Wicket's IPageStore that uses Apache Cassandra as a backend
The newest version!
package org.wicketstuff.datastores.cassandra;
import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import org.apache.wicket.util.lang.Args;
/**
* @see org.wicketstuff.datastores.cassandra.ICassandraSettings
*/
public class CassandraSettings implements ICassandraSettings
{
private String keyspaceName = "wicket";
private String tableName = "pagestore";
private Duration recordTtl = Duration.ofMinutes(30);
private final List contactPoints = new ArrayList<>();
public CassandraSettings()
{
}
@Override
public ICassandraSettings setKeyspaceName(String keyspaceName)
{
this.keyspaceName = Args.notNull(keyspaceName, "keyspaceName").toLowerCase(Locale.ENGLISH);
return this;
}
@Override
public String getKeyspaceName()
{
return keyspaceName;
}
@Override
public ICassandraSettings setTableName(String tableName)
{
this.tableName = Args.notNull(tableName, "tableName").toLowerCase(Locale.ENGLISH);
return null;
}
@Override
public String getTableName()
{
return tableName;
}
@Override
public ICassandraSettings setRecordTtl(Duration ttl)
{
this.recordTtl = Args.notNull(ttl, "ttl");
return this;
}
@Override
public Duration getRecordTtl()
{
return recordTtl;
}
@Override
public List getContactPoints()
{
return contactPoints;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy