Apache Tomcat 6.0.53

org.apache.jk.common
Class Shm

java.lang.Object
  extended by org.apache.jk.core.JkHandler
      extended by org.apache.jk.common.JniHandler
          extended by org.apache.jk.common.Shm
All Implemented Interfaces:
java.util.EventListener, javax.management.MBeanRegistration, javax.management.NotificationListener
Direct Known Subclasses:
Shm14

public class Shm
extends JniHandler

Handle the shared memory objects.

Author:
Costin Manolache

Field Summary
 
Fields inherited from class org.apache.jk.common.JniHandler
apr, JK_HANDLE_JNI_DISPATCH, JK_HANDLE_SHM_DISPATCH, jkHome, MB_NOTE, MSG_NOTE, nativeJkHandlerP
 
Fields inherited from class org.apache.jk.core.JkHandler
domain, ERROR, HANDLE_FLUSH, HANDLE_RECEIVE_PACKET, HANDLE_SEND_PACKET, HANDLE_THREAD_END, id, LAST, mserver, name, next, nextName, OK, oname, properties, wEnv
 
Constructor Summary
Shm()
           
 
Method Summary
 void destroy()
          Clean up and stop the handler
 void dumpScoreboard(java.lang.String fname)
           
 void execute()
           
 void init()
          You must call initNative() inside the component init()
 void initCli()
          Local initialization - for standalone use
 int invoke(Msg msg, MsgContext ep)
          Base implementation for invoke.
static void main(java.lang.String[] args)
           
 void registerTomcat(java.lang.String host, int port, java.lang.String unixDomain)
          Register a tomcat instance XXX make it more flexible
 void resetScoreboard()
           
 void setDump(java.lang.String dumpFile)
          Copy the scoreboard in a file for debugging Will also log a lot of information about what's in the scoreboard.
 void setFile(java.lang.String f)
          Scoreboard location
 void setGroup(java.lang.String grp)
          Mark this instance as belonging to a group
 void setHelp(boolean b)
           
 void setHost(java.lang.String host)
          Ajp13 host
 void setPort(int port)
          Ajp13 port
 void setReset(boolean b)
          Set this to get the scoreboard reset.
 void setSize(int size)
          Size.
 void setUnixSocket(java.lang.String unixSocket)
          Unix socket where tomcat is listening.
 void setUnregister(boolean unregister)
          Set this option to mark the tomcat instance as 'down', so apache will no longer forward messages to it.
 void unRegisterTomcat(java.lang.String host, int port)
           
 
Methods inherited from class org.apache.jk.common.JniHandler
appendString, createMsgContext, destroyJkComponent, getJkHome, initJkComponent, initNative, nativeDispatch, pause, recycleNative, resume, setJkHome, setNativeAttribute, setNativeEndpoint
 
Methods inherited from class org.apache.jk.core.JkHandler
addHandlerCallback, createMsgContext, getDomain, getId, getName, getNext, getObjectName, getProperty, handleNotification, postDeregister, postRegister, preDeregister, preRegister, setId, setName, setNext, setNext, setProperty, setWorkerEnv
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Shm

public Shm()
Method Detail

setFile

public void setFile(java.lang.String f)
Scoreboard location


setDump

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


setSize

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


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".


setHost

public void setHost(java.lang.String host)
Ajp13 host


setGroup

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


setPort

public void setPort(int port)
Ajp13 port


setUnixSocket

public void setUnixSocket(java.lang.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.


init

public void init()
          throws java.io.IOException
Description copied from class: JniHandler
You must call initNative() inside the component init()

Overrides:
init in class JniHandler
Throws:
java.io.IOException

resetScoreboard

public void resetScoreboard()
                     throws java.io.IOException
Throws:
java.io.IOException

dumpScoreboard

public void dumpScoreboard(java.lang.String fname)
                    throws java.io.IOException
Throws:
java.io.IOException

registerTomcat

public void registerTomcat(java.lang.String host,
                           int port,
                           java.lang.String unixDomain)
                    throws java.io.IOException
Register a tomcat instance XXX make it more flexible

Throws:
java.io.IOException

unRegisterTomcat

public void unRegisterTomcat(java.lang.String host,
                             int port)
                      throws java.io.IOException
Throws:
java.io.IOException

destroy

public void destroy()
             throws java.io.IOException
Description copied from class: JkHandler
Clean up and stop the handler

Overrides:
destroy in class JkHandler
Throws:
java.io.IOException

invoke

public int invoke(Msg msg,
                  MsgContext ep)
           throws java.io.IOException
Description copied from class: JniHandler
Base implementation for invoke. Dispatch the action to the native code, where invoke() is called on the wrapped jk_bean.

Overrides:
invoke in class JniHandler
Throws:
java.io.IOException

initCli

public void initCli()
             throws java.io.IOException
Local initialization - for standalone use

Throws:
java.io.IOException

execute

public void execute()

setHelp

public void setHelp(boolean b)

main

public static void main(java.lang.String[] args)

Apache Tomcat 6.0.53

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.