Skip to content

Commit

Permalink
ISPN-841 add copyright headers, make the threadlocal private
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanne committed Jan 5, 2011
1 parent 8b6b868 commit c5b26f3
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 9 deletions.
21 changes: 21 additions & 0 deletions tree/src/main/java/org/infinispan/tree/CacheAdapter.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/*
* JBoss, Home of Professional Open Source.
* Copyright 2000 - 2011, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.infinispan.tree;

import org.infinispan.AdvancedCache;
Expand Down
21 changes: 21 additions & 0 deletions tree/src/main/java/org/infinispan/tree/LifecycleCallbacks.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/*
* JBoss, Home of Professional Open Source.
* Copyright 2000 - 2011, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.infinispan.tree;

import org.infinispan.config.GlobalConfiguration;
Expand Down
21 changes: 21 additions & 0 deletions tree/src/main/java/org/infinispan/tree/TreeCacheFactory.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/*
* JBoss, Home of Professional Open Source.
* Copyright 2000 - 2011, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.infinispan.tree;

import org.infinispan.Cache;
Expand Down
21 changes: 21 additions & 0 deletions tree/src/main/java/org/infinispan/tree/TreeContext.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/*
* JBoss, Home of Professional Open Source.
* Copyright 2000 - 2011, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.infinispan.tree;

import org.infinispan.context.Flag;
Expand Down
23 changes: 22 additions & 1 deletion tree/src/main/java/org/infinispan/tree/TreeContextContainer.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/*
* JBoss, Home of Professional Open Source.
* Copyright 2000 - 2011, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.infinispan.tree;

/**
Expand All @@ -9,7 +30,7 @@
*/
public class TreeContextContainer {

ThreadLocal<TreeContext> tcTL = new ThreadLocal<TreeContext>();
private final ThreadLocal<TreeContext> tcTL = new ThreadLocal<TreeContext>();

public TreeContext createTreeContext() {
TreeContext existing = tcTL.get();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,4 @@ protected final <K, V> AtomicMap<K, V> getAtomicMap(NodeKey key) {
return AtomicMapLookup.getAtomicMap(cache, key);
}

// This does not work cos code outside control of tree module will execute ops in cache, see CacheAdapter javadoc
//
// protected final Cache<NodeKey, AtomicMap<?, ?>> withTreeFlags(Cache<NodeKey, AtomicMap<?, ?>> cache) {
// if (tcc.getTreeContext() != null)
// icc.createInvocationContext().setFlags(tcc.getTreeContext().getFlags());
// return cache;
// }
//
}

0 comments on commit c5b26f3

Please sign in to comment.