Class SharedMemorySocket
- java.lang.Object
-
- java.net.Socket
-
- org.mariadb.jdbc.internal.io.socket.SharedMemorySocket
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class SharedMemorySocket extends java.net.Socket
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceSharedMemorySocket.Advapi32static interfaceSharedMemorySocket.Kernel32(package private) classSharedMemorySocket.SharedMemoryInputStream(package private) classSharedMemorySocket.SharedMemoryOutputStream
-
Field Summary
Fields Modifier and Type Field Description private static intBUFFERLENprivate intbytesLeftprivate com.sun.jna.platform.win32.WinNT.HANDLEclientReadprivate com.sun.jna.platform.win32.WinNT.HANDLEclientWroteprivate com.sun.jna.platform.win32.WinNT.HANDLEconnectionClosedprivate static java.lang.StringEVERYONE_SYNCHRONIZE_SDDLprivate java.io.InputStreamisprivate java.lang.StringmemoryNameprivate java.io.OutputStreamosprivate intpositionprivate com.sun.jna.platform.win32.WinNT.HANDLEserverReadprivate com.sun.jna.platform.win32.WinNT.HANDLEserverWroteprivate inttimeoutprivate com.sun.jna.Pointerviewprivate static java.util.Map<java.lang.String,java.lang.Object>WIN32API_OPTIONS
-
Constructor Summary
Constructors Constructor Description SharedMemorySocket(java.lang.String name)Create ShareMemorySocket.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidconnect(java.net.SocketAddress endpoint)voidconnect(java.net.SocketAddress endpoint, int timeout)private intgetConnectNumber()java.io.InputStreamgetInputStream()java.io.OutputStreamgetOutputStream()private com.sun.jna.platform.win32.WinNT.HANDLElockMutex()private static com.sun.jna.PointermapMemory(java.lang.String mapName, int mode, int size)Map memoryprivate static com.sun.jna.platform.win32.WinNT.HANDLEopenEvent(java.lang.String name)voidsetKeepAlive(boolean b)voidsetReceiveBufferSize(int size)voidsetSendBufferSize(int size)voidsetSoLinger(boolean b, int i)voidsetSoTimeout(int t)voidsetTcpNoDelay(boolean b)voidshutdownInput()voidshutdownOutput()-
Methods inherited from class java.net.Socket
bind, getChannel, getInetAddress, getKeepAlive, getLocalAddress, getLocalPort, getLocalSocketAddress, getOOBInline, getOption, getPort, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown, sendUrgentData, setOOBInline, setOption, setPerformancePreferences, setReuseAddress, setSocketImplFactory, setTrafficClass, supportedOptions, toString
-
-
-
-
Field Detail
-
EVERYONE_SYNCHRONIZE_SDDL
private static final java.lang.String EVERYONE_SYNCHRONIZE_SDDL
- See Also:
- Constant Field Values
-
WIN32API_OPTIONS
private static final java.util.Map<java.lang.String,java.lang.Object> WIN32API_OPTIONS
-
BUFFERLEN
private static final int BUFFERLEN
- See Also:
- Constant Field Values
-
is
private java.io.InputStream is
-
os
private java.io.OutputStream os
-
memoryName
private java.lang.String memoryName
-
serverRead
private com.sun.jna.platform.win32.WinNT.HANDLE serverRead
-
serverWrote
private com.sun.jna.platform.win32.WinNT.HANDLE serverWrote
-
clientRead
private com.sun.jna.platform.win32.WinNT.HANDLE clientRead
-
clientWrote
private com.sun.jna.platform.win32.WinNT.HANDLE clientWrote
-
connectionClosed
private com.sun.jna.platform.win32.WinNT.HANDLE connectionClosed
-
view
private com.sun.jna.Pointer view
-
bytesLeft
private int bytesLeft
-
position
private int position
-
timeout
private int timeout
-
-
Method Detail
-
openEvent
private static com.sun.jna.platform.win32.WinNT.HANDLE openEvent(java.lang.String name)
-
mapMemory
private static com.sun.jna.Pointer mapMemory(java.lang.String mapName, int mode, int size)Map memory- Parameters:
mapName- map namemode- modesize- size- Returns:
- Pointer
-
connect
public void connect(java.net.SocketAddress endpoint) throws java.io.IOException- Overrides:
connectin classjava.net.Socket- Throws:
java.io.IOException
-
lockMutex
private com.sun.jna.platform.win32.WinNT.HANDLE lockMutex() throws java.io.IOException- Throws:
java.io.IOException
-
getConnectNumber
private int getConnectNumber() throws java.io.IOException- Throws:
java.io.IOException
-
connect
public void connect(java.net.SocketAddress endpoint, int timeout) throws java.io.IOException- Overrides:
connectin classjava.net.Socket- Throws:
java.io.IOException
-
getInputStream
public java.io.InputStream getInputStream()
- Overrides:
getInputStreamin classjava.net.Socket
-
getOutputStream
public java.io.OutputStream getOutputStream()
- Overrides:
getOutputStreamin classjava.net.Socket
-
setTcpNoDelay
public void setTcpNoDelay(boolean b)
- Overrides:
setTcpNoDelayin classjava.net.Socket
-
setKeepAlive
public void setKeepAlive(boolean b)
- Overrides:
setKeepAlivein classjava.net.Socket
-
setReceiveBufferSize
public void setReceiveBufferSize(int size)
- Overrides:
setReceiveBufferSizein classjava.net.Socket
-
setSendBufferSize
public void setSendBufferSize(int size)
- Overrides:
setSendBufferSizein classjava.net.Socket
-
setSoLinger
public void setSoLinger(boolean b, int i)- Overrides:
setSoLingerin classjava.net.Socket
-
setSoTimeout
public void setSoTimeout(int t)
- Overrides:
setSoTimeoutin classjava.net.Socket
-
shutdownInput
public void shutdownInput()
- Overrides:
shutdownInputin classjava.net.Socket
-
shutdownOutput
public void shutdownOutput()
- Overrides:
shutdownOutputin classjava.net.Socket
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.net.Socket
-
-