KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > object > config > spec > LinkedQueueSpec


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.object.config.spec;
5
6 import EDU.oswego.cs.dl.util.concurrent.LinkedNode;
7 import EDU.oswego.cs.dl.util.concurrent.LinkedQueue;
8
9 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, DSOApplicationConfig config) {
16     String JavaDoc linkedQueueClassname = LinkedQueue.class.getName();
17     config.addIncludePattern(linkedQueueClassname);
18
19     String JavaDoc linkedNodeClassname = LinkedNode.class.getName();
20     config.addIncludePattern(linkedNodeClassname);
21
22     // LinkedQueue config
23
String JavaDoc linkedQueueExpression = "* " + linkedQueueClassname + ".*(..)";
24     config.addWriteAutolock(linkedQueueExpression);
25
26     return visitor;
27   }
28
29 }
30
Popular Tags