org.apache.mahout.cf.taste.model
Interface UpdatableIDMigrator
- All Superinterfaces:
- IDMigrator, Refreshable
- All Known Implementing Classes:
- AbstractJDBCIDMigrator, MemoryIDMigrator, MySQLJDBCIDMigrator
public interface UpdatableIDMigrator
- extends IDMigrator
Method Summary |
void |
initialize(Iterable<String> stringIDs)
Make the mapping aware of the given string IDs. |
void |
storeMapping(long longID,
String stringID)
Stores the reverse long-to-String mapping in some kind of backing store. |
storeMapping
void storeMapping(long longID,
String stringID)
throws TasteException
- Stores the reverse long-to-String mapping in some kind of backing store. Note that this must be called
directly (or indirectly through
initialize(Iterable)
) for every String that might be encountered
in the application, or else the mapping will not be known.
- Parameters:
longID
- long IDstringID
- string ID that maps to/from that long ID
- Throws:
TasteException
- if an error occurs while saving the mapping
initialize
void initialize(Iterable<String> stringIDs)
throws TasteException
- Make the mapping aware of the given string IDs. This must be called initially before the implementation
is used, or else it will not be aware of reverse long-to-String mappings.
- Throws:
TasteException
- if an error occurs while storing the mappings
Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.