org.mmbase.streams.createcaches
Class Processor
java.lang.Object
org.mmbase.streams.createcaches.Processor
- All Implemented Interfaces:
- Externalizable, Serializable, CommitProcessor
public class Processor
- extends Object
- implements CommitProcessor, Externalizable
This commit-processor is used on nodes of type 'streamsources' and is used to initiate the
conversions to other formats which are saved in 'streamsourcescaches'. Its analogy is derived
from the conversion of 'images' in MMBase to their resulting 'icaches' nodes.
Several transcodings of media files can be configured with
Recognizers and
Transcoders.
- Version:
- $Id: Processor.java 42668 2010-06-24 09:29:47Z andre $
- Author:
- Michiel Meeuwissen
- See Also:
- Serialized Form
NOT
public static String NOT
XSD_CREATECACHES
public static final String XSD_CREATECACHES
- See Also:
- Constant Field Values
NAMESPACE_CREATECACHES
public static final String NAMESPACE_CREATECACHES
- See Also:
- Constant Field Values
list
protected final Map<String,JobDefinition> list
- List with the configured
JobDefinitions.
cacheManagers
String[] cacheManagers
threadPools
public final Map<Stage,ThreadPoolExecutor> threadPools
executors
final List<CommandExecutor.Method> executors
watcher
protected final ResourceWatcher watcher
runningJobs
protected static final Map<Integer,Job> runningJobs
Processor
public Processor()
Processor
Processor(String configFile)
setDirectory
public void setDirectory(File dir)
getDirectory
public File getDirectory()
setCacheManagers
public void setCacheManagers(String... cm)
initWatcher
protected void initWatcher()
setConfigFile
public void setConfigFile(String configFile)
myJobs
public static Set<Job> myJobs(UserContext u)
runningJobs
public static Collection<Job> runningJobs()
getJob
public static Job getJob(Node node)
removeJob
protected static boolean removeJob(Node node)
cancelJob
public static String cancelJob(Node node)
getConfiguration
public Map<String,JobDefinition> getConfiguration()
getExecutors
public List<CommandExecutor.Method> getExecutors()
createCaches
public Job createCaches(Cloud ntCloud,
int node)
createCaches
public Job createCaches(Cloud ntCloud,
int node,
Map<String,JobDefinition> jdlist)
- Creates caches nodes when not existing (or recreate) by making a transcoding Job
- Parameters:
ntCloud - a non transactional cloudint - node number of a source nodejdlist - job definitions
- Returns:
- Job recognizing and/or transcoding the source stream
commit
public void commit(Node node,
Field field)
- Commits the mediastreamsources node, calls createCaches to create resulting streamscaches nodes
and start transcoding.
- Specified by:
commit in interface CommitProcessor
clone
protected Processor clone()
throws CloneNotSupportedException
- Overrides:
clone in class Object
- Throws:
CloneNotSupportedException
readExternal
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
- Specified by:
readExternal in interface Externalizable
- Throws:
IOException
ClassNotFoundException
writeExternal
public void writeExternal(ObjectOutput stream)
throws IOException
- Specified by:
writeExternal in interface Externalizable
- Throws:
IOException
MMBase 2.0-SNAPSHOT - null