PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/hazelcast/src/main/java/com/hazelcast/core/ICollection.java

https://bitbucket.org/gabral6_gmailcom/hazelcast
Java | 49 lines | 6 code | 4 blank | 39 comment | 0 complexity | 6047cf57521b023482bd8de678ed5c21 MD5 | raw file
 1/*
 2 * Copyright (c) 2008-2013, Hazelcast, Inc. All Rights Reserved.
 3 *
 4 * Licensed under the Apache License, Version 2.0 (the "License");
 5 * you may not use this file except in compliance with the License.
 6 * You may obtain a copy of the License at
 7 *
 8 * http://www.apache.org/licenses/LICENSE-2.0
 9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package com.hazelcast.core;
18
19/**
20 * Concurrent, distributed, partitioned, observable collection.
21 *
22 * @param <E> item
23 */
24public interface ICollection<E> extends Instance {
25    /**
26     * Returns the name of this collection
27     *
28     * @return name of this collection
29     */
30    String getName();
31
32    /**
33     * Adds an item listener for this collection. Listener will get notified
34     * for all collection add/remove events.
35     *
36     * @param listener     item listener
37     * @param includeValue <tt>true</tt> updated item should be passed
38     *                     to the item listener, <tt>false</tt> otherwise.
39     */
40    void addItemListener(ItemListener<E> listener, boolean includeValue);
41
42    /**
43     * Removes the specified item listener.
44     * Returns silently if the specified listener is not added before.
45     *
46     * @param listener item listener for this collection
47     */
48    void removeItemListener(ItemListener<E> listener);
49}