This project has retired. For details please refer to its Attic page.
BindingSession xref

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   * http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.chemistry.opencmis.client.bindings.spi;
20  
21  import java.io.Serializable;
22  import java.util.Collection;
23  
24  /**
25   * CMIS provider session interface.
26   */
27  public interface BindingSession extends Serializable {
28  
29      /**
30       * Returns all keys.
31       */
32      Collection<String> getKeys();
33  
34      /**
35       * Gets a session value.
36       */
37      Object get(String key);
38  
39      /**
40       * Returns a session value or the default value if the key doesn't exist.
41       */
42      Object get(String key, Object defValue);
43  
44      /**
45       * Returns a session value or the default value if the key doesn't exist.
46       */
47      int get(String key, int defValue);
48  
49      /**
50       * Adds a non-transient session value.
51       */
52      void put(String key, Serializable object);
53  
54      /**
55       * Adds a session value.
56       */
57      void put(String key, Object object, boolean isTransient);
58  
59      /**
60       * Removes a session value.
61       */
62      void remove(String key);
63  
64      /**
65       * Acquires a read lock.
66       */
67      void readLock();
68  
69      /**
70       * Releases a read lock.
71       */
72      void readUnlock();
73  
74      /**
75       * Acquires a write lock.
76       */
77      void writeLock();
78  
79      /**
80       * Releases a write lock.
81       */
82      void writeUnlock();
83  }