public class CassandraArchiveOperationHandler extends Object implements ArchiveOperationHandler
Constructor and Description |
---|
CassandraArchiveOperationHandler() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
void |
archive(Object... objects)
Writes the specified objects to the external storage
|
void |
destroy() |
ColumnFamilyNameConverter |
getColumnFamilyNameConverter() |
FlattenedPropertiesFilter |
getFlattenedPropertiesFilter() |
GigaSpace |
getGigaSpace() |
String |
getHosts() |
String |
getKeyspace() |
Integer |
getPort() |
PropertyValueSerializer |
getPropertyValueSerializer() |
CassandraConsistencyLevel |
getWriteConsistency() |
void |
setColumnFamilyNameConverter(ColumnFamilyNameConverter columnFamilyNameConverter) |
void |
setFlattenedPropertiesFilter(FlattenedPropertiesFilter flattenedPropertiesFilter) |
void |
setGigaSpace(GigaSpace gigaSpace) |
void |
setHosts(String hosts) |
void |
setKeyspace(String keyspace) |
void |
setPort(Integer port) |
void |
setPropertyValueSerializer(PropertyValueSerializer propertyValueSerializer) |
void |
setWriteConsistency(CassandraConsistencyLevel writeConsistency) |
boolean |
supportsBatchArchiving()
What happens when the archive operation receives a batch of objects to persist and throws an
exception in the middle of the archiving? The external archive container (assuming the
exception is not swollen with an exception handler) will retry archiving all objects.
|
public void setGigaSpace(GigaSpace gigaSpace)
public void setHosts(String hosts)
hosts
- - Comma separated list of Cassandra servers (ipaddresses or hostnames).HectorCassandraClientConfigurer.hosts(String)
public void setPort(Integer port)
port
- - Cassandra server ports. Assumes same port for all servers. null means default
port is used.HectorCassandraClientConfigurer.port(Integer)
public void setKeyspace(String keyspace)
keyspace
- - the Cassandra keyspace name to connect to.HectorCassandraClientConfigurer.keyspaceName(String)
public void setWriteConsistency(CassandraConsistencyLevel writeConsistency)
writeConsistency
- - defines the consistency level used when writing to Cassandra.
default is null (which is mapped to CassandraConsistencyLevel.QUORUM
)HectorCassandraClientConfigurer.writeConsistencyLevel(CassandraConsistencyLevel)
public void setPropertyValueSerializer(PropertyValueSerializer propertyValueSerializer)
PropertyValueSerializer
public void setFlattenedPropertiesFilter(FlattenedPropertiesFilter flattenedPropertiesFilter)
FlattenedPropertiesFilter
public void setColumnFamilyNameConverter(ColumnFamilyNameConverter columnFamilyNameConverter)
ColumnFamilyNameConverter
public GigaSpace getGigaSpace()
public PropertyValueSerializer getPropertyValueSerializer()
public FlattenedPropertiesFilter getFlattenedPropertiesFilter()
public ColumnFamilyNameConverter getColumnFamilyNameConverter()
public String getHosts()
public Integer getPort()
public String getKeyspace()
public CassandraConsistencyLevel getWriteConsistency()
@PostConstruct public void afterPropertiesSet()
@PreDestroy public void destroy()
public void archive(Object... objects)
ArchiveOperationHandler
archive
in interface ArchiveOperationHandler
objects
- - one or more objects to write. If not ArchiveOperationHandler.supportsBatchArchiving()
then
only one object is passed at a time.SpaceCassandraException
- - Problem encountered while archiving to cassandraArchiveOperationHandler.archive(Object...)
public boolean supportsBatchArchiving()
ArchiveOperationHandler
supportsBatchArchiving
in interface ArchiveOperationHandler
ArchiveOperationHandler.supportsBatchArchiving()
Copyright © GigaSpaces.