|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.dyade.aaa.jndi2.server.RequestManager
fr.dyade.aaa.jndi2.distributed.ReplicationManager
public class ReplicationManager
Nested Class Summary | |
---|---|
(package private) static class |
ReplicationManager.RequestContextList
|
Field Summary | |
---|---|
static java.lang.String |
INIT_REQUEST_TABLE
|
private java.util.Hashtable |
initRequestContextLists
Table that contains the requests (read or write) waiting for the initialization of the context. |
private boolean |
looseCoupling
|
private AgentId |
rootOwnerId
Identifier of the server that owns the root naming context. |
private static long |
serialVersionUID
define serialVersionUID for interoperability |
static java.lang.String |
SERVER_LIST
|
private short[] |
serverIds
List of the initially known servers. |
private java.util.Vector |
servers
List of the JNDI servers discovered by this server. |
static java.lang.String |
SYNC_REQUEST_TABLE
|
private java.util.Hashtable |
syncRequestContextLists
Table that contains the requests (read or write) waiting for the synchronization of the context. |
static java.lang.String |
WRITE_REQUEST_TABLE
|
private java.util.Hashtable |
writeRequestContextLists
Table that contains the write requests forwarded to the owner. |
Constructor Summary | |
---|---|
ReplicationManager(short[] serverIds)
|
Method Summary | |
---|---|
void |
agentInitialize(boolean firstTime)
|
protected void |
changeOwner(ChangeOwnerRequest request)
|
private void |
createRemoteSubcontext(CreateRemoteSubcontextRequest request)
|
protected void |
createSubcontext(CreateSubcontextRequest request)
|
(package private) void |
doReact(AgentId from,
InitJndiServerNot not)
|
(package private) void |
doReact(AgentId from,
JndiReplyNot not)
|
(package private) void |
doReact(AgentId from,
JndiScriptReplyNot not)
|
(package private) void |
doReact(AgentId from,
JndiUpdateNot not)
Reacts to an update notification from an other JNDI server. |
(package private) void |
doReact(AgentId from,
SyncReplyNot not)
|
(package private) void |
doReact(AgentId from,
SyncRequestNot not)
|
protected AgentId |
getRootOwnerId()
Overrides the JndiServer behavior. |
protected JndiReply |
invokeOwner(AgentId owner,
RequestContext reqCtx)
Overrides the JndiServer behavior. |
protected JndiReply |
onMissingContext(MissingContextException mce,
RequestContext reqCtx)
In a centralized JNDI server a missing context shows that the naming data are unconsistent. |
protected JndiReply |
onMissingRecord(MissingRecordException mre,
RequestContext reqCtx)
In a centralized JNDI server a missing record shows that the name asked by the JNDI request doesn't exist. |
private void |
onReply(AgentId from,
JndiReply reply)
Reacts to the reply of a JNDI server that has been called as it is the owner of a naming context. |
void |
onUpdate(UpdateEvent event)
|
private void |
onUpdateEvent(AgentId from,
BindEvent evt)
|
private void |
onUpdateEvent(AgentId from,
ChangeOwnerEvent evt)
|
private void |
onUpdateEvent(AgentId from,
CreateSubcontextEvent evt)
|
private void |
onUpdateEvent(AgentId from,
DestroySubcontextEvent evt)
|
private void |
onUpdateEvent(AgentId from,
RebindEvent evt)
|
private void |
onUpdateEvent(AgentId from,
UnbindEvent evt)
|
private void |
saveInitRequestTable()
|
private void |
saveServers()
|
private void |
saveSyncRequestTable()
|
private void |
saveWriteRequestTable()
|
private void |
synchronizeRequest(AgentId owner,
RequestContext reqCtx)
|
Methods inherited from class fr.dyade.aaa.jndi2.server.RequestManager |
---|
agentFinalize, getId, getServerImpl, invoke, invokeAdminRequest, invokeReadRequest, invokeWriteRequest, readBag, sendTo, setContainer, writeBag |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
public static final java.lang.String INIT_REQUEST_TABLE
public static final java.lang.String SYNC_REQUEST_TABLE
public static final java.lang.String WRITE_REQUEST_TABLE
public static final java.lang.String SERVER_LIST
private AgentId rootOwnerId
private short[] serverIds
private transient java.util.Vector servers
private transient java.util.Hashtable writeRequestContextLists
private transient java.util.Hashtable initRequestContextLists
private transient java.util.Hashtable syncRequestContextLists
private boolean looseCoupling
Constructor Detail |
---|
public ReplicationManager(short[] serverIds)
Method Detail |
---|
protected AgentId getRootOwnerId()
JndiServer
behavior.
getRootOwnerId
in class RequestManager
public void agentInitialize(boolean firstTime) throws java.lang.Exception
agentInitialize
in interface LifeCycleListener
agentInitialize
in class RequestManager
java.lang.Exception
void doReact(AgentId from, JndiUpdateNot not) throws java.lang.Exception
java.lang.Exception
private void onUpdateEvent(AgentId from, BindEvent evt) throws javax.naming.NamingException
javax.naming.NamingException
private void onUpdateEvent(AgentId from, RebindEvent evt) throws javax.naming.NamingException
javax.naming.NamingException
private void onUpdateEvent(AgentId from, UnbindEvent evt) throws javax.naming.NamingException
javax.naming.NamingException
private void onUpdateEvent(AgentId from, CreateSubcontextEvent evt) throws javax.naming.NamingException
javax.naming.NamingException
private void onUpdateEvent(AgentId from, DestroySubcontextEvent evt) throws javax.naming.NamingException
javax.naming.NamingException
private void onUpdateEvent(AgentId from, ChangeOwnerEvent evt) throws javax.naming.NamingException
javax.naming.NamingException
protected JndiReply invokeOwner(AgentId owner, RequestContext reqCtx)
JndiServer
behavior.
Send a JNDI request to the owner (JNDI server).
Waits for the asynchronous reply.
invokeOwner
in class RequestManager
owner
- the identifier of the naming server that
owns the naming context on which the
JNDI operation is called.reqCtx
- the JNDI request context that raised
the exception.
null
if the owner invocation
is asynchronous.void doReact(AgentId from, JndiScriptReplyNot not) throws java.lang.Exception
java.lang.Exception
void doReact(AgentId from, JndiReplyNot not) throws java.lang.Exception
java.lang.Exception
private void onReply(AgentId from, JndiReply reply) throws java.lang.Exception
java.lang.Exception
void doReact(AgentId from, InitJndiServerNot not) throws java.lang.Exception
java.lang.Exception
protected JndiReply onMissingContext(MissingContextException mce, RequestContext reqCtx)
RequestManager
onMissingContext
in class RequestManager
mce
- the missing context exceptionreqCtx
- the JNDI request context that raised
the exception.
null
if the resolution is asynchronous.protected JndiReply onMissingRecord(MissingRecordException mre, RequestContext reqCtx)
RequestManager
NameNotFoundException
is directly forwarded to
the client.
A subclass may override this behavior in order
to try to resolve the missing record.
onMissingRecord
in class RequestManager
mre
- the missing context exceptionreqCtx
- the JNDI request context that raised
the exception.
null
if the resolution is asynchronous.private void synchronizeRequest(AgentId owner, RequestContext reqCtx)
void doReact(AgentId from, SyncRequestNot not)
void doReact(AgentId from, SyncReplyNot not)
public void onUpdate(UpdateEvent event)
onUpdate
in interface UpdateListener
protected void createSubcontext(CreateSubcontextRequest request) throws javax.naming.NamingException
createSubcontext
in class RequestManager
javax.naming.NamingException
private void createRemoteSubcontext(CreateRemoteSubcontextRequest request) throws javax.naming.NamingException
javax.naming.NamingException
protected void changeOwner(ChangeOwnerRequest request) throws javax.naming.NamingException
changeOwner
in class RequestManager
javax.naming.NamingException
private void saveInitRequestTable()
private void saveWriteRequestTable()
private void saveSyncRequestTable()
private void saveServers()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |