EclipseLink 1.0_1.0M2 API Reference - Incubation

org.eclipse.persistence.sessions.remote
Class AbstractClusteringService

java.lang.Object
  extended by java.lang.Thread
      extended by org.eclipse.persistence.sessions.remote.AbstractClusteringService
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
AbstractJNDIClusteringService, RMIClusteringService

Deprecated. since OracleAS TopLink 10g (10.1.3). This class is replaced by TransportManager

public abstract class AbstractClusteringService
extends java.lang.Thread

Purpose:To Provide a framework for offering customers the ability to automatically connect multiple sessions for synchrnization.

Descripton:This thread object will place a remote dispatcher in a globally available space. it will also monitor the specified multicast socket to allow other sessions to connect.

See Also:
CacheSynchronizationManager
Author:
Gordon Yorke

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
protected  int announcementDelay
          Deprecated. Number of milliseconds to delay between the time that the RemoteService is made available and this session announces its existence.
protected  java.lang.String applicationName
          Deprecated.  
protected  java.net.MulticastSocket communicationSocket
          Deprecated. This is the multiclass socket that will be used for communication
protected static java.lang.String DEFAULT_MULTICAST_GROUP
          Deprecated.  
protected static int DEFAULT_MULTICAST_PORT
          Deprecated.  
protected static int DEFAULT_RECV_BUFFER_SIZE
          Deprecated.  
protected  java.lang.Object dispatcher
          Deprecated. This is the instantiated remote object that will be placed in the JNDI service and provides synchronization services
protected  java.lang.String localHostURL
          Deprecated. The URL of the JNDI host where the Dispatcher will be placed
protected  java.lang.String multicastGroupAddress
          Deprecated. Defines the IP address of the multicast group
protected  int multicastPort
          Deprecated. Defines what port the multicast socket will be monitoring on
protected  DistributedSessionReconnectPolicy reconnectionPolicy
          Deprecated. This method stores the reconnect policy for reconnecting to remote Sessions when connections are dropped.
protected  Session session
          Deprecated. This is the session that will be synchronized to
protected  java.lang.String sessionId
          Deprecated. Stores the unique ID for this sessio
protected  boolean stopListening
          Deprecated. controlls the listening thread
protected  int timeToLive
          Deprecated. Number of hops in the life of the datapacket Default is 2, a hub and an interface card to prevent the datapackets from leaving the local network
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
AbstractClusteringService(Session session)
          Deprecated. PUBLIC: Creates an AbstractClusteringService
AbstractClusteringService(java.lang.String multicastAddress, int multicastPort, Session session)
          Deprecated. ADVANCED: Creates an AbstractClusteringService
 
Method Summary
 void announceSession(java.lang.String sessionIdentifier)
          Deprecated. INTERNAL: Send out an announcement that we are here
 java.lang.String buildSessionId()
          Deprecated. INTERNAL: This method will generate a unique key for identifying this Session from all other sessions on the network
 void connectBackToRemote(RemoteConnection connection)
          Deprecated. INTERNAL: THis method is called by the cache synchronization manager when this server should connect back ('handshake') to the server from which this remote connection came.
abstract  RemoteConnection createRemoteConnection(java.lang.String sessionId, java.lang.String jndiHostURL)
          Deprecated. ADVANCED: This method should return a remote connection of the appropraite type for use in the synchronizatio
abstract  void deregisterDispatcher()
          Deprecated. ADVANCED: This method will deregister the dispatcher for this session from JNDI on the specified host.
 int getAnnouncementDelay()
          Deprecated. PUBLIC: Returns the amount of time in milliseconds that the service will wait between the time that the Remote Service is made available and this session's existences is announced.
 java.lang.String getApplicationName()
          Deprecated. PUBLIC: Use this method to get the application name
abstract  java.net.MulticastSocket getCommunicationSocket()
          Deprecated. ADVANCED: Returns the socket that will be used for the multicast communication.
abstract  java.lang.Object getDispatcher()
          Deprecated. This is the object that will be placed in JNDI to provide remote synchronization services
 java.lang.String getLocalHostURL()
          Deprecated. This method will get the Host address of the JNDI service
abstract  RemoteConnection getLocalRemoteConnection()
          Deprecated. ADVANCED: This method should return a Remote Connection of the appropriate type that references the Remote dispatcher for this Session
 java.lang.String getMulticastGroupAddress()
          Deprecated. This method will return the Host adddress of the Multicast Group.
 int getMulticastPort()
          Deprecated. PUBLIC: Return the port that the Service will be using for the multicast socket
 DistributedSessionReconnectPolicy getReconnectPolicy()
          Deprecated. INTERNAL: Returns the reconnectionPolicy for this Service.
 Session getSession()
          Deprecated. INTERNAL:
 java.lang.String getSessionId()
          Deprecated. ADVANCED: Get the Unique identifier for the session.
 int getTimeToLive()
          Deprecated. PUBLIC: Returns the number of hops the data packet will take before expiring
 void initialize()
          Deprecated. INTERNAL: Initializes the clustering service and starts again
 void listen()
          Deprecated. INTERNAL: This method provides the functionality of listening for synchronization requests from other servers
 void receivedAnnouncement(java.lang.String sessionId, java.lang.String jndiHostURL, java.lang.String applicationName)
          Deprecated. INTERNAL: Use this method to notify the SynchronizationManager that we have to connect to a new Session that has just joined the network
 RemoteConnection reconnect(RemoteConnection oldConnection)
          Deprecated. INTERNAL: This method will be called by the CacheSynchronizationManager when a connection fails.
abstract  void registerDispatcher()
          Deprecated. ADVANCED: This method will register the dispatcher for this session in JNDI on the specified host.
 void run()
          Deprecated. INTERNAL: This is the main execution method of this class.
 void setAnnouncementDelay(int millisecondsToDelay)
          Deprecated. PUBLIC: Sets the amount of time in millis that the service should wait between the time that the Remote Service is made available and this session's existences is announced.
 void setApplicationName(java.lang.String name)
          Deprecated. PUBLIC: Use this method to set the application name if required when deploying within an application server
 void setDispatcher(java.lang.Object dispatcher)
          Deprecated. This is the object that will be placed in JNDI to provide remote synchronization services
 void setLocalHostURL(java.lang.String url)
          Deprecated. PUBLIC: Set the host address of the naming service url.
 void setMulticastGroupAddress(java.lang.String multicastGroupAddress)
          Deprecated. This method will set the Host adddress of the Multicast Group.
 void setMulticastPort(int port)
          Deprecated. PUBLIC: Use this method to set the Multicast Port that this system will use to communicate
 void setReconnectPolicy(DistributedSessionReconnectPolicy reconnectPolicy)
          Deprecated. INTERNAL: Returns the reconnectionPolicy for this Service.
 void setSession(Session session)
          Deprecated. INTERNAL:
 void setSessionId(java.lang.String sessionId)
          Deprecated. ADVANCED: Set the Unique identifier for the session.
 void setTimeToLive(int timeToLive)
          Deprecated. PUBLIC: Use this method to set the number of hops that the Data packet will make until expiring.
 void stopListening()
          Deprecated. ADVANCED: Uses to stop the Listener thread for a dropped session
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

stopListening

protected boolean stopListening
Deprecated. 
controlls the listening thread


multicastPort

protected int multicastPort
Deprecated. 
Defines what port the multicast socket will be monitoring on


timeToLive

protected int timeToLive
Deprecated. 
Number of hops in the life of the datapacket Default is 2, a hub and an interface card to prevent the datapackets from leaving the local network


announcementDelay

protected int announcementDelay
Deprecated. 
Number of milliseconds to delay between the time that the RemoteService is made available and this session announces its existence.


communicationSocket

protected java.net.MulticastSocket communicationSocket
Deprecated. 
This is the multiclass socket that will be used for communication


multicastGroupAddress

protected java.lang.String multicastGroupAddress
Deprecated. 
Defines the IP address of the multicast group


dispatcher

protected java.lang.Object dispatcher
Deprecated. 
This is the instantiated remote object that will be placed in the JNDI service and provides synchronization services


localHostURL

protected java.lang.String localHostURL
Deprecated. 
The URL of the JNDI host where the Dispatcher will be placed


session

protected Session session
Deprecated. 
This is the session that will be synchronized to


DEFAULT_RECV_BUFFER_SIZE

protected static int DEFAULT_RECV_BUFFER_SIZE
Deprecated. 

DEFAULT_MULTICAST_GROUP

protected static java.lang.String DEFAULT_MULTICAST_GROUP
Deprecated. 

DEFAULT_MULTICAST_PORT

protected static int DEFAULT_MULTICAST_PORT
Deprecated. 

sessionId

protected java.lang.String sessionId
Deprecated. 
Stores the unique ID for this sessio


reconnectionPolicy

protected DistributedSessionReconnectPolicy reconnectionPolicy
Deprecated. 
This method stores the reconnect policy for reconnecting to remote Sessions when connections are dropped. Currently only technically useful with JMS connections


applicationName

protected java.lang.String applicationName
Deprecated. 
Constructor Detail

AbstractClusteringService

public AbstractClusteringService(Session session)
Deprecated. 
PUBLIC: Creates an AbstractClusteringService

SBGen:
Constructor

AbstractClusteringService

public AbstractClusteringService(java.lang.String multicastAddress,
                                 int multicastPort,
                                 Session session)
Deprecated. 
ADVANCED: Creates an AbstractClusteringService

Parameters:
multicastAddress - The address of the multicast group
multicastPort - The port the multicast group is listening on
SBGen:
Constructor
Method Detail

initialize

public void initialize()
Deprecated. 
INTERNAL: Initializes the clustering service and starts again


run

public void run()
Deprecated. 
INTERNAL: This is the main execution method of this class. It will create a socket to listen to and register the dispatcher for this class in JNDI

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

registerDispatcher

public abstract void registerDispatcher()
Deprecated. 
ADVANCED: This method will register the dispatcher for this session in JNDI on the specified host. It must register the dispatcher under the SessionId

Parameters:
jndiHostURL - This is the URL that will be used to register the synchronization service

deregisterDispatcher

public abstract void deregisterDispatcher()
Deprecated. 
ADVANCED: This method will deregister the dispatcher for this session from JNDI on the specified host. It must deregister the dispatcher under the SessionId


createRemoteConnection

public abstract RemoteConnection createRemoteConnection(java.lang.String sessionId,
                                                        java.lang.String jndiHostURL)
Deprecated. 
ADVANCED: This method should return a remote connection of the appropraite type for use in the synchronizatio


setMulticastPort

public void setMulticastPort(int port)
Deprecated. 
PUBLIC: Use this method to set the Multicast Port that this system will use to communicate

Parameters:
port - This is the port that the multicast socket will listen on
SBGen:
Method set port

getMulticastPort

public int getMulticastPort()
Deprecated. 
PUBLIC: Return the port that the Service will be using for the multicast socket

Returns:
the port that the multicast socket will listen on
SBGen:
Method get port

getReconnectPolicy

public DistributedSessionReconnectPolicy getReconnectPolicy()
Deprecated. 
INTERNAL: Returns the reconnectionPolicy for this Service. Only currently useful in the JMS Service


setReconnectPolicy

public void setReconnectPolicy(DistributedSessionReconnectPolicy reconnectPolicy)
Deprecated. 
INTERNAL: Returns the reconnectionPolicy for this Service. Only currently useful in the JMS Service


setLocalHostURL

public void setLocalHostURL(java.lang.String url)
Deprecated. 
PUBLIC: Set the host address of the naming service url.

Parameters:
url - jndi host url
SBGen:
Method set jndi host url

setTimeToLive

public void setTimeToLive(int timeToLive)
Deprecated. 
PUBLIC: Use this method to set the number of hops that the Data packet will make until expiring.

Parameters:
timeToLive -
SBGen:
Method set timeToLive

getTimeToLive

public int getTimeToLive()
Deprecated. 
PUBLIC: Returns the number of hops the data packet will take before expiring

SBGen:
Method get timeToLive

getCommunicationSocket

public abstract java.net.MulticastSocket getCommunicationSocket()
Deprecated. 
ADVANCED: Returns the socket that will be used for the multicast communication. By default this will be java.net.MulticastSocket

SBGen:
Method get communicationSocket

getMulticastGroupAddress

public java.lang.String getMulticastGroupAddress()
Deprecated. 
This method will return the Host adddress of the Multicast Group. Used to determine what group of servers will connect to each other for synchronization

SBGen:
Method get multicastHostAddress

setMulticastGroupAddress

public void setMulticastGroupAddress(java.lang.String multicastGroupAddress)
Deprecated. 
This method will set the Host adddress of the Multicast Group. Used to determine what group of servers will connect to each other for synchronization

Parameters:
multicastHostAddress -
SBGen:
Method set multicastHostAddress

getDispatcher

public abstract java.lang.Object getDispatcher()
                                        throws java.rmi.RemoteException
Deprecated. 
This is the object that will be placed in JNDI to provide remote synchronization services

Throws:
java.rmi.RemoteException
SBGen:
Method get dispatcher

getLocalRemoteConnection

public abstract RemoteConnection getLocalRemoteConnection()
Deprecated. 
ADVANCED: This method should return a Remote Connection of the appropriate type that references the Remote dispatcher for this Session


getSession

public Session getSession()
Deprecated. 
INTERNAL:


setDispatcher

public void setDispatcher(java.lang.Object dispatcher)
Deprecated. 
This is the object that will be placed in JNDI to provide remote synchronization services

Parameters:
dispatcher -
SBGen:
Method set dispatcher

getLocalHostURL

public java.lang.String getLocalHostURL()
Deprecated. 
This method will get the Host address of the JNDI service

Parameters:
jndiHostURL -
SBGen:
Method set jndiHostURL

connectBackToRemote

public void connectBackToRemote(RemoteConnection connection)
                         throws java.lang.Exception
Deprecated. 
INTERNAL: THis method is called by the cache synchronization manager when this server should connect back ('handshake') to the server from which this remote connection came.

Throws:
java.lang.Exception

buildSessionId

public java.lang.String buildSessionId()
Deprecated. 
INTERNAL: This method will generate a unique key for identifying this Session from all other sessions on the network


announceSession

public void announceSession(java.lang.String sessionIdentifier)
Deprecated. 
INTERNAL: Send out an announcement that we are here


listen

public void listen()
Deprecated. 
INTERNAL: This method provides the functionality of listening for synchronization requests from other servers

Parameters:
listenSocket - The Multicast socket to listen on

receivedAnnouncement

public void receivedAnnouncement(java.lang.String sessionId,
                                 java.lang.String jndiHostURL,
                                 java.lang.String applicationName)
Deprecated. 
INTERNAL: Use this method to notify the SynchronizationManager that we have to connect to a new Session that has just joined the network


reconnect

public RemoteConnection reconnect(RemoteConnection oldConnection)
Deprecated. 
INTERNAL: This method will be called by the CacheSynchronizationManager when a connection fails. it will redirect the call to the included reconnection policy


setSessionId

public void setSessionId(java.lang.String sessionId)
Deprecated. 
ADVANCED: Set the Unique identifier for the session. This attribute will be used to store the service in JNDI.

Parameters:
sessionId -
SBGen:
Method set sessionId

getSessionId

public java.lang.String getSessionId()
Deprecated. 
ADVANCED: Get the Unique identifier for the session. This attribute will be used to store the service in JNDI.

SBGen:
Method get sessionId

stopListening

public void stopListening()
Deprecated. 
ADVANCED: Uses to stop the Listener thread for a dropped session


setSession

public void setSession(Session session)
Deprecated. 
INTERNAL:


setAnnouncementDelay

public void setAnnouncementDelay(int millisecondsToDelay)
Deprecated. 
PUBLIC: Sets the amount of time in millis that the service should wait between the time that the Remote Service is made available and this session's existences is announced.


setApplicationName

public void setApplicationName(java.lang.String name)
Deprecated. 
PUBLIC: Use this method to set the application name if required when deploying within an application server


getAnnouncementDelay

public int getAnnouncementDelay()
Deprecated. 
PUBLIC: Returns the amount of time in milliseconds that the service will wait between the time that the Remote Service is made available and this session's existences is announced.


getApplicationName

public java.lang.String getApplicationName()
Deprecated. 
PUBLIC: Use this method to get the application name


EclipseLink 1.0_1.0M2 API Reference - Incubation