phantom-dsl


How to clean up RootConnector in phantom-dsl?


In phantom-dsl version 1.12.2, what is the mechanism to close/shutdown/cleanup resources after finishing talking with Cassandra when using the RootConnector way of connecting to a Cassandra cluster?
This is an example:
object Whatever extends DatabaseProvider {
private[this] def shutdownCassandra(): Unit = {
com.websudos.phantom.Manager.shutdown()
database.session.close()
database.session.getCluster.close()
}
}
To understand what DatabaseProvider is, have look here.
Update
As of phantom 1.15.0, there is a shutdown method available by default on any Database object.

Related Links

Phantom's generated `store` method throws a ClassCastException at runtime
Connecting to Cassandra on startup, and monitoring session health
How do I query an optional column with a secondary index using phantom?
How to clean up RootConnector in phantom-dsl?
Phantom Cassandra batch insert

Categories

HOME
assembly
delphi-7
fuelux
webdriver
owl-carousel
appcelerator
javacc
settings
jquery-ui
python-multithreading
boto3
special-characters
pega
emoji
3nf
capistrano3
intershop
easyphp
foreign-keys
selinux
simpleitk
php-mysqlidb
displaytag
google-api-client
nstimer
angular-translate
soot
subclass
cppreference
corenlp-server
panoramas
postback
glib
git-squash
sammy.js
dynamic-jasper
sharding
batching
protege4
playframework-2.1
zoomify
health-monitoring
visa
movilizer
install.packages
print-css
vaadin-elements
fwrite
xbmc
openal
dtsearch
arq
reindex
yii2-user
subnet
rxtx
rsa-archer-grc
donations
slackware
builtins
reporting-services-2012
actor-platform
neon
avspeechsynthesizer
respondcms
angular-ui-typeahead
nss
tracker-enabled-dbcontext
directdraw
tfs-workitem
vigenere
sapscript
sony-lifelog-api
ocra
xmltype
gamekit
ejb-2.x
structuremap3
webfinger
unix-socket
reflector
fpdi
maven-scm
cfcache
qscrollarea
syndicationfeed
windows-embedded-standard
jammer
nebula
css-reset
windows-98
appjs
multiplexing
entity-attribute-value
listactivity
google-ajax-api
xui
nhprof
commerceserver2007
timertask
ie-compatibility-mode
xslcompiledtransform

Resources

Encrypt Message