Class FSMigrater

    • Constructor Detail

    • Method Detail

      • setImportMessage

        public void setImportMessage​(MigrationEntry me,
                                     int code)
      • getImportMessage

        public String getImportMessage​(int importCode)
      • isFS

        protected boolean isFS​(edu.uiuc.ncsa.security.core.Store store,
                               boolean noTransactions)
      • isSQLStore

        protected boolean isSQLStore​(edu.uiuc.ncsa.security.core.Store store,
                                     boolean noTransactions)
      • ingest

        public void ingest​(edu.uiuc.ncsa.myproxy.oa4mp.oauth2.OA2SE source,
                           boolean noTransactions,
                           int batchSize,
                           boolean pacerOn)
                    throws SQLException
        Throws:
        SQLException
      • getStoreComponent

        protected String getStoreComponent​(edu.uiuc.ncsa.security.core.Store s)
      • ingest

        protected int[] ingest​(edu.uiuc.ncsa.security.storage.FileStore fileStore,
                               int batchSize,
                               boolean pacerOn)
                        throws SQLException
        Read all the names of the file that the OS knows about. This is designed to be quick so that the system is not ovewhelmed with too much processing for huge directories.
        Parameters:
        fileStore -
        Returns:
        Throws:
        SQLException
      • hasErrorCodes

        protected boolean hasErrorCodes​(int[] importErrorCodes)
      • computeHerz

        protected String computeHerz​(long value,
                                     long startTime)
        Adds blanks to the output since the units may vary widely at times. This way if this is used by pacer, there are not odd artifacts at the end of the line.
        Parameters:
        value -
        startTime -
        Returns:
      • migrate

        public void migrate​(edu.uiuc.ncsa.myproxy.oa4mp.oauth2.OA2SE targetSE,
                            int batchSize,
                            boolean runUpkeep,
                            String name,
                            boolean pacerOn)
      • migrateAll

        public void migrateAll​(edu.uiuc.ncsa.myproxy.oa4mp.oauth2.OA2SE targetSE,
                               boolean noTransactions,
                               int batchSize,
                               boolean runUpkeep,
                               boolean pacerOn)
        Main entry point for migration. This will resume where it left off as needed.
        Parameters:
        targetSE -
        noTransactions -
        batchSize -
        runUpkeep -
        pacerOn -
      • getAllIDs

        protected String getAllIDs​(edu.uiuc.ncsa.security.storage.sql.SQLStore sqlStore)
      • setIDs

        protected void setIDs​(edu.uiuc.ncsa.security.storage.sql.SQLStore sqlStore,
                              HashSet<edu.uiuc.ncsa.security.core.Identifier> ids)
                       throws SQLException
        Throws:
        SQLException
      • migrate

        protected void migrate​(edu.uiuc.ncsa.security.storage.sql.SQLStore targetStore,
                               boolean runUpkeep,
                               String component,
                               int batchSize,
                               boolean pacerOn)
                        throws SQLException
        Takes the entries in the migration table and puts them into the store. This tracks a batch update to the target store and a batch update to the migration store. This allows us to resume the import if there is a failure.
        Parameters:
        targetStore -
        component -
        Throws:
        SQLException
      • doCheck

        protected boolean doCheck​(edu.uiuc.ncsa.security.core.Identifiable identifiable)
      • permissionCheck

        protected boolean permissionCheck​(edu.uiuc.ncsa.myproxy.oa4mp.server.admin.permissions.Permission permission)
        Checks if the permission actually points to anything in the store.
        Parameters:
        permission -
        Returns:
      • approvalCheck

        protected boolean approvalCheck​(ClientApproval clientApproval)
      • doUpkeep

        protected boolean doUpkeep​(edu.uiuc.ncsa.security.storage.monitored.upkeep.UpkeepConfiguration upkeepConfiguration,
                                   MigrationEntry me,
                                   edu.uiuc.ncsa.security.storage.monitored.Monitored monitored)
                            throws SQLException
        Evaluates the entry for action. This returns true if the monitored object is skipped
        Parameters:
        upkeepConfiguration -
        me -
        monitored -
        Returns:
        Throws:
        SQLException
      • hasEchoWriter

        protected boolean hasEchoWriter()