Revision 6447
Added by ben leinfelder over 12 years ago
MetacatHandler.java | ||
---|---|---|
106 | 106 |
import edu.ucsb.nceas.metacat.client.InsufficientKarmaException; |
107 | 107 |
import edu.ucsb.nceas.metacat.database.DBConnection; |
108 | 108 |
import edu.ucsb.nceas.metacat.database.DBConnectionPool; |
109 |
import edu.ucsb.nceas.metacat.dataone.hazelcast.HazelcastService; |
|
109 | 110 |
import edu.ucsb.nceas.metacat.dataquery.DataQuery; |
110 | 111 |
import edu.ucsb.nceas.metacat.dataquery.MetacatDatabaseConnectionPoolFactory; |
111 | 112 |
import edu.ucsb.nceas.metacat.event.MetacatDocumentEvent; |
... | ... | |
1857 | 1858 |
// handle inserts |
1858 | 1859 |
try { |
1859 | 1860 |
sysMeta = createSystemMetadata(newdocid, user, groups); |
1860 |
IdentifierManager.getInstance().createSystemMetadata(sysMeta);
|
|
1861 |
HazelcastService.getInstance().getSystemMetadataMap().put(sysMeta.getIdentifier(), sysMeta);
|
|
1861 | 1862 |
|
1862 | 1863 |
} catch ( McdbDocNotFoundException dnfe ) { |
1863 | 1864 |
logMetacat.debug( |
... | ... | |
3001 | 3002 |
SystemMetadata sm = createSystemMetadata(docid, username, groupnames); |
3002 | 3003 |
|
3003 | 3004 |
// manage it in the store |
3004 |
if (IdentifierManager.getInstance().identifierExists(docid)) { |
|
3005 |
IdentifierManager.getInstance().createSystemMetadata(sm); |
|
3006 |
} else { |
|
3007 |
IdentifierManager.getInstance().updateSystemMetadata(sm); |
|
3008 |
} |
|
3005 |
HazelcastService.getInstance().getSystemMetadataMap().put(sm.getIdentifier(), sm); |
|
3009 | 3006 |
|
3010 | 3007 |
|
3011 | 3008 |
} catch (Exception ee) { |
Also available in: Unified diff
rely on Hazelcast to store the SystemMetadata locally for the node. Entry event listeners store the shared system metadata on their local node when alerted. TODO: remove old replication code that included system metadata xml when replicating scimeta and data