00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef COH_CONVERTER_COLLECTIONS_HPP
00017 #define COH_CONVERTER_COLLECTIONS_HPP
00018
00019 #include "coherence/lang.ns"
00020
00021
00022 #include "coherence/net/cache/CacheEvent.hpp"
00023 #include "coherence/net/cache/CacheMap.hpp"
00024 #include "coherence/net/CacheService.hpp"
00025 #include "coherence/net/NamedCache.hpp"
00026 #include "coherence/util/Collection.hpp"
00027 #include "coherence/util/ConcurrentMap.hpp"
00028 #include "coherence/util/Converter.hpp"
00029 #include "coherence/util/Filter.hpp"
00030 #include "coherence/util/InvocableMap.hpp"
00031 #include "coherence/util/Iterator.hpp"
00032 #include "coherence/util/MapEvent.hpp"
00033 #include "coherence/util/ObservableMap.hpp"
00034 #include "coherence/util/Set.hpp"
00035 #include "coherence/util/WrapperCollections.hpp"
00036
00037 COH_OPEN_NAMESPACE2(coherence,util)
00038
00039 using coherence::net::cache::CacheEvent;
00040 using coherence::net::cache::CacheMap;
00041 using coherence::net::CacheService;
00042 using coherence::net::NamedCache;
00043
00044
00045
00046
00047
00048
00049
00050 class COH_EXPORT ConverterCollections
00051 {
00052
00053 public:
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063 static ObjectArray::Handle convertArray(ObjectArray::Handle hArray,
00064 Converter::View vConvUp);
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075 static ObjectArray::View convertArray(ObjectArray::View vArray,
00076 Converter::View vConvUp);
00077
00078
00079
00080
00081 public:
00082
00083
00084
00085
00086 class COH_EXPORT ConverterIterator
00087 : public cloneable_spec<ConverterIterator,
00088 extends<WrapperCollections::AbstractWrapperIterator> >
00089 {
00090 friend class factory<ConverterIterator>;
00091
00092
00093
00094 protected:
00095
00096
00097
00098
00099
00100
00101
00102 ConverterIterator(Iterator::Handle hiterDelegate,
00103 Converter::View vConvUp);
00104
00105
00106
00107
00108 ConverterIterator(const ConverterIterator& that);
00109
00110
00111
00112 public:
00113
00114
00115
00116 virtual Object::Holder next();
00117
00118
00119
00120
00121 protected:
00122
00123
00124
00125 FinalView<Converter> f_vConvUp;
00126 };
00127
00128
00129
00130
00131
00132
00133 class COH_EXPORT ConverterCollection
00134 : public cloneable_spec<ConverterCollection,
00135 extends<WrapperCollections::AbstractWrapperCollection> >
00136 {
00137 friend class factory<ConverterCollection>;
00138
00139
00140
00141 protected:
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152 ConverterCollection(Collection::Handle hcollDelegate,
00153 Converter::View vConvUp,
00154 Converter::View vConvDown);
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166 ConverterCollection(Collection::View vcollDelegate,
00167 Converter::View vConvUp,
00168 Converter::View vConvDown);
00169
00170
00171
00172
00173 ConverterCollection(const ConverterCollection& that);
00174
00175
00176
00177
00178 public:
00179
00180
00181
00182 virtual bool contains(Object::View v) const;
00183
00184
00185
00186
00187 virtual Iterator::Handle iterator() const;
00188
00189
00190
00191
00192 virtual Muterator::Handle iterator();
00193
00194
00195
00196
00197 virtual ObjectArray::Handle toArray(
00198 ObjectArray::Handle hao = NULL) const;
00199
00200
00201
00202
00203 virtual bool add(Object::Holder oh);
00204
00205
00206
00207
00208 virtual bool remove(Object::View v);
00209
00210
00211
00212
00213 virtual bool containsAll(Collection::View vc) const;
00214
00215
00216
00217
00218 virtual bool addAll(Collection::View vc);
00219
00220
00221
00222
00223 virtual bool removeAll(Collection::View vc);
00224
00225
00226
00227
00228 virtual bool retainAll(Collection::View vc);
00229
00230
00231
00232 public:
00233
00234
00235
00236 virtual bool equals(Object::View that) const;
00237
00238
00239
00240
00241 virtual size32_t hashCode() const;
00242
00243
00244
00245
00246 virtual void toStream(std::ostream& out) const;
00247
00248
00249
00250 protected:
00251
00252
00253
00254 FinalView<Converter> f_vConvUp;
00255
00256
00257
00258
00259 FinalView<Converter> f_vConvDown;
00260 };
00261
00262
00263
00264
00265
00266 class COH_EXPORT ConverterSet
00267 : public cloneable_spec<ConverterSet,
00268 extends<WrapperCollections::AbstractWrapperSet> >
00269 {
00270 friend class factory<ConverterSet>;
00271
00272
00273
00274 protected:
00275
00276
00277
00278
00279
00280
00281
00282
00283 ConverterSet(Set::Handle hsetDelegate,
00284 Converter::View vConvUp,
00285 Converter::View vConvDown);
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295 ConverterSet(Set::View vsetDelegate,
00296 Converter::View vConvUp,
00297 Converter::View vConvDown);
00298
00299
00300
00301
00302 ConverterSet(const ConverterSet& that);
00303
00304
00305
00306 public:
00307
00308
00309
00310
00311 virtual bool contains(Object::View v) const;
00312
00313
00314
00315
00316 virtual Iterator::Handle iterator() const;
00317
00318
00319
00320
00321 virtual Muterator::Handle iterator();
00322
00323
00324
00325
00326 virtual ObjectArray::Handle toArray(
00327 ObjectArray::Handle hoa = NULL) const;
00328
00329
00330
00331
00332 virtual bool add(Object::Holder oh);
00333
00334
00335
00336
00337 virtual bool remove(Object::View v);
00338
00339
00340
00341
00342 virtual bool containsAll(Collection::View vc) const;
00343
00344
00345
00346
00347 virtual bool addAll(Collection::View vc);
00348
00349
00350
00351
00352 virtual bool removeAll(Collection::View vc);
00353
00354
00355
00356
00357 virtual bool retainAll(Collection::View vc);
00358
00359
00360
00361 public:
00362
00363
00364
00365 virtual bool equals(Object::View that) const;
00366
00367
00368
00369
00370 virtual size32_t hashCode() const;
00371
00372
00373
00374
00375 virtual void toStream(std::ostream& out) const;
00376
00377
00378
00379 protected:
00380
00381
00382
00383 FinalView<Converter> f_vConvUp;
00384
00385
00386
00387
00388 FinalView<Converter> f_vConvDown;
00389 };
00390
00391
00392
00393
00394
00395 class COH_EXPORT EntryConverter
00396 : public class_spec<EntryConverter,
00397 extends<Object>,
00398 implements<Converter> >
00399 {
00400 friend class factory<EntryConverter>;
00401
00402
00403
00404 public:
00405
00406
00407
00408
00409
00410
00411 EntryConverter(Converter::View vConvKey,
00412 Converter::View vConvVal);
00413
00414
00415
00416
00417 EntryConverter(const EntryConverter& that);
00418
00419
00420
00421 public:
00422
00423
00424
00425 virtual Object::Holder convert(Object::Holder oh) const;
00426
00427
00428
00429 public:
00430
00431
00432
00433 virtual Converter::View getKeyConverter() const;
00434
00435
00436
00437
00438 virtual Converter::View getValueConverter() const;
00439
00440
00441
00442 public:
00443
00444
00445
00446
00447
00448 static Converter::View getKeyConverter
00449 (EntryConverter::View vConvert);
00450
00451
00452
00453
00454
00455
00456 static Converter::View getValueConverter
00457 (EntryConverter::View vConvert);
00458
00459
00460
00461
00462
00463
00464
00465
00466
00467
00468
00469 static Object::View convertKey
00470 (EntryConverter::View vConvert, Object::View vKey);
00471
00472
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484 static Object::Holder convertValue
00485 (EntryConverter::View vConvert, Object::Holder ohValue);
00486
00487
00488
00489 protected:
00490
00491
00492
00493 FinalView<Converter> f_vConvKey;
00494
00495
00496
00497
00498 FinalView<Converter> f_vConvVal;
00499 };
00500
00501
00502
00503
00504
00505 class COH_EXPORT ConverterMap
00506 : public cloneable_spec<ConverterMap,
00507 extends<WrapperCollections::AbstractWrapperMap> >
00508 {
00509 friend class factory<ConverterMap>;
00510
00511
00512
00513 protected:
00514
00515
00516
00517
00518
00519
00520
00521
00522 ConverterMap(Map::Handle hMapDelegate,
00523 EntryConverter::View vConvUp,
00524 EntryConverter::View vConvDown);
00525
00526
00527
00528
00529
00530
00531
00532
00533
00534 ConverterMap(Map::View vMapDelegate,
00535 EntryConverter::View vConvUp,
00536 EntryConverter::View vConvDown);
00537
00538
00539
00540
00541 ConverterMap(const ConverterMap& that);
00542
00543
00544
00545 public:
00546
00547
00548
00549 virtual bool containsKey(Object::View vKey) const;
00550
00551
00552
00553
00554 virtual bool containsValue(Object::View vValue) const;
00555
00556
00557
00558
00559 virtual Object::Holder get(Object::View vKey) const;
00560
00561
00562
00563
00564 using Map::get;
00565
00566
00567
00568
00569 virtual Object::Holder put(Object::View vKey,
00570 Object::Holder ohValue);
00571
00572
00573
00574
00575 virtual Object::Holder remove(Object::View vKey);
00576
00577
00578
00579
00580 virtual void putAll(Map::View vMap);
00581
00582
00583
00584
00585 virtual Set::View keySet() const;
00586
00587
00588
00589
00590 virtual Set::Handle keySet();
00591
00592
00593
00594
00595 virtual Collection::View values() const;
00596
00597
00598
00599
00600 virtual Collection::Handle values();
00601
00602
00603
00604
00605 virtual Set::View entrySet() const;
00606
00607
00608
00609
00610 virtual Set::Handle entrySet();
00611
00612
00613
00614 public:
00615
00616
00617
00618 virtual bool equals(Object::View that) const;
00619
00620
00621
00622
00623 virtual size32_t hashCode() const;
00624
00625
00626
00627
00628 virtual void toStream(std::ostream& out) const;
00629
00630
00631
00632 public:
00633
00634
00635
00636
00637
00638
00639 virtual EntryConverter::View getUpConverter() const;
00640
00641
00642
00643
00644
00645
00646
00647 virtual EntryConverter::View getDownConverter() const;
00648
00649
00650
00651 protected:
00652
00653
00654
00655 FinalView<EntryConverter> f_vConvUp;
00656
00657
00658
00659
00660 FinalView<EntryConverter> f_vConvDown;
00661 };
00662
00663
00664
00665
00666
00667 class COH_EXPORT ConverterEntry
00668 : public cloneable_spec<ConverterEntry,
00669 extends<WrapperCollections::AbstractWrapperEntry> >
00670 {
00671 friend class factory<ConverterEntry>;
00672
00673
00674
00675 protected:
00676
00677
00678
00679
00680
00681
00682
00683
00684
00685 ConverterEntry(Map::Entry::Handle hMapDelegate,
00686 EntryConverter::View vConvUp,
00687 EntryConverter::View vConvDown);
00688
00689
00690
00691
00692
00693
00694
00695
00696
00697
00698 ConverterEntry(Map::Entry::View vMapDelegate,
00699 EntryConverter::View vConvUp,
00700 EntryConverter::View vConvDown);
00701
00702
00703
00704
00705 ConverterEntry(const ConverterEntry& that);
00706
00707
00708
00709
00710 public:
00711
00712
00713
00714 virtual Object::View getKey() const;
00715
00716
00717
00718
00719 virtual Object::Holder getValue() const;
00720
00721
00722
00723
00724 using Map::Entry::getValue;
00725
00726
00727
00728
00729 virtual Object::Holder setValue(Object::Holder ohValue);
00730
00731
00732
00733 public:
00734
00735
00736
00737 virtual bool equals(Object::View that) const;
00738
00739
00740
00741
00742 virtual size32_t hashCode() const;
00743
00744
00745
00746
00747
00748 virtual void toStream(std::ostream& out) const;
00749
00750
00751
00752 protected:
00753
00754
00755
00756 FinalView<EntryConverter> f_vConvUp;
00757
00758
00759
00760
00761 FinalView<EntryConverter> f_vConvDown;
00762 };
00763
00764
00765
00766
00767
00768
00769
00770
00771 class COH_EXPORT ConverterCacheEvent
00772 : public class_spec<ConverterCacheEvent,
00773 extends<CacheEvent> >
00774 {
00775 friend class factory<ConverterCacheEvent>;
00776
00777
00778
00779 protected:
00780
00781
00782
00783
00784
00785
00786
00787
00788
00789
00790 ConverterCacheEvent(ObservableMap::Handle hMap,
00791 CacheEvent::View vEvent, Converter::View vConvKey,
00792 Converter::View vConvVal);
00793
00794
00795
00796 public:
00797
00798
00799
00800 virtual Object::View getKey() const;
00801
00802
00803
00804
00805 virtual Object::View getOldValue() const;
00806
00807
00808
00809
00810 virtual Object::View getNewValue() const;
00811
00812
00813
00814 public:
00815
00816
00817
00818
00819
00820 virtual CacheEvent::View getCacheEvent() const;
00821
00822
00823
00824
00825
00826
00827
00828 virtual Converter::View getConverterKeyUp() const;
00829
00830
00831
00832
00833
00834
00835
00836
00837 virtual Converter::View getConverterValueUp() const;
00838
00839
00840
00841
00842
00843
00844
00845 virtual void setOldValue(Object::View voValue);
00846
00847
00848
00849
00850
00851
00852
00853 virtual void setNewValue(Object::View voValue);
00854
00855
00856
00857 protected:
00858
00859
00860
00861 FinalView<CacheEvent> f_vEvent;
00862
00863
00864
00865
00866 FinalView<Converter> f_vConvKey;
00867
00868
00869
00870
00871 FinalView<Converter> f_vConvVal;
00872 };
00873
00874
00875
00876
00877
00878
00879
00880
00881 class COH_EXPORT ConverterMapEvent
00882 : public class_spec<ConverterMapEvent,
00883 extends<MapEvent> >
00884 {
00885 friend class factory<ConverterMapEvent>;
00886
00887
00888
00889 protected:
00890
00891
00892
00893
00894
00895
00896
00897
00898
00899
00900 ConverterMapEvent(ObservableMap::Handle hMap,
00901 MapEvent::View vEvent, Converter::View vConvKey,
00902 Converter::View vConvVal);
00903
00904
00905
00906 public:
00907
00908
00909
00910 virtual Object::View getKey() const;
00911
00912
00913
00914
00915 virtual Object::View getOldValue() const;
00916
00917
00918
00919
00920 virtual Object::View getNewValue() const;
00921
00922
00923
00924 public:
00925
00926
00927
00928
00929
00930 virtual MapEvent::View getMapEvent() const;
00931
00932
00933
00934
00935
00936
00937
00938 virtual Converter::View getConverterKeyUp() const;
00939
00940
00941
00942
00943
00944
00945
00946 virtual Converter::View getConverterValueUp() const;
00947
00948
00949
00950
00951
00952
00953 virtual void setKey(Object::View voKey);
00954
00955
00956
00957
00958
00959
00960
00961 virtual void setOldValue(Object::View voValue);
00962
00963
00964
00965
00966
00967
00968
00969 virtual void setNewValue(Object::View voValue);
00970
00971
00972
00973
00974
00975
00976 virtual bool isKeyConverted() const;
00977
00978
00979
00980
00981
00982
00983 virtual bool isOldValueConverted() const;
00984
00985
00986
00987
00988
00989
00990 virtual bool isNewValueConverted() const;
00991
00992
00993
00994 protected:
00995
00996
00997
00998 FinalView<MapEvent> f_vEvent;
00999
01000
01001
01002
01003 FinalView<Converter> f_vConvKey;
01004
01005
01006
01007
01008 FinalView<Converter> f_vConvVal;
01009 };
01010
01011
01012
01013
01014
01015
01016
01017
01018 class COH_EXPORT ConverterMapListener
01019 : public class_spec<ConverterMapListener,
01020 extends<Object>,
01021 implements<MapListener> >
01022 {
01023 friend class factory<ConverterMapListener>;
01024
01025
01026
01027 protected:
01028
01029
01030
01031
01032 ConverterMapListener(ObservableMap::Handle hMap,
01033 MapListener::Handle hListener, Converter::View vConvKey,
01034 Converter::View vConvVal);
01035
01036
01037
01038 public:
01039
01040
01041
01042 virtual void entryInserted(MapEvent::View vEvent);
01043
01044
01045
01046
01047 virtual void entryUpdated(MapEvent::View vEvent);
01048
01049
01050
01051
01052 virtual void entryDeleted(MapEvent::View vEvent);
01053
01054
01055
01056 public:
01057
01058
01059
01060 virtual bool equals(Object::View v) const;
01061
01062
01063
01064
01065 virtual size32_t hashCode() const;
01066
01067
01068
01069 public:
01070
01071
01072
01073
01074
01075 virtual ObservableMap::Handle getObservableMap();
01076
01077
01078
01079
01080
01081
01082 virtual ObservableMap::View getObservableMap() const;
01083
01084
01085
01086
01087
01088
01089 virtual MapListener::Handle getMapListener();
01090
01091
01092
01093
01094
01095
01096 virtual MapListener::View getMapListener() const;
01097
01098
01099
01100
01101
01102
01103
01104
01105 virtual Converter::View getConverterKeyUp() const;
01106
01107
01108
01109
01110
01111
01112
01113
01114 virtual Converter::View getConverterValueUp() const;
01115
01116
01117
01118 protected:
01119
01120
01121
01122
01123 FinalHandle<ObservableMap> f_hMap;
01124
01125
01126
01127
01128 FinalHandle<MapListener> f_hListener;
01129
01130
01131
01132
01133 FinalView<Converter> f_vConvKey;
01134
01135
01136
01137
01138 FinalView<Converter> f_vConvVal;
01139 };
01140
01141
01142
01143
01144
01145
01146
01147
01148 class COH_EXPORT ConverterObservableMap
01149 : public class_spec<ConverterObservableMap,
01150 extends<ConverterMap>,
01151 implements<ObservableMap> >
01152 {
01153 friend class factory<ConverterObservableMap>;
01154
01155
01156
01157 protected:
01158
01159
01160
01161
01162
01163
01164
01165
01166 ConverterObservableMap(ObservableMap::Handle hMap,
01167 EntryConverter::View vConvUp,
01168 EntryConverter::View vConvDown);
01169
01170
01171
01172
01173
01174
01175
01176
01177
01178 ConverterObservableMap(ObservableMap::View vMap,
01179 EntryConverter::View vConvUp,
01180 EntryConverter::View vConvDown);
01181
01182
01183
01184 public:
01185
01186
01187
01188 virtual void addKeyListener(MapListener::Handle hListener,
01189 Object::View vKey, bool fLite);
01190
01191
01192
01193
01194 virtual void removeKeyListener(MapListener::Handle hListener,
01195 Object::View vKey);
01196
01197
01198
01199
01200 virtual void addMapListener(MapListener::Handle hListener);
01201
01202
01203
01204
01205 virtual void removeMapListener(MapListener::Handle hListener);
01206
01207
01208
01209
01210 virtual void addFilterListener(MapListener::Handle hListener,
01211 Filter::View vFilter, bool fLite);
01212
01213
01214
01215
01216 virtual void removeFilterListener(
01217 MapListener::Handle hListener, Filter::View vFilter);
01218
01219
01220
01221 protected:
01222
01223
01224
01225
01226
01227
01228
01229 virtual MapListener::Handle getConverterListener(
01230 MapListener::Handle hListener);
01231
01232
01233
01234 public:
01235
01236
01237
01238
01239
01240 virtual ObservableMap::Handle getObservableMap();
01241
01242
01243
01244
01245
01246
01247 virtual ObservableMap::View getObservableMap() const;
01248 };
01249
01250
01251
01252
01253
01254
01255
01256
01257 class COH_EXPORT ConverterCacheMap
01258 : public class_spec<ConverterCacheMap,
01259 extends<ConverterObservableMap>,
01260 implements<CacheMap> >
01261 {
01262 friend class factory<ConverterCacheMap>;
01263
01264
01265
01266 protected:
01267
01268
01269
01270
01271
01272
01273
01274
01275
01276
01277 ConverterCacheMap(CacheMap::Handle hMapDelegate,
01278 EntryConverter::View vConvUp,
01279 EntryConverter::View vConvDown);
01280
01281
01282
01283
01284
01285
01286
01287
01288
01289
01290
01291 ConverterCacheMap(CacheMap::View vMapDelegate,
01292 EntryConverter::View vConvUp,
01293 EntryConverter::View vConvDown);
01294
01295
01296
01297 public:
01298
01299
01300
01301 virtual Map::View getAll(Collection::View vKeys) const;
01302
01303
01304
01305
01306 using ConverterMap::put;
01307
01308
01309
01310
01311 virtual Object::Holder put(Object::View vKey,
01312 Object::Holder ohValue, int64_t cMillis);
01313
01314
01315
01316 public:
01317
01318
01319
01320 virtual void putAll(Map::View vMap);
01321
01322
01323
01324
01325 public:
01326
01327
01328
01329
01330
01331 virtual CacheMap::View getCacheMap() const;
01332
01333
01334
01335
01336
01337
01338 virtual CacheMap::Handle getCacheMap();
01339 };
01340
01341
01342
01343
01344
01345 class COH_EXPORT ConverterConcurrentMap
01346 : public class_spec<ConverterConcurrentMap,
01347 extends<ConverterMap>,
01348 implements<ConcurrentMap> >
01349 {
01350 friend class factory<ConverterConcurrentMap>;
01351
01352
01353
01354 protected:
01355
01356
01357
01358
01359
01360
01361
01362
01363
01364
01365 ConverterConcurrentMap(ConcurrentMap::Handle hMapDelegate,
01366 EntryConverter::View vConvUp,
01367 EntryConverter::View vConvDown);
01368
01369
01370
01371
01372
01373
01374
01375
01376
01377
01378
01379 ConverterConcurrentMap(ConcurrentMap::View vMapDelegate,
01380 EntryConverter::View vConvUp,
01381 EntryConverter::View vConvDown);
01382
01383
01384
01385 public:
01386
01387
01388
01389 virtual bool lock(Object::View vKey, int64_t cWait) const;
01390
01391
01392
01393
01394 virtual bool lock(Object::View vKey) const;
01395
01396
01397
01398
01399 virtual bool unlock(Object::View vKey) const;
01400
01401
01402
01403 public:
01404
01405
01406
01407
01408
01409 virtual ConcurrentMap::View getConcurrentMap() const;
01410
01411
01412
01413
01414
01415
01416 virtual ConcurrentMap::Handle getConcurrentMap();
01417
01418 };
01419
01420
01421
01422
01423
01424 class COH_EXPORT ConverterInvocableMap
01425 : public class_spec<ConverterInvocableMap,
01426 extends<ConverterMap>,
01427 implements<InvocableMap> >
01428 {
01429 friend class factory<ConverterInvocableMap>;
01430
01431
01432
01433 protected:
01434
01435
01436
01437
01438
01439
01440
01441
01442
01443
01444 ConverterInvocableMap(InvocableMap::Handle hMapDelegate,
01445 EntryConverter::View vConvUp,
01446 EntryConverter::View vConvDown);
01447
01448
01449
01450
01451
01452
01453
01454
01455
01456
01457
01458 ConverterInvocableMap(InvocableMap::View vMapDelegate,
01459 EntryConverter::View vConvUp,
01460 EntryConverter::View vConvDown);
01461
01462
01463
01464 public:
01465
01466
01467
01468 virtual Object::Holder invoke(Object::View vKey,
01469 InvocableMap::EntryProcessor::Handle hAgent);
01470
01471
01472
01473
01474 virtual Map::View invokeAll(Collection::View vCollKeys,
01475 InvocableMap::EntryProcessor::Handle hAgent);
01476
01477
01478
01479
01480 virtual Map::View invokeAll(Filter::View vFilter,
01481 InvocableMap::EntryProcessor::Handle hAgent);
01482
01483
01484
01485
01486 virtual Object::Holder aggregate(Collection::View vCollKeys,
01487 InvocableMap::EntryAggregator::Handle hAgent) const;
01488
01489
01490
01491
01492 virtual Object::Holder aggregate(Filter::View vFilter,
01493 InvocableMap::EntryAggregator::Handle hAgent) const;
01494
01495
01496
01497 public:
01498
01499
01500
01501
01502
01503 virtual InvocableMap::View getInvocableMap() const;
01504
01505
01506
01507
01508
01509
01510 virtual InvocableMap::Handle getInvocableMap();
01511 };
01512
01513
01514
01515
01516
01517
01518
01519
01520 class COH_EXPORT ConverterQueryMap
01521 : public class_spec<ConverterQueryMap,
01522 extends<ConverterMap>,
01523 implements<QueryMap> >
01524 {
01525 friend class factory<ConverterQueryMap>;
01526
01527
01528
01529 protected:
01530
01531
01532
01533
01534
01535
01536
01537
01538
01539
01540 ConverterQueryMap(QueryMap::Handle hMapDelegate,
01541 EntryConverter::View vConvUp,
01542 EntryConverter::View vConvDown);
01543
01544
01545
01546
01547
01548
01549
01550
01551
01552
01553
01554 ConverterQueryMap(QueryMap::View vMapDelegate,
01555 EntryConverter::View vConvUp,
01556 EntryConverter::View vConvDown);
01557
01558
01559
01560 public:
01561
01562
01563
01564 virtual Set::View keySet(Filter::View vFilter) const;
01565
01566
01567
01568
01569 virtual Set::View entrySet(Filter::View vFilter) const;
01570
01571
01572
01573
01574 virtual Set::View entrySet(Filter::View vFilter,
01575 Comparator::View vComparator) const;
01576
01577
01578
01579
01580 virtual void addIndex(ValueExtractor::View vExtractor,
01581 bool fOrdered, Comparator::View vComparator);
01582
01583
01584
01585
01586 virtual void removeIndex(ValueExtractor::View vExtractor);
01587
01588
01589
01590 public:
01591
01592
01593
01594 using Map::keySet;
01595
01596
01597
01598
01599 using Map::entrySet;
01600
01601
01602
01603 public:
01604
01605
01606
01607
01608
01609 virtual QueryMap::View getQueryMap() const;
01610
01611
01612
01613
01614
01615
01616 virtual QueryMap::Handle getQueryMap();
01617 };
01618
01619
01620
01621
01622
01623
01624 class COH_EXPORT ConverterNamedCache
01625 : public class_spec<ConverterNamedCache,
01626 extends<ConverterCacheMap>,
01627 implements<NamedCache> >
01628 {
01629 friend class factory<ConverterNamedCache>;
01630
01631
01632
01633 protected:
01634
01635
01636
01637
01638
01639
01640
01641
01642
01643
01644 ConverterNamedCache(NamedCache::Handle hMapDelegate,
01645 EntryConverter::View vConvUp,
01646 EntryConverter::View vConvDown);
01647
01648
01649
01650
01651
01652
01653
01654
01655
01656
01657
01658 ConverterNamedCache(NamedCache::View vMapDelegate,
01659 EntryConverter::View vConvUp,
01660 EntryConverter::View vConvDown);
01661
01662
01663
01664 public:
01665
01666
01667
01668
01669
01670 virtual String::View getCacheName() const;
01671
01672
01673
01674
01675
01676
01677 virtual CacheService::Handle getCacheService();
01678
01679
01680
01681
01682
01683
01684 virtual CacheService::View getCacheService() const;
01685
01686
01687
01688
01689
01690
01691 virtual bool isActive() const;
01692
01693
01694
01695
01696
01697
01698
01699
01700
01701
01702
01703
01704
01705
01706 virtual void release();
01707
01708
01709
01710
01711
01712
01713
01714
01715
01716
01717
01718
01719 virtual void destroy();
01720
01721
01722
01723 public:
01724
01725
01726
01727 virtual bool lock(Object::View vKey, int64_t cWait) const;
01728
01729
01730
01731
01732 virtual bool lock(Object::View vKey) const;
01733
01734
01735
01736
01737 virtual bool unlock(Object::View vKey) const;
01738
01739
01740
01741 public:
01742
01743
01744
01745 virtual Object::Holder invoke(Object::View vKey,
01746 InvocableMap::EntryProcessor::Handle hAgent);
01747
01748
01749
01750
01751 virtual Map::View invokeAll(Collection::View vCollKeys,
01752 InvocableMap::EntryProcessor::Handle hAgent);
01753
01754
01755
01756
01757 virtual Map::View invokeAll(Filter::View vFilter,
01758 InvocableMap::EntryProcessor::Handle hAgent);
01759
01760
01761
01762
01763 virtual Object::Holder aggregate(Collection::View vCollKeys,
01764 InvocableMap::EntryAggregator::Handle hAgent) const;
01765
01766
01767
01768
01769 virtual Object::Holder aggregate(Filter::View vFilter,
01770 InvocableMap::EntryAggregator::Handle hAgent) const;
01771
01772
01773
01774 public:
01775
01776
01777
01778 virtual Set::View keySet(Filter::View vFilter) const;
01779
01780
01781
01782
01783 virtual Set::View entrySet(Filter::View vFilter) const;
01784
01785
01786
01787
01788 virtual Set::View entrySet(Filter::View vFilter,
01789 Comparator::View vComparator) const;
01790
01791
01792
01793
01794 virtual void addIndex(ValueExtractor::View vExtractor,
01795 bool fOrdered, Comparator::View vComparator);
01796
01797
01798
01799
01800 virtual void removeIndex(ValueExtractor::View vExtractor);
01801
01802
01803
01804 public:
01805
01806
01807
01808 using Map::keySet;
01809
01810
01811
01812
01813 using Map::entrySet;
01814
01815
01816
01817 public:
01818
01819
01820
01821
01822
01823 virtual NamedCache::View getNamedCache() const;
01824
01825
01826
01827
01828
01829
01830 virtual NamedCache::Handle getNamedCache();
01831
01832
01833
01834
01835
01836
01837 virtual ConcurrentMap::View getConcurrentMap() const;
01838
01839
01840
01841
01842
01843
01844 virtual ConcurrentMap::Handle getConcurrentMap();
01845
01846
01847
01848
01849
01850
01851 virtual InvocableMap::View getInvocableMap() const;
01852
01853
01854
01855
01856
01857
01858 virtual InvocableMap::Handle getInvocableMap();
01859
01860
01861
01862
01863
01864
01865 virtual QueryMap::View getQueryMap() const;
01866
01867
01868
01869
01870
01871
01872 virtual QueryMap::Handle getQueryMap();
01873
01874
01875
01876 protected:
01877
01878
01879
01880 FinalHolder<ConverterConcurrentMap> f_ohMapConcurrent;
01881
01882
01883
01884
01885 FinalHolder<ConverterInvocableMap> f_ohMapInvocable;
01886
01887
01888
01889
01890 FinalHolder<ConverterQueryMap> f_ohMapQuery;
01891 };
01892
01893
01894
01895
01896
01897
01898
01899 class COH_EXPORT UnsupportedConverter
01900 : public class_spec<UnsupportedConverter,
01901 extends<Object>,
01902 implements<Converter> >
01903 {
01904 friend class factory<UnsupportedConverter>;
01905
01906
01907
01908 public:
01909
01910
01911
01912
01913
01914 UnsupportedConverter();
01915
01916
01917
01918 public:
01919
01920
01921
01922
01923
01924 virtual Object::Holder convert(Object::Holder oh) const;
01925
01926
01927
01928
01929 static UnsupportedConverter::View getInstance();
01930 };
01931 };
01932
01933 COH_CLOSE_NAMESPACE2
01934
01935 #endif // COH_CONVERTER_COLLECTIONS_HPP