Project

General

Profile

« Previous | Next » 

Revision 7812

use an independent ISet<SystemMetadata> structure to communicate objects that should be indexed by metacat-index. https://projects.ecoinformatics.org/ecoinfo/issues/5943

View differences:

DistributedMapsFactory.java
58 58
    private static HazelcastClient hzClient = null;
59 59
    private static String hzSystemMetadata = null;
60 60
    private static String hzObjectPath = null;
61
    private static String hzIndexQueue = null;
61 62
    private static int waitingTime = IndexGenerator.WAITTIME;
62 63
    private static int maxAttempts = IndexGenerator.MAXWAITNUMBER;
63 64
    private static IMap<Identifier, SystemMetadata> systemMetadataMap = null;
64 65
    private static IMap<Identifier, String> objectPathMap = null;
66
    private static ISet<SystemMetadata> indexQueue = null;
65 67
    /* The name of the identifiers set */
66 68
    private static String identifiersSetName = IDENTIFIERSETNAME;
67 69
    /* The Hazelcast distributed identifiers set */
......
86 88
            log.warn("DistributedMapFactory.startHazelCastClient - couldn't read the name of the identifiersSet from the metacat.properties file since : "+e.getMessage()+". Default values will be used");
87 89
            identifiersSetName = IDENTIFIERSETNAME;
88 90
        }
89
     // get config values
91
        
92
        // the index queue name to listen to
93
        hzIndexQueue = Settings.getConfiguration().getString("index.hazelcast.indexqueue");        
94
        
95
        // get config values
90 96
        hzSystemMetadata = Settings.getConfiguration().getString(
91 97
                "dataone.hazelcast.storageCluster.systemMetadataMap");
92 98
        hzObjectPath = Settings.getConfiguration().getString(
......
231 237
        return identifiersSet;
232 238
    }
233 239
    
240
    /**
241
     * Get the indexQueue set from hazelcast client
242
     * @return the indexQueue
243
     * @throws FileNotFoundException
244
     * @throws ServiceFailure
245
     */
246
    public static ISet<SystemMetadata> getIndexQueue() throws FileNotFoundException, ServiceFailure {
247
        if(hzClient== null) {
248
            startHazelCastClient();
249
        }
250
        indexQueue = hzClient.getSet(hzIndexQueue);
251
        return indexQueue;
252
    }
253
    
234 254
}

Also available in: Unified diff