Class OMIChildServer

java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
com.sas.services.information.OMIServer
com.sas.services.information.OMIChildServer
All Implemented Interfaces:
com.sas.metadata.remote.MdConnectionListener, com.sas.metadata.remote.MdFactoryListener, com.sas.metadata.remote.MdObjectListener, com.sas.metadata.remote.MdStoreIDChangeListener, com.sas.metadata.remote.MdStoreListener, ChildServerInterface, MetadataServerInterface, ServerInterface, Serializable, Remote, EventListener

public class OMIChildServer extends OMIServer implements ChildServerInterface
See Also:
  • Constructor Details

    • OMIChildServer

      public OMIChildServer() throws RemoteException
      Throws:
      RemoteException
    • OMIChildServer

      public OMIChildServer(com.sas.metadata.remote.MdFactory mdfactory, com.sas.metadata.remote.MdObjectStore mdstore, MetadataServerInterface parent, int childnum) throws RemoteException
      Throws:
      RemoteException
    • OMIChildServer

      public OMIChildServer(com.sas.metadata.remote.MdFactory mdfactory, com.sas.metadata.remote.MdObjectStore mdstore, MetadataServerInterface parent, int childnum, Class theClass) throws RemoteException
      Throws:
      RemoteException
  • Method Details

    • getHost

      public String getHost() throws ServiceException, RemoteException
      Description copied from interface: ServerInterface
      Get the host name of the server.
      Specified by:
      getHost in interface ServerInterface
      Overrides:
      getHost in class OMIServer
      Returns:
      The server's DNS host name.
      Throws:
      ServiceException - If a service level error occurs.
      RemoteException - In the event of remote object failure.
    • getPort

      public int getPort() throws ServiceException, RemoteException
      Description copied from interface: ServerInterface
      Get the server's TCP port number.
      Specified by:
      getPort in interface ServerInterface
      Overrides:
      getPort in class OMIServer
      Returns:
      The TCP port number the server is listening on.
      Throws:
      ServiceException - If a service level error occurs.
      RemoteException - In the event of remote object failure.
    • destroy

      public void destroy() throws ServiceException, RemoteException
      Description copied from interface: ServerInterface
      Close the connections and release all resources in use by this server instance.
      Specified by:
      destroy in interface ServerInterface
      Overrides:
      destroy in class OMIServer
      Throws:
      ServiceException - If a service level error occurs.
      RemoteException - In the event of remote object failure.
    • commit

      public void commit() throws ServiceException, RemoteException
      Description copied from interface: ChildServerInterface
      Commit the changes in this child to its parent. If an exception is thrown during the commit, you must call rollback to close the transaction.
      Specified by:
      commit in interface ChildServerInterface
      Throws:
      ServiceException - if unable to commit the changes to the parent.
      RemoteException - if a network anomaly is encountered.
    • rollback

      public void rollback() throws ServiceException, RemoteException
      Description copied from interface: ChildServerInterface
      Roll back the changes in this child repository by deleting the cache without flushing it to the parent.
      Specified by:
      rollback in interface ChildServerInterface
      Throws:
      ServiceException - if unable to rollback.
      RemoteException - if a network anomaly is encountered.
    • close

      public void close() throws RemoteException
      Throws:
      RemoteException
    • getRepository

      public RepositoryInterface getRepository(String name) throws ServiceException, RemoteException
      Description copied from interface: ServerInterface
      Get a named repository managed by this server.
      Specified by:
      getRepository in interface ServerInterface
      Overrides:
      getRepository in class OMIServer
      Parameters:
      name - The name of the repository to return.
      Returns:
      A RepositoryInterface for the named repository, or null if a repository with that name wasn't found.
      Throws:
      ServiceException - If a server error occured.
      RemoteException - In the event of remote object failure.
    • getRepositories

      public List getRepositories(boolean getAll) throws ServiceException, RemoteException
      Description copied from interface: ServerInterface
      Get a List of the requested repositories from this Server. This method returns a List of RepositoryInterface instances that have been explicitly requested via the ServerInterface.getRepository(String) method, unless the getAll parameter is true; then all of the repositories managed by the server are returned.
      Specified by:
      getRepositories in interface ServerInterface
      Overrides:
      getRepositories in class OMIServer
      Parameters:
      getAll - If true, all of the repositories managed by the server are returned. Otherwise, only the explicitly requested repositories are returned.
      Returns:
      A List of RepositoryInterface objects.
      Throws:
      ServiceException - If a service level error occurs.
      RemoteException - In the event of remote object failure.
    • fetch

      public MetadataInterface fetch(String repositoryKey) throws ServiceException, RemoteException
      Description copied from interface: ServerInterface
      Fetch an object from the metadat based on its URI.
      Specified by:
      fetch in interface ServerInterface
      Overrides:
      fetch in class OMIServer
      Parameters:
      repositoryKey - When the SASDS URI is supported, this will be that String. Until then, this should be the entity key (obtained via the MetadataInterface.getEntityKey method) or the repository key (obtained via the MetadataInterface.getReposKey method);
      Returns:
      The metadata object that was fetched.
      Throws:
      ServiceException - If no object matching the URI was found, or some other error occurred.
      RemoteException - In the event of remote object failure.
    • fetch

      public MetadataInterface fetch(String repositoryKey, boolean bypassCache) throws ServiceException, RemoteException
      Description copied from class: OMIServer
      Fetch an object from the repository given the repository key. If the bypassCache flag is set then the cache will not be checked before retrieving the object from the server. If the flag is not set, then the behaviour is the same as the fetch method.

      Specified by:
      fetch in interface ServerInterface
      Overrides:
      fetch in class OMIServer
      Parameters:
      repositoryKey - The identifier for the object from the repository. This should be formatted as the repository ID followed by a slash, then the repository specific type. This string can be obtained using the Metadata.getReposKey method.
      bypassCache - Boolean flag determines whether the cache should be checked for the object before forcing a trip to the server or not.
      Returns:
      The object matching the repository ID, or null.
      Throws:
      ServiceException - if a repository error occurs.
      RemoteException - in the event of network errors.