01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.object.config.spec;
05:
06: import EDU.oswego.cs.dl.util.concurrent.LinkedNode;
07: import EDU.oswego.cs.dl.util.concurrent.LinkedQueue;
08:
09: import com.tc.object.config.ConfigVisitor;
10: import com.tc.object.config.DSOApplicationConfig;
11: import com.tc.object.config.Visitable;
12:
13: public class LinkedQueueSpec implements Visitable {
14:
15: public ConfigVisitor visit(ConfigVisitor visitor,
16: DSOApplicationConfig config) {
17: String linkedQueueClassname = LinkedQueue.class.getName();
18: config.addIncludePattern(linkedQueueClassname);
19:
20: String linkedNodeClassname = LinkedNode.class.getName();
21: config.addIncludePattern(linkedNodeClassname);
22:
23: // LinkedQueue config
24: String linkedQueueExpression = "* " + linkedQueueClassname
25: + ".*(..)";
26: config.addWriteAutolock(linkedQueueExpression);
27:
28: return visitor;
29: }
30:
31: }
|