org.apache.jk.common

Class Shm

public class Shm extends JniHandler

Handle the shared memory objects.

Author: Costin Manolache

Constructor Summary
Shm()
Method Summary
voiddestroy()
voiddumpScoreboard(String fname)
voidexecute()
voidinit()
voidinitCli()
Local initialization - for standalone use
intinvoke(Msg msg, MsgContext ep)
static voidmain(String[] args)
voidregisterTomcat(String host, int port, String unixDomain)
Register a tomcat instance XXX make it more flexible
voidresetScoreboard()
voidsetDump(String dumpFile)
Copy the scoreboard in a file for debugging Will also log a lot of information about what's in the scoreboard.
voidsetFile(String f)
Scoreboard location
voidsetGroup(String grp)
Mark this instance as belonging to a group
voidsetHelp(boolean b)
voidsetHost(String host)
Ajp13 host
voidsetPort(int port)
Ajp13 port
voidsetReset(boolean b)
Set this to get the scoreboard reset.
voidsetSize(int size)
Size.
voidsetUnixSocket(String unixSocket)
Unix socket where tomcat is listening.
voidsetUnregister(boolean unregister)
Set this option to mark the tomcat instance as 'down', so apache will no longer forward messages to it.
voidunRegisterTomcat(String host, int port)

Constructor Detail

Shm

public Shm()

Method Detail

destroy

public void destroy()

dumpScoreboard

public void dumpScoreboard(String fname)

execute

public void execute()

init

public void init()

initCli

public void initCli()
Local initialization - for standalone use

invoke

public int invoke(Msg msg, MsgContext ep)

main

public static void main(String[] args)

registerTomcat

public void registerTomcat(String host, int port, String unixDomain)
Register a tomcat instance XXX make it more flexible

resetScoreboard

public void resetScoreboard()

setDump

public void setDump(String dumpFile)
Copy the scoreboard in a file for debugging Will also log a lot of information about what's in the scoreboard.

setFile

public void setFile(String f)
Scoreboard location

setGroup

public void setGroup(String grp)
Mark this instance as belonging to a group

setHelp

public void setHelp(boolean b)

setHost

public void setHost(String host)
Ajp13 host

setPort

public void setPort(int port)
Ajp13 port

setReset

public void setReset(boolean b)
Set this to get the scoreboard reset. The shm segment will be destroyed and a new one created, with the provided size. Requires "file" and "size".

setSize

public void setSize(int size)
Size. Used only if the scoreboard is to be created.

setUnixSocket

public void setUnixSocket(String unixSocket)
Unix socket where tomcat is listening. Use it only if tomcat is on the same host, of course

setUnregister

public void setUnregister(boolean unregister)
Set this option to mark the tomcat instance as 'down', so apache will no longer forward messages to it. Note that requests with a session will still try this host first. This can be used to implement gracefull shutdown. Host and port are still required, since they are used to identify tomcat.

unRegisterTomcat

public void unRegisterTomcat(String host, int port)
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.