日期:2014-05-16 浏览次数:20433 次
#author:Alex case $1 in "start" ) echo "startng ttservice......" ttserver -port 11211 -dmn -pid /opt/ttserver/pid -log /opt/ttserver/log -ulog /opt/ttserver/ul og -ulim 128m -sid 60 -mhost 192.168.0.3 -mport 11212 -rcc -dmn -rts /opt/ttserver/rts /opt/ttserver/ casket.tch#bnum=1000000 echo "ttserver started.";; "stop" ) echo "stoping ttservice......" killall -9 ttserver rm -f /opt/ttserver/pid #cat /opt/ttserver/pid | kill -9 echo "ttservice stoped.";; "restart") echo "shutdown ttserver...." killall -9 ttserver rm -f /opt/ttserver/pid sleep 5 echo "restart ttserver..." ttserver -port 11211 -dmn -pid /opt/ttserver/pid -log /opt/ttserver/log -ulog /opt/ttserver/ul og -ulim 128m -sid 60 -mhost 192.168.0.3 -mport 11212 -rcc -dmn -rts /opt/ttserver/rts /opt/ttser ver/casket.tch#bnum=1000000 echo "ttserver started.";; "clean") echo "clean db" rm -f /opt/ttserver/casket.tch;; *) echo "unknown command.[usage:start|stop|restart]";; esac
#author Alex case $1 in "start" ) echo "startng ttservice......" ttserver -port 11212 -dmn -pid /opt/ttserver/pid -log /opt/ttserver/log -ulog /opt/ttserver/ulog -ulim 128m -sid 117 -mhost 192.168.0.2 -mport 11211 -rcc -dmn -rts /opt/ttserver/rts /opt/ttserver/casket.tch#bnum=1000000 echo "ttserver started.";; "stop" ) echo "stoping ttservice......" killall -9 ttserver rm -f /opt/ttserver/pid echo "ttservice stoped.";; "restart") echo "shutdown ttserver...." killall -9 ttserver rm -f /opt/ttserver/pid sleep 5 echo "restart ttserver..." ttserver -port 11212 -dmn -pid /opt/ttserver/pid -log /opt/ttserver/log -ulog /opt/ttserver/ulog -ulim 128m -sid 117 -mhost 192.168.0.2 -mport 11211 -rcc -dmn -rts /opt/ttserver/rts /opt/ttserver/casket.tch#bnum=1000000 echo "ttserver started.";; "clean") echo "clean db" rm -f /opt/ttserver/casket.tch;; *) echo "unknown command.[usage:start|stop|restart]";; esac
import tokyotyrant.MRDB; import tokyotyrant.networking.NodeAddress; import com.xx.xxxx.service.Cache; public class TTCache implements Cache { private MRDB mrdb; private NodeAddress[] addresses; public RemoteTokyocanbinetCache( NodeAddress[] addresses) {