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
go
dns
apache-jena
components
seo
yandex
vxml
nested-if
jtextpane
text-mining
watson-conversation
android-securityexception
siddhi
line
do-while
azure-powershell
searchview
dimensional-modeling
dreamweaver
template-engine
smartclient
asp.net-core-webapi
database-connection
windows-xp
google-maps-autocomplete
visual-glitch
ksh
gulp-watch
r-mice
ios10.2
highstock
ms-access-2003
firebase-analytics
testbed
kodi
dsx-desktop
password-protection
verifiable-c
css-position
bindingnavigator
vaadin-elements
openrasta
reportservice2010
twilio-click-to-call
convex-optimization
reindex
yii2-user
headless
filehandle
chromium-os
centrifuge
xdoclet
clipboard.js
freepbx
mediametadataretriever
sklearn-pandas
vhosts
dynatree
computer-architecture
jdk1.7
liquid-layout
google-refine
java-security
browserify-shim
ghcjs
iso-prolog
kissfft
lnk
ray
koala
mt4j
scrypt
tlf
cnf
cmmi
time.h
traceability
windows-98
bjyauthorize
robotlegs
tree-balancing
monotouch.dialog
qtconcurrent
boost-msm
subgraph
jsr286
isa-swizzling
cgimage
role
catransform3d
google-floodlight
nhprof
timertask
cfwindow
skype4java
product-management
contentpresenter

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile