Author: andre
Date: 2009-07-01 22:42:49 +0200 (Wed, 01 Jul 2009)
New Revision: 36515
Modified:
mmbase/trunk/applications/streams/src/main/java/org/mmbase/streams/CreateCachesProcessor.java
Log:
javadoc
Modified:
mmbase/trunk/applications/streams/src/main/java/org/mmbase/streams/CreateCachesProcessor.java
===================================================================
---
mmbase/trunk/applications/streams/src/main/java/org/mmbase/streams/CreateCachesProcessor.java
2009-07-01 08:46:50 UTC (rev 36514)
+++
mmbase/trunk/applications/streams/src/main/java/org/mmbase/streams/CreateCachesProcessor.java
2009-07-01 20:42:49 UTC (rev 36515)
@@ -35,8 +35,9 @@
/**
- * This commit-processor is used on node of the type 'streamsources', and is
used to initiate
- * conversions to other formats.
+ * 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.
*
* @author Michiel Meeuwissen
* @version $Id$
@@ -56,7 +57,6 @@
private static List<JobDefinition> list = new
CopyOnWriteArrayList<JobDefinition>();
-
private static int transSeq = 0;
public final ThreadPoolExecutor transcoderExecutor = new
ThreadPoolExecutor(3, 3, 5 * 60 , TimeUnit.SECONDS, new
LinkedBlockingQueue<Runnable>(), new ThreadFactory() {
public Thread newThread(Runnable r) {
@@ -160,9 +160,13 @@
initWatcher();
}
-
-
-
+ /**
+ * Gets the node representing the 'cached' stream (the result of a
conversion).
+ * @param cacheManager
+ * @param node the original node from which the 'cached' stream was
created
+ * @param key representation of the way the stream was created from its
source
+ * @param logger
+ */
protected Node getCacheNode(final String cacheManager, final Node node,
final String key, final Logger logger) {
final NodeManager caches =
node.getCloud().getNodeManager(cacheManager);
NodeQuery q = caches.createQuery();
@@ -185,12 +189,10 @@
* @param mediafragment
* @param transcoder The transcoder providing the 'key'.
*/
-
protected Node getCacheNode(final Node node, final Node mediaprovider,
final Node mediafragment, final Transcoder t, final Logger logger) {
assert mediafragment != null;
assert mediaprovider != null;
-
final String key = t.getKey();
Node resultNode = null;
for (String cacheType : new String[] {"streamsourcescaches",
"videostreamsourcescaches", "audiostreamsourcescaches"}) {
@@ -428,7 +430,6 @@
}
}
-
public void commit(final Node node, final Field field) {
if (node.getNumber() > 0) {
if (node.isChanged(field.getName())) {
@@ -450,13 +451,16 @@
@Override
protected Object clone() throws CloneNotSupportedException {
CreateCachesProcessor clone = (CreateCachesProcessor) super.clone();
- LOG.info("CLoned");
+ LOG.info("Cloned");
clone.initWatcher();
return clone;
}
+ /**
+ * The description or definition of a job that's doing the transcoding.
+ */
public class JobDefinition {
public final Transcoder transcoder;
public final List<Analyzer> analyzers;
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs