Search in sources :

Example 11 with ConstructorFunction

use of com.hazelcast.internal.util.ConstructorFunction in project hazelcast by hazelcast.

the class SplitBrainDataSerializerHook method createFactory.

@Override
public DataSerializableFactory createFactory() {
    // noinspection unchecked
    ConstructorFunction<Integer, IdentifiedDataSerializable>[] constructors = new ConstructorFunction[LEN];
    constructors[COLLECTION_MERGING_VALUE] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {

        public IdentifiedDataSerializable createNew(Integer arg) {
            return new CollectionMergingValueImpl();
        }
    };
    constructors[QUEUE_MERGING_VALUE] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {

        public IdentifiedDataSerializable createNew(Integer arg) {
            return new QueueMergingValueImpl();
        }
    };
    constructors[ATOMIC_LONG_MERGING_VALUE] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {

        public IdentifiedDataSerializable createNew(Integer arg) {
            return new AtomicLongMergingValueImpl();
        }
    };
    constructors[ATOMIC_REFERENCE_MERGING_VALUE] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {

        public IdentifiedDataSerializable createNew(Integer arg) {
            return new AtomicReferenceMergingValueImpl();
        }
    };
    constructors[MAP_MERGING_ENTRY] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {

        public IdentifiedDataSerializable createNew(Integer arg) {
            return new MapMergingEntryImpl();
        }
    };
    constructors[CACHE_MERGING_ENTRY] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {

        public IdentifiedDataSerializable createNew(Integer arg) {
            return new CacheMergingEntryImpl();
        }
    };
    constructors[MULTI_MAP_MERGING_ENTRY] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {

        public IdentifiedDataSerializable createNew(Integer arg) {
            return new MultiMapMergingEntryImpl();
        }
    };
    constructors[REPLICATED_MAP_MERGING_ENTRY] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {

        public IdentifiedDataSerializable createNew(Integer arg) {
            return new ReplicatedMapMergingEntryImpl();
        }
    };
    constructors[RINGBUFFER_MERGING_ENTRY] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {

        public IdentifiedDataSerializable createNew(Integer arg) {
            return new RingbufferMergingValueImpl();
        }
    };
    constructors[CARDINALITY_ESTIMATOR_MERGING_ENTRY] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {

        public IdentifiedDataSerializable createNew(Integer arg) {
            return new CardinalityEstimatorMergingEntry();
        }
    };
    constructors[SCHEDULED_EXECUTOR_MERGING_ENTRY] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {

        public IdentifiedDataSerializable createNew(Integer arg) {
            return new ScheduledExecutorMergingEntryImpl();
        }
    };
    constructors[DISCARD] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {

        public IdentifiedDataSerializable createNew(Integer arg) {
            return new DiscardMergePolicy();
        }
    };
    constructors[EXPIRATION_TIME] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {

        public IdentifiedDataSerializable createNew(Integer arg) {
            return new ExpirationTimeMergePolicy();
        }
    };
    constructors[HIGHER_HITS] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {

        public IdentifiedDataSerializable createNew(Integer arg) {
            return new HigherHitsMergePolicy();
        }
    };
    constructors[HYPER_LOG_LOG] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {

        @Override
        public IdentifiedDataSerializable createNew(Integer arg) {
            return new HyperLogLogMergePolicy();
        }
    };
    constructors[LATEST_ACCESS] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {

        public IdentifiedDataSerializable createNew(Integer arg) {
            return new LatestAccessMergePolicy();
        }
    };
    constructors[LATEST_UPDATE] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {

        public IdentifiedDataSerializable createNew(Integer arg) {
            return new LatestUpdateMergePolicy();
        }
    };
    constructors[PASS_THROUGH] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {

        public IdentifiedDataSerializable createNew(Integer arg) {
            return new PassThroughMergePolicy();
        }
    };
    constructors[PUT_IF_ABSENT] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {

        public IdentifiedDataSerializable createNew(Integer arg) {
            return new PutIfAbsentMergePolicy();
        }
    };
    return new ArrayDataSerializableFactory(constructors);
}
Also used : ExpirationTimeMergePolicy(com.hazelcast.spi.merge.ExpirationTimeMergePolicy) LatestUpdateMergePolicy(com.hazelcast.spi.merge.LatestUpdateMergePolicy) PutIfAbsentMergePolicy(com.hazelcast.spi.merge.PutIfAbsentMergePolicy) IdentifiedDataSerializable(com.hazelcast.nio.serialization.IdentifiedDataSerializable) LatestAccessMergePolicy(com.hazelcast.spi.merge.LatestAccessMergePolicy) PassThroughMergePolicy(com.hazelcast.spi.merge.PassThroughMergePolicy) HyperLogLogMergePolicy(com.hazelcast.spi.merge.HyperLogLogMergePolicy) ConstructorFunction(com.hazelcast.internal.util.ConstructorFunction) HigherHitsMergePolicy(com.hazelcast.spi.merge.HigherHitsMergePolicy) ArrayDataSerializableFactory(com.hazelcast.internal.serialization.impl.ArrayDataSerializableFactory) DiscardMergePolicy(com.hazelcast.spi.merge.DiscardMergePolicy)

Example 12 with ConstructorFunction

use of com.hazelcast.internal.util.ConstructorFunction in project hazelcast by hazelcast.

the class MapDataSerializerHook method createFactory.

@Override
public DataSerializableFactory createFactory() {
    ConstructorFunction<Integer, IdentifiedDataSerializable>[] constructors = new ConstructorFunction[LEN];
    constructors[PUT] = arg -> new PutOperation();
    constructors[GET] = arg -> new GetOperation();
    constructors[REMOVE] = arg -> new RemoveOperation();
    constructors[PUT_BACKUP] = arg -> new PutBackupOperation();
    constructors[REMOVE_BACKUP] = arg -> new RemoveBackupOperation();
    constructors[EVICT_BACKUP] = arg -> new EvictBackupOperation();
    constructors[CREATE_ACCUMULATOR_INFO] = arg -> new AccumulatorInfo();
    constructors[DATA_COLLECTION] = arg -> new DataCollection();
    constructors[ENTRIES] = arg -> new MapEntries();
    constructors[ENTRY_VIEW] = arg -> (IdentifiedDataSerializable) EntryViews.createSimpleEntryView();
    constructors[QUERY_RESULT_ROW] = arg -> new QueryResultRow();
    constructors[QUERY_RESULT] = arg -> new QueryResult();
    constructors[CONTAINS_KEY] = arg -> new ContainsKeyOperation();
    constructors[KEYS_WITH_CURSOR] = arg -> new MapKeysWithCursor();
    constructors[ENTRIES_WITH_CURSOR] = arg -> new MapEntriesWithCursor();
    constructors[SET] = arg -> new SetOperation();
    constructors[LOAD_MAP] = arg -> new LoadMapOperation();
    constructors[KEY_LOAD_STATUS] = arg -> new KeyLoadStatusOperation();
    constructors[LOAD_ALL] = arg -> new LoadAllOperation();
    constructors[ENTRY_BACKUP] = arg -> new EntryBackupOperation();
    constructors[ENTRY_OPERATION] = arg -> new EntryOperation();
    constructors[PUT_ALL] = arg -> new PutAllOperation();
    constructors[PUT_ALL_BACKUP] = arg -> new PutAllBackupOperation();
    constructors[REMOVE_IF_SAME] = arg -> new RemoveIfSameOperation();
    constructors[REPLACE] = arg -> new ReplaceOperation();
    constructors[SIZE] = arg -> new MapSizeOperation();
    constructors[CLEAR_BACKUP] = arg -> new ClearBackupOperation();
    constructors[CLEAR] = arg -> new ClearOperation();
    constructors[DELETE] = arg -> new DeleteOperation();
    constructors[EVICT] = arg -> new EvictOperation();
    constructors[EVICT_ALL] = arg -> new EvictAllOperation();
    constructors[EVICT_ALL_BACKUP] = arg -> new EvictAllBackupOperation();
    constructors[GET_ALL] = arg -> new GetAllOperation();
    constructors[IS_EMPTY] = arg -> new MapIsEmptyOperation();
    constructors[IS_PARTITION_LOADED] = arg -> new IsPartitionLoadedOperation();
    constructors[PARTITION_WIDE_ENTRY] = arg -> new PartitionWideEntryOperation();
    constructors[PARTITION_WIDE_ENTRY_BACKUP] = arg -> new PartitionWideEntryBackupOperation();
    constructors[PARTITION_WIDE_PREDICATE_ENTRY] = arg -> new PartitionWideEntryWithPredicateOperation();
    constructors[PARTITION_WIDE_PREDICATE_ENTRY_BACKUP] = arg -> new PartitionWideEntryWithPredicateBackupOperation();
    constructors[ADD_INDEX] = arg -> new AddIndexOperation();
    constructors[AWAIT_MAP_FLUSH] = arg -> new AwaitMapFlushOperation();
    constructors[CONTAINS_VALUE] = arg -> new ContainsValueOperation();
    constructors[GET_ENTRY_VIEW] = arg -> new GetEntryViewOperation();
    constructors[FETCH_ENTRIES] = arg -> new MapFetchEntriesOperation();
    constructors[FETCH_KEYS] = arg -> new MapFetchKeysOperation();
    constructors[FLUSH_BACKUP] = arg -> new MapFlushBackupOperation();
    constructors[FLUSH] = arg -> new MapFlushOperation();
    constructors[MULTIPLE_ENTRY_BACKUP] = arg -> new MultipleEntryBackupOperation();
    constructors[MULTIPLE_ENTRY] = arg -> new MultipleEntryOperation();
    constructors[MULTIPLE_ENTRY_PREDICATE_BACKUP] = arg -> new MultipleEntryWithPredicateBackupOperation();
    constructors[MULTIPLE_ENTRY_PREDICATE] = arg -> new MultipleEntryWithPredicateOperation();
    constructors[NOTIFY_MAP_FLUSH] = arg -> new NotifyMapFlushOperation();
    constructors[PUT_IF_ABSENT] = arg -> new PutIfAbsentOperation();
    constructors[PUT_FROM_LOAD_ALL] = arg -> new PutFromLoadAllOperation();
    constructors[PUT_FROM_LOAD_ALL_BACKUP] = arg -> new PutFromLoadAllBackupOperation();
    constructors[QUERY_PARTITION] = arg -> new QueryPartitionOperation();
    constructors[QUERY_OPERATION] = arg -> new QueryOperation();
    constructors[PUT_TRANSIENT] = arg -> new PutTransientOperation();
    constructors[REPLACE_IF_SAME] = arg -> new ReplaceIfSameOperation();
    constructors[TRY_PUT] = arg -> new TryPutOperation();
    constructors[TRY_REMOVE] = arg -> new TryRemoveOperation();
    constructors[TXN_LOCK_AND_GET] = arg -> new TxnLockAndGetOperation();
    constructors[TXN_DELETE] = arg -> new TxnDeleteOperation();
    constructors[TXN_PREPARE] = arg -> new TxnPrepareOperation();
    constructors[TXN_PREPARE_BACKUP] = arg -> new TxnPrepareBackupOperation();
    constructors[TXN_ROLLBACK] = arg -> new TxnRollbackOperation();
    constructors[TXN_ROLLBACK_BACKUP] = arg -> new TxnRollbackBackupOperation();
    constructors[TXN_SET] = arg -> new TxnSetOperation();
    constructors[TXN_UNLOCK] = arg -> new TxnUnlockOperation();
    constructors[TXN_UNLOCK_BACKUP] = arg -> new TxnUnlockBackupOperation();
    constructors[IS_PARTITION_LOADED_FACTORY] = arg -> new IsPartitionLoadedOperationFactory();
    constructors[ADD_INDEX_FACTORY] = arg -> new AddIndexOperationFactory();
    constructors[CLEAR_FACTORY] = arg -> new ClearOperationFactory();
    constructors[CONTAINS_VALUE_FACTORY] = arg -> new ContainsValueOperationFactory();
    constructors[EVICT_ALL_FACTORY] = arg -> new EvictAllOperationFactory();
    constructors[IS_EMPTY_FACTORY] = arg -> new IsEmptyOperationFactory();
    constructors[KEY_LOAD_STATUS_FACTORY] = arg -> new KeyLoadStatusOperationFactory();
    constructors[MAP_FLUSH_FACTORY] = arg -> new MapFlushOperationFactory();
    constructors[MAP_GET_ALL_FACTORY] = arg -> new MapGetAllOperationFactory();
    constructors[LOAD_ALL_FACTORY] = arg -> new MapLoadAllOperationFactory();
    constructors[PARTITION_WIDE_ENTRY_FACTORY] = arg -> new PartitionWideEntryOperationFactory();
    constructors[PARTITION_WIDE_PREDICATE_ENTRY_FACTORY] = arg -> new PartitionWideEntryWithPredicateOperationFactory();
    constructors[PUT_ALL_PARTITION_AWARE_FACTORY] = arg -> new PutAllPartitionAwareOperationFactory();
    constructors[SIZE_FACTORY] = arg -> new SizeOperationFactory();
    constructors[MULTIPLE_ENTRY_FACTORY] = arg -> new MultipleEntryOperationFactory();
    constructors[ENTRY_EVENT_FILTER] = arg -> new EntryEventFilter();
    constructors[EVENT_LISTENER_FILTER] = arg -> new EventListenerFilter();
    constructors[PARTITION_LOST_EVENT_FILTER] = arg -> new MapPartitionLostEventFilter();
    constructors[NEAR_CACHE_SINGLE_INVALIDATION] = arg -> new SingleNearCacheInvalidation();
    constructors[NEAR_CACHE_BATCH_INVALIDATION] = arg -> new BatchNearCacheInvalidation();
    constructors[ADD_INTERCEPTOR] = arg -> new AddInterceptorOperation();
    constructors[MAP_REPLICATION] = arg -> new MapReplicationOperation();
    constructors[POST_JOIN_MAP_OPERATION] = arg -> new PostJoinMapOperation();
    constructors[MAP_INDEX_INFO] = arg -> new MapIndexInfo();
    constructors[INTERCEPTOR_INFO] = arg -> new PostJoinMapOperation.InterceptorInfo();
    constructors[REMOVE_INTERCEPTOR] = arg -> new RemoveInterceptorOperation();
    constructors[QUERY_EVENT_FILTER] = arg -> new QueryEventFilter();
    constructors[UUID_FILTER] = arg -> new UuidFilter();
    constructors[MAP_TRANSACTION_LOG_RECORD] = arg -> new MapTransactionLogRecord();
    constructors[VERSIONED_VALUE] = arg -> new VersionedValue();
    constructors[MAP_REPLICATION_STATE_HOLDER] = arg -> new MapReplicationStateHolder();
    constructors[WRITE_BEHIND_STATE_HOLDER] = arg -> new WriteBehindStateHolder();
    constructors[AGGREGATION_RESULT] = arg -> new AggregationResult();
    constructors[QUERY] = arg -> new Query();
    constructors[MAP_INVALIDATION_METADATA] = arg -> new MapGetInvalidationMetaDataOperation();
    constructors[MAP_INVALIDATION_METADATA_RESPONSE] = arg -> new MapGetInvalidationMetaDataOperation.MetaDataResponse();
    constructors[MAP_NEAR_CACHE_STATE_HOLDER] = arg -> new MapNearCacheStateHolder();
    constructors[MAP_ASSIGN_AND_GET_UUIDS] = arg -> new MapAssignAndGetUuidsOperation();
    constructors[MAP_ASSIGN_AND_GET_UUIDS_FACTORY] = arg -> new MapAssignAndGetUuidsOperationFactory();
    constructors[DESTROY_QUERY_CACHE] = arg -> new DestroyQueryCacheOperation();
    constructors[MADE_PUBLISHABLE] = arg -> new MadePublishableOperation();
    constructors[MADE_PUBLISHABLE_FACTORY] = arg -> new MadePublishableOperationFactory();
    constructors[PUBLISHER_CREATE] = arg -> new PublisherCreateOperation();
    constructors[READ_AND_RESET_ACCUMULATOR] = arg -> new ReadAndResetAccumulatorOperation();
    constructors[SET_READ_CURSOR] = arg -> new SetReadCursorOperation();
    constructors[ACCUMULATOR_CONSUMER] = arg -> new ConsumeAccumulatorOperation();
    constructors[LAZY_MAP_ENTRY] = arg -> new LazyMapEntry();
    constructors[TRIGGER_LOAD_IF_NEEDED] = arg -> new TriggerLoadIfNeededOperation();
    constructors[IS_KEYLOAD_FINISHED] = arg -> new IsKeyLoadFinishedOperation();
    constructors[REMOVE_FROM_LOAD_ALL] = arg -> new RemoveFromLoadAllOperation();
    constructors[ENTRY_REMOVING_PROCESSOR] = arg -> EntryRemovingProcessor.ENTRY_REMOVING_PROCESSOR;
    constructors[ENTRY_OFFLOADABLE_SET_UNLOCK] = arg -> new EntryOffloadableSetUnlockOperation();
    constructors[LOCK_AWARE_LAZY_MAP_ENTRY] = arg -> new LockAwareLazyMapEntry();
    constructors[FETCH_WITH_QUERY] = arg -> new MapFetchWithQueryOperation();
    constructors[RESULT_SEGMENT] = arg -> new ResultSegment();
    constructors[EVICT_BATCH_BACKUP] = arg -> new EvictBatchBackupOperation();
    constructors[EVENT_JOURNAL_SUBSCRIBE_OPERATION] = arg -> new MapEventJournalSubscribeOperation();
    constructors[EVENT_JOURNAL_READ] = arg -> new MapEventJournalReadOperation<>();
    constructors[EVENT_JOURNAL_DESERIALIZING_MAP_EVENT] = arg -> new DeserializingEventJournalMapEvent<>();
    constructors[EVENT_JOURNAL_INTERNAL_MAP_EVENT] = arg -> new InternalEventJournalMapEvent();
    constructors[EVENT_JOURNAL_READ_RESULT_SET] = arg -> new MapEventJournalReadResultSetImpl<>();
    constructors[MERGE_FACTORY] = arg -> new MergeOperationFactory();
    constructors[MERGE] = arg -> new MergeOperation();
    constructors[SET_TTL] = arg -> new SetTtlOperation();
    constructors[SET_TTL_BACKUP] = arg -> new SetTtlBackupOperation();
    constructors[MERKLE_TREE_NODE_ENTRIES] = arg -> new MerkleTreeNodeEntries();
    constructors[ADD_INDEX_BACKUP] = arg -> new AddIndexBackupOperation();
    constructors[TXN_SET_BACKUP] = arg -> new TxnSetBackupOperation();
    constructors[TXN_DELETE_BACKUP] = arg -> new TxnDeleteBackupOperation();
    constructors[SET_WITH_EXPIRY] = arg -> new SetWithExpiryOperation();
    constructors[PUT_WITH_EXPIRY] = arg -> new PutWithExpiryOperation();
    constructors[PUT_TRANSIENT_WITH_EXPIRY] = arg -> new PutTransientWithExpiryOperation();
    constructors[PUT_IF_ABSENT_WITH_EXPIRY] = arg -> new PutIfAbsentWithExpiryOperation();
    constructors[PUT_TRANSIENT_BACKUP] = arg -> new PutTransientBackupOperation();
    constructors[COMPUTE_IF_PRESENT_PROCESSOR] = arg -> new ComputeIfPresentEntryProcessor<>();
    constructors[COMPUTE_IF_ABSENT_PROCESSOR] = arg -> new ComputeIfAbsentEntryProcessor<>();
    constructors[KEY_VALUE_CONSUMING_PROCESSOR] = arg -> new KeyValueConsumingEntryProcessor<>();
    constructors[COMPUTE_MAP_OPERATION_PROCESSOR] = arg -> new ComputeEntryProcessor<>();
    constructors[MERGE_MAP_OPERATION_PROCESSOR] = arg -> new MergeEntryProcessor<>();
    constructors[MAP_ENTRY_REPLACING_PROCESSOR] = arg -> new MapEntryReplacingEntryProcessor<>();
    constructors[LOCAL_RECORD_STORE_STATS] = arg -> new LocalRecordStoreStatsImpl();
    constructors[MAP_FETCH_INDEX_OPERATION] = arg -> new MapFetchIndexOperation();
    constructors[INDEX_ITERATION_POINTER] = arg -> new IndexIterationPointer();
    constructors[MAP_FETCH_INDEX_OPERATION_RESULT] = arg -> new MapFetchIndexOperationResult();
    constructors[MAP_CHUNK] = arg -> new MapChunk();
    return new ArrayDataSerializableFactory(constructors);
}
Also used : MapGetAllOperationFactory(com.hazelcast.map.impl.operation.MapGetAllOperationFactory) Query(com.hazelcast.map.impl.query.Query) QueryResultRow(com.hazelcast.map.impl.query.QueryResultRow) ClearBackupOperation(com.hazelcast.map.impl.operation.ClearBackupOperation) MapReplicationOperation(com.hazelcast.map.impl.operation.MapReplicationOperation) IsKeyLoadFinishedOperation(com.hazelcast.map.impl.operation.IsKeyLoadFinishedOperation) TxnDeleteBackupOperation(com.hazelcast.map.impl.tx.TxnDeleteBackupOperation) RemoveFromLoadAllOperation(com.hazelcast.map.impl.operation.RemoveFromLoadAllOperation) KeyLoadStatusOperation(com.hazelcast.map.impl.operation.KeyLoadStatusOperation) SingleNearCacheInvalidation(com.hazelcast.internal.nearcache.impl.invalidation.SingleNearCacheInvalidation) ConsumeAccumulatorOperation(com.hazelcast.map.impl.querycache.accumulator.ConsumeAccumulatorOperation) ClearOperationFactory(com.hazelcast.map.impl.operation.ClearOperationFactory) EntryOffloadableSetUnlockOperation(com.hazelcast.map.impl.operation.EntryOffloadableSetUnlockOperation) MergeOperation(com.hazelcast.map.impl.operation.MergeOperation) TxnRollbackOperation(com.hazelcast.map.impl.tx.TxnRollbackOperation) IsEmptyOperationFactory(com.hazelcast.map.impl.operation.IsEmptyOperationFactory) MadePublishableOperationFactory(com.hazelcast.map.impl.querycache.subscriber.operation.MadePublishableOperationFactory) ResultSegment(com.hazelcast.map.impl.query.ResultSegment) TxnDeleteOperation(com.hazelcast.map.impl.tx.TxnDeleteOperation) PutFromLoadAllOperation(com.hazelcast.map.impl.operation.PutFromLoadAllOperation) LoadAllOperation(com.hazelcast.map.impl.operation.LoadAllOperation) RemoveFromLoadAllOperation(com.hazelcast.map.impl.operation.RemoveFromLoadAllOperation) MapGetInvalidationMetaDataOperation(com.hazelcast.map.impl.operation.MapGetInvalidationMetaDataOperation) PublisherCreateOperation(com.hazelcast.map.impl.querycache.subscriber.operation.PublisherCreateOperation) MapFlushOperationFactory(com.hazelcast.map.impl.operation.MapFlushOperationFactory) MapAssignAndGetUuidsOperation(com.hazelcast.client.impl.protocol.task.map.MapAssignAndGetUuidsOperation) AggregationResult(com.hazelcast.map.impl.query.AggregationResult) LocalRecordStoreStatsImpl(com.hazelcast.internal.monitor.impl.LocalRecordStoreStatsImpl) MergeOperationFactory(com.hazelcast.map.impl.operation.MergeOperationFactory) PutAllOperation(com.hazelcast.map.impl.operation.PutAllOperation) PutWithExpiryOperation(com.hazelcast.map.impl.operation.PutWithExpiryOperation) WriteBehindStateHolder(com.hazelcast.map.impl.operation.WriteBehindStateHolder) SetReadCursorOperation(com.hazelcast.map.impl.querycache.subscriber.operation.SetReadCursorOperation) MultipleEntryWithPredicateBackupOperation(com.hazelcast.map.impl.operation.MultipleEntryWithPredicateBackupOperation) MapIndexInfo(com.hazelcast.query.impl.MapIndexInfo) MapEntriesWithCursor(com.hazelcast.map.impl.iterator.MapEntriesWithCursor) SetWithExpiryOperation(com.hazelcast.map.impl.operation.SetWithExpiryOperation) SetTtlOperation(com.hazelcast.map.impl.operation.SetTtlOperation) PutFromLoadAllOperation(com.hazelcast.map.impl.operation.PutFromLoadAllOperation) QueryResult(com.hazelcast.map.impl.query.QueryResult) ReplaceIfSameOperation(com.hazelcast.map.impl.operation.ReplaceIfSameOperation) UuidFilter(com.hazelcast.map.impl.nearcache.invalidation.UuidFilter) PartitionWideEntryBackupOperation(com.hazelcast.map.impl.operation.PartitionWideEntryBackupOperation) EntryBackupOperation(com.hazelcast.map.impl.operation.EntryBackupOperation) MultipleEntryBackupOperation(com.hazelcast.map.impl.operation.MultipleEntryBackupOperation) PartitionWideEntryBackupOperation(com.hazelcast.map.impl.operation.PartitionWideEntryBackupOperation) IsPartitionLoadedOperation(com.hazelcast.map.impl.operation.IsPartitionLoadedOperation) RemoveInterceptorOperation(com.hazelcast.map.impl.operation.RemoveInterceptorOperation) AwaitMapFlushOperation(com.hazelcast.map.impl.operation.AwaitMapFlushOperation) RemoveIfSameOperation(com.hazelcast.map.impl.operation.RemoveIfSameOperation) PartitionWideEntryOperation(com.hazelcast.map.impl.operation.PartitionWideEntryOperation) MapKeysWithCursor(com.hazelcast.map.impl.iterator.MapKeysWithCursor) MapAssignAndGetUuidsOperationFactory(com.hazelcast.client.impl.protocol.task.map.MapAssignAndGetUuidsOperationFactory) AddIndexOperation(com.hazelcast.map.impl.operation.AddIndexOperation) MapFetchKeysOperation(com.hazelcast.map.impl.operation.MapFetchKeysOperation) TxnSetOperation(com.hazelcast.map.impl.tx.TxnSetOperation) MapChunk(com.hazelcast.map.impl.operation.MapChunk) MapSizeOperation(com.hazelcast.map.impl.operation.MapSizeOperation) EvictAllBackupOperation(com.hazelcast.map.impl.operation.EvictAllBackupOperation) MapFetchIndexOperationResult(com.hazelcast.map.impl.operation.MapFetchIndexOperation.MapFetchIndexOperationResult) EvictOperation(com.hazelcast.map.impl.operation.EvictOperation) ContainsValueOperation(com.hazelcast.map.impl.operation.ContainsValueOperation) PutAllPartitionAwareOperationFactory(com.hazelcast.map.impl.operation.PutAllPartitionAwareOperationFactory) AddInterceptorOperation(com.hazelcast.map.impl.operation.AddInterceptorOperation) ContainsKeyOperation(com.hazelcast.map.impl.operation.ContainsKeyOperation) TxnLockAndGetOperation(com.hazelcast.map.impl.tx.TxnLockAndGetOperation) GetOperation(com.hazelcast.map.impl.operation.GetOperation) SizeOperationFactory(com.hazelcast.map.impl.operation.SizeOperationFactory) BatchNearCacheInvalidation(com.hazelcast.internal.nearcache.impl.invalidation.BatchNearCacheInvalidation) MapFlushOperation(com.hazelcast.map.impl.operation.MapFlushOperation) NotifyMapFlushOperation(com.hazelcast.map.impl.operation.NotifyMapFlushOperation) AwaitMapFlushOperation(com.hazelcast.map.impl.operation.AwaitMapFlushOperation) TxnUnlockOperation(com.hazelcast.map.impl.tx.TxnUnlockOperation) TxnSetBackupOperation(com.hazelcast.map.impl.tx.TxnSetBackupOperation) MapFetchEntriesOperation(com.hazelcast.map.impl.operation.MapFetchEntriesOperation) DeleteOperation(com.hazelcast.map.impl.operation.DeleteOperation) TxnDeleteOperation(com.hazelcast.map.impl.tx.TxnDeleteOperation) PutTransientBackupOperation(com.hazelcast.map.impl.operation.PutTransientBackupOperation) TxnPrepareOperation(com.hazelcast.map.impl.tx.TxnPrepareOperation) ReadAndResetAccumulatorOperation(com.hazelcast.map.impl.querycache.subscriber.operation.ReadAndResetAccumulatorOperation) EntryOperation(com.hazelcast.map.impl.operation.EntryOperation) MultipleEntryOperation(com.hazelcast.map.impl.operation.MultipleEntryOperation) PartitionWideEntryOperation(com.hazelcast.map.impl.operation.PartitionWideEntryOperation) MultipleEntryBackupOperation(com.hazelcast.map.impl.operation.MultipleEntryBackupOperation) KeyLoadStatusOperationFactory(com.hazelcast.map.impl.operation.KeyLoadStatusOperationFactory) MapNearCacheStateHolder(com.hazelcast.map.impl.operation.MapNearCacheStateHolder) VersionedValue(com.hazelcast.map.impl.tx.VersionedValue) PartitionWideEntryWithPredicateBackupOperation(com.hazelcast.map.impl.operation.PartitionWideEntryWithPredicateBackupOperation) TxnUnlockBackupOperation(com.hazelcast.map.impl.tx.TxnUnlockBackupOperation) MadePublishableOperation(com.hazelcast.map.impl.querycache.subscriber.operation.MadePublishableOperation) TryRemoveOperation(com.hazelcast.map.impl.operation.TryRemoveOperation) RemoveOperation(com.hazelcast.map.impl.operation.RemoveOperation) AccumulatorInfo(com.hazelcast.map.impl.querycache.accumulator.AccumulatorInfo) PartitionWideEntryOperationFactory(com.hazelcast.map.impl.operation.PartitionWideEntryOperationFactory) PutTransientWithExpiryOperation(com.hazelcast.map.impl.operation.PutTransientWithExpiryOperation) MapTransactionLogRecord(com.hazelcast.map.impl.tx.MapTransactionLogRecord) TxnRollbackBackupOperation(com.hazelcast.map.impl.tx.TxnRollbackBackupOperation) AddIndexBackupOperation(com.hazelcast.map.impl.operation.AddIndexBackupOperation) RemoveBackupOperation(com.hazelcast.map.impl.operation.RemoveBackupOperation) PutAllBackupOperation(com.hazelcast.map.impl.operation.PutAllBackupOperation) GetAllOperation(com.hazelcast.map.impl.operation.GetAllOperation) MultipleEntryWithPredicateOperation(com.hazelcast.map.impl.operation.MultipleEntryWithPredicateOperation) ContainsValueOperationFactory(com.hazelcast.map.impl.operation.ContainsValueOperationFactory) MultipleEntryOperationFactory(com.hazelcast.map.impl.operation.MultipleEntryOperationFactory) EvictAllOperation(com.hazelcast.map.impl.operation.EvictAllOperation) TxnPrepareBackupOperation(com.hazelcast.map.impl.tx.TxnPrepareBackupOperation) TriggerLoadIfNeededOperation(com.hazelcast.map.impl.operation.TriggerLoadIfNeededOperation) IsPartitionLoadedOperationFactory(com.hazelcast.map.impl.operation.IsPartitionLoadedOperationFactory) ReplaceOperation(com.hazelcast.map.impl.operation.ReplaceOperation) QueryEventFilter(com.hazelcast.map.impl.query.QueryEventFilter) TryRemoveOperation(com.hazelcast.map.impl.operation.TryRemoveOperation) PutFromLoadAllBackupOperation(com.hazelcast.map.impl.operation.PutFromLoadAllBackupOperation) DestroyQueryCacheOperation(com.hazelcast.map.impl.querycache.subscriber.operation.DestroyQueryCacheOperation) PutBackupOperation(com.hazelcast.map.impl.operation.PutBackupOperation) PartitionWideEntryWithPredicateOperation(com.hazelcast.map.impl.operation.PartitionWideEntryWithPredicateOperation) PutTransientOperation(com.hazelcast.map.impl.operation.PutTransientOperation) SetTtlBackupOperation(com.hazelcast.map.impl.operation.SetTtlBackupOperation) EvictBackupOperation(com.hazelcast.map.impl.operation.EvictBackupOperation) TryPutOperation(com.hazelcast.map.impl.operation.TryPutOperation) PostJoinMapOperation(com.hazelcast.map.impl.operation.PostJoinMapOperation) QueryOperation(com.hazelcast.map.impl.query.QueryOperation) MapFetchWithQueryOperation(com.hazelcast.map.impl.operation.MapFetchWithQueryOperation) EvictBatchBackupOperation(com.hazelcast.map.impl.operation.EvictBatchBackupOperation) NotifyMapFlushOperation(com.hazelcast.map.impl.operation.NotifyMapFlushOperation) PutIfAbsentOperation(com.hazelcast.map.impl.operation.PutIfAbsentOperation) SetOperation(com.hazelcast.map.impl.operation.SetOperation) TxnSetOperation(com.hazelcast.map.impl.tx.TxnSetOperation) MapEventJournalSubscribeOperation(com.hazelcast.map.impl.journal.MapEventJournalSubscribeOperation) PutOperation(com.hazelcast.map.impl.operation.PutOperation) TryPutOperation(com.hazelcast.map.impl.operation.TryPutOperation) PartitionWideEntryWithPredicateOperationFactory(com.hazelcast.map.impl.operation.PartitionWideEntryWithPredicateOperationFactory) MapReplicationStateHolder(com.hazelcast.map.impl.operation.MapReplicationStateHolder) IndexIterationPointer(com.hazelcast.internal.iteration.IndexIterationPointer) MapFlushBackupOperation(com.hazelcast.map.impl.operation.MapFlushBackupOperation) InternalEventJournalMapEvent(com.hazelcast.map.impl.journal.InternalEventJournalMapEvent) MapFetchWithQueryOperation(com.hazelcast.map.impl.operation.MapFetchWithQueryOperation) EvictAllOperationFactory(com.hazelcast.map.impl.operation.EvictAllOperationFactory) QueryPartitionOperation(com.hazelcast.map.impl.query.QueryPartitionOperation) ClearOperation(com.hazelcast.map.impl.operation.ClearOperation) MapIsEmptyOperation(com.hazelcast.map.impl.operation.MapIsEmptyOperation) MultipleEntryOperation(com.hazelcast.map.impl.operation.MultipleEntryOperation) ConstructorFunction(com.hazelcast.internal.util.ConstructorFunction) GetEntryViewOperation(com.hazelcast.map.impl.operation.GetEntryViewOperation) TxnLockAndGetOperation(com.hazelcast.map.impl.tx.TxnLockAndGetOperation) MapLoadAllOperationFactory(com.hazelcast.map.impl.operation.MapLoadAllOperationFactory) AddIndexOperationFactory(com.hazelcast.map.impl.operation.AddIndexOperationFactory) MapFetchIndexOperation(com.hazelcast.map.impl.operation.MapFetchIndexOperation) LoadMapOperation(com.hazelcast.map.impl.operation.LoadMapOperation) ArrayDataSerializableFactory(com.hazelcast.internal.serialization.impl.ArrayDataSerializableFactory) PutIfAbsentWithExpiryOperation(com.hazelcast.map.impl.operation.PutIfAbsentWithExpiryOperation)

Example 13 with ConstructorFunction

use of com.hazelcast.internal.util.ConstructorFunction in project hazelcast by hazelcast.

the class TextProtocolsDataSerializerHook method createFactory.

@Override
public DataSerializableFactory createFactory() {
    ConstructorFunction<Integer, IdentifiedDataSerializable>[] constructors = new ConstructorFunction[LEN];
    constructors[MEMCACHE_ENTRY] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {

        public IdentifiedDataSerializable createNew(Integer arg) {
            return new MemcacheEntry();
        }
    };
    constructors[REST_VALUE] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {

        public IdentifiedDataSerializable createNew(Integer arg) {
            return new RestValue();
        }
    };
    return new ArrayDataSerializableFactory(constructors);
}
Also used : IdentifiedDataSerializable(com.hazelcast.nio.serialization.IdentifiedDataSerializable) RestValue(com.hazelcast.internal.ascii.rest.RestValue) ArrayDataSerializableFactory(com.hazelcast.internal.serialization.impl.ArrayDataSerializableFactory) ConstructorFunction(com.hazelcast.internal.util.ConstructorFunction) MemcacheEntry(com.hazelcast.internal.ascii.memcache.MemcacheEntry)

Example 14 with ConstructorFunction

use of com.hazelcast.internal.util.ConstructorFunction in project hazelcast by hazelcast.

the class ConfigDataSerializerHook method createFactory.

@Override
public DataSerializableFactory createFactory() {
    ConstructorFunction<Integer, IdentifiedDataSerializable>[] constructors = new ConstructorFunction[LEN];
    constructors[WAN_REPLICATION_CONFIG] = arg -> new WanReplicationConfig();
    constructors[WAN_CONSUMER_CONFIG] = arg -> new WanConsumerConfig();
    constructors[WAN_CUSTOM_PUBLISHER_CONFIG] = arg -> new WanCustomPublisherConfig();
    constructors[WAN_BATCH_PUBLISHER_CONFIG] = arg -> new WanBatchPublisherConfig();
    constructors[NEAR_CACHE_CONFIG] = arg -> new NearCacheConfig();
    constructors[NEAR_CACHE_PRELOADER_CONFIG] = arg -> new NearCachePreloaderConfig();
    constructors[ADD_DYNAMIC_CONFIG_OP] = arg -> new AddDynamicConfigOperation();
    constructors[DYNAMIC_CONFIG_PRE_JOIN_OP] = arg -> new DynamicConfigPreJoinOperation();
    constructors[MULTIMAP_CONFIG] = arg -> new MultiMapConfig();
    constructors[LISTENER_CONFIG] = arg -> new ListenerConfig();
    constructors[ENTRY_LISTENER_CONFIG] = arg -> new EntryListenerConfig();
    constructors[MAP_CONFIG] = arg -> new MapConfig();
    constructors[MAP_STORE_CONFIG] = arg -> new MapStoreConfig();
    constructors[MAP_PARTITION_LOST_LISTENER_CONFIG] = arg -> new MapPartitionLostListenerConfig();
    constructors[INDEX_CONFIG] = arg -> new IndexConfig();
    constructors[MAP_ATTRIBUTE_CONFIG] = arg -> new AttributeConfig();
    constructors[QUERY_CACHE_CONFIG] = arg -> new QueryCacheConfig();
    constructors[PREDICATE_CONFIG] = arg -> new PredicateConfig();
    constructors[PARTITION_STRATEGY_CONFIG] = arg -> new PartitioningStrategyConfig();
    constructors[HOT_RESTART_CONFIG] = arg -> new HotRestartConfig();
    constructors[TOPIC_CONFIG] = arg -> new TopicConfig();
    constructors[RELIABLE_TOPIC_CONFIG] = arg -> new ReliableTopicConfig();
    constructors[ITEM_LISTENER_CONFIG] = arg -> new ItemListenerConfig();
    constructors[QUEUE_STORE_CONFIG] = arg -> new QueueStoreConfig();
    constructors[QUEUE_CONFIG] = arg -> new QueueConfig();
    constructors[LIST_CONFIG] = arg -> new ListConfig();
    constructors[SET_CONFIG] = arg -> new SetConfig();
    constructors[EXECUTOR_CONFIG] = arg -> new ExecutorConfig();
    constructors[DURABLE_EXECUTOR_CONFIG] = arg -> new DurableExecutorConfig();
    constructors[SCHEDULED_EXECUTOR_CONFIG] = arg -> new ScheduledExecutorConfig();
    constructors[REPLICATED_MAP_CONFIG] = arg -> new ReplicatedMapConfig();
    constructors[RINGBUFFER_CONFIG] = arg -> new RingbufferConfig();
    constructors[RINGBUFFER_STORE_CONFIG] = arg -> new RingbufferStoreConfig();
    constructors[CARDINALITY_ESTIMATOR_CONFIG] = arg -> new CardinalityEstimatorConfig();
    constructors[SIMPLE_CACHE_CONFIG] = arg -> new CacheSimpleConfig();
    constructors[SIMPLE_CACHE_CONFIG_EXPIRY_POLICY_FACTORY_CONFIG] = arg -> new CacheSimpleConfig.ExpiryPolicyFactoryConfig();
    constructors[SIMPLE_CACHE_CONFIG_TIMED_EXPIRY_POLICY_FACTORY_CONFIG] = arg -> new CacheSimpleConfig.ExpiryPolicyFactoryConfig.TimedExpiryPolicyFactoryConfig();
    constructors[SIMPLE_CACHE_CONFIG_DURATION_CONFIG] = arg -> new CacheSimpleConfig.ExpiryPolicyFactoryConfig.DurationConfig();
    constructors[SPLIT_BRAIN_PROTECTION_CONFIG] = arg -> new SplitBrainProtectionConfig();
    constructors[EVENT_JOURNAL_CONFIG] = arg -> new EventJournalConfig();
    constructors[SPLIT_BRAIN_PROTECTION_LISTENER_CONFIG] = arg -> new SplitBrainProtectionListenerConfig();
    constructors[CACHE_PARTITION_LOST_LISTENER_CONFIG] = arg -> new CachePartitionLostListenerConfig();
    constructors[SIMPLE_CACHE_ENTRY_LISTENER_CONFIG] = arg -> new CacheSimpleEntryListenerConfig();
    constructors[FLAKE_ID_GENERATOR_CONFIG] = arg -> new FlakeIdGeneratorConfig();
    constructors[MERGE_POLICY_CONFIG] = arg -> new MergePolicyConfig();
    constructors[PN_COUNTER_CONFIG] = arg -> new PNCounterConfig();
    constructors[MERKLE_TREE_CONFIG] = arg -> new MerkleTreeConfig();
    constructors[WAN_SYNC_CONFIG] = arg -> new WanSyncConfig();
    constructors[KUBERNETES_CONFIG] = arg -> new KubernetesConfig();
    constructors[EUREKA_CONFIG] = arg -> new EurekaConfig();
    constructors[GCP_CONFIG] = arg -> new GcpConfig();
    constructors[AZURE_CONFIG] = arg -> new AzureConfig();
    constructors[AWS_CONFIG] = arg -> new AwsConfig();
    constructors[DISCOVERY_CONFIG] = arg -> new DiscoveryConfig();
    constructors[DISCOVERY_STRATEGY_CONFIG] = arg -> new DiscoveryStrategyConfig();
    constructors[WAN_REPLICATION_REF] = arg -> new WanReplicationRef();
    constructors[EVICTION_CONFIG] = arg -> new EvictionConfig();
    constructors[PERMISSION_CONFIG] = arg -> new PermissionConfig();
    constructors[BITMAP_INDEX_OPTIONS] = arg -> new BitmapIndexOptions();
    constructors[DATA_PERSISTENCE_CONFIG] = arg -> new DataPersistenceConfig();
    constructors[TIERED_STORE_CONFIG] = arg -> new TieredStoreConfig();
    constructors[MEMORY_TIER_CONFIG] = arg -> new MemoryTierConfig();
    constructors[DISK_TIER_CONFIG] = arg -> new DiskTierConfig();
    return new ArrayDataSerializableFactory(constructors);
}
Also used : PermissionConfig(com.hazelcast.config.PermissionConfig) AzureConfig(com.hazelcast.config.AzureConfig) AddDynamicConfigOperation(com.hazelcast.internal.dynamicconfig.AddDynamicConfigOperation) PNCounterConfig(com.hazelcast.config.PNCounterConfig) ExecutorConfig(com.hazelcast.config.ExecutorConfig) ScheduledExecutorConfig(com.hazelcast.config.ScheduledExecutorConfig) DurableExecutorConfig(com.hazelcast.config.DurableExecutorConfig) WanBatchPublisherConfig(com.hazelcast.config.WanBatchPublisherConfig) QueueStoreConfig(com.hazelcast.config.QueueStoreConfig) WanSyncConfig(com.hazelcast.config.WanSyncConfig) DataPersistenceConfig(com.hazelcast.config.DataPersistenceConfig) ReplicatedMapConfig(com.hazelcast.config.ReplicatedMapConfig) WanCustomPublisherConfig(com.hazelcast.config.WanCustomPublisherConfig) EurekaConfig(com.hazelcast.config.EurekaConfig) WanReplicationConfig(com.hazelcast.config.WanReplicationConfig) KubernetesConfig(com.hazelcast.config.KubernetesConfig) MultiMapConfig(com.hazelcast.config.MultiMapConfig) CacheSimpleEntryListenerConfig(com.hazelcast.config.CacheSimpleEntryListenerConfig) EntryListenerConfig(com.hazelcast.config.EntryListenerConfig) PredicateConfig(com.hazelcast.config.PredicateConfig) NearCachePreloaderConfig(com.hazelcast.config.NearCachePreloaderConfig) RingbufferConfig(com.hazelcast.config.RingbufferConfig) RingbufferStoreConfig(com.hazelcast.config.RingbufferStoreConfig) GcpConfig(com.hazelcast.config.GcpConfig) AttributeConfig(com.hazelcast.config.AttributeConfig) CacheSimpleEntryListenerConfig(com.hazelcast.config.CacheSimpleEntryListenerConfig) MergePolicyConfig(com.hazelcast.config.MergePolicyConfig) QueueConfig(com.hazelcast.config.QueueConfig) QueryCacheConfig(com.hazelcast.config.QueryCacheConfig) DiscoveryStrategyConfig(com.hazelcast.config.DiscoveryStrategyConfig) DynamicConfigPreJoinOperation(com.hazelcast.internal.dynamicconfig.DynamicConfigPreJoinOperation) NearCacheConfig(com.hazelcast.config.NearCacheConfig) BitmapIndexOptions(com.hazelcast.config.BitmapIndexOptions) MemoryTierConfig(com.hazelcast.config.MemoryTierConfig) MapStoreConfig(com.hazelcast.config.MapStoreConfig) SplitBrainProtectionConfig(com.hazelcast.config.SplitBrainProtectionConfig) MerkleTreeConfig(com.hazelcast.config.MerkleTreeConfig) SplitBrainProtectionListenerConfig(com.hazelcast.config.SplitBrainProtectionListenerConfig) ItemListenerConfig(com.hazelcast.config.ItemListenerConfig) CacheSimpleEntryListenerConfig(com.hazelcast.config.CacheSimpleEntryListenerConfig) ListenerConfig(com.hazelcast.config.ListenerConfig) EntryListenerConfig(com.hazelcast.config.EntryListenerConfig) CachePartitionLostListenerConfig(com.hazelcast.config.CachePartitionLostListenerConfig) MapPartitionLostListenerConfig(com.hazelcast.config.MapPartitionLostListenerConfig) SplitBrainProtectionListenerConfig(com.hazelcast.config.SplitBrainProtectionListenerConfig) WanConsumerConfig(com.hazelcast.config.WanConsumerConfig) FlakeIdGeneratorConfig(com.hazelcast.config.FlakeIdGeneratorConfig) DiskTierConfig(com.hazelcast.config.DiskTierConfig) ItemListenerConfig(com.hazelcast.config.ItemListenerConfig) SetConfig(com.hazelcast.config.SetConfig) MapConfig(com.hazelcast.config.MapConfig) MultiMapConfig(com.hazelcast.config.MultiMapConfig) ReplicatedMapConfig(com.hazelcast.config.ReplicatedMapConfig) ListConfig(com.hazelcast.config.ListConfig) CardinalityEstimatorConfig(com.hazelcast.config.CardinalityEstimatorConfig) HotRestartConfig(com.hazelcast.config.HotRestartConfig) CacheSimpleConfig(com.hazelcast.config.CacheSimpleConfig) AwsConfig(com.hazelcast.config.AwsConfig) MapPartitionLostListenerConfig(com.hazelcast.config.MapPartitionLostListenerConfig) ReliableTopicConfig(com.hazelcast.config.ReliableTopicConfig) WanReplicationRef(com.hazelcast.config.WanReplicationRef) EvictionConfig(com.hazelcast.config.EvictionConfig) DurableExecutorConfig(com.hazelcast.config.DurableExecutorConfig) CachePartitionLostListenerConfig(com.hazelcast.config.CachePartitionLostListenerConfig) ScheduledExecutorConfig(com.hazelcast.config.ScheduledExecutorConfig) ReliableTopicConfig(com.hazelcast.config.ReliableTopicConfig) TopicConfig(com.hazelcast.config.TopicConfig) EventJournalConfig(com.hazelcast.config.EventJournalConfig) ConstructorFunction(com.hazelcast.internal.util.ConstructorFunction) PartitioningStrategyConfig(com.hazelcast.config.PartitioningStrategyConfig) IndexConfig(com.hazelcast.config.IndexConfig) TieredStoreConfig(com.hazelcast.config.TieredStoreConfig) DiscoveryConfig(com.hazelcast.config.DiscoveryConfig) ArrayDataSerializableFactory(com.hazelcast.internal.serialization.impl.ArrayDataSerializableFactory)

Example 15 with ConstructorFunction

use of com.hazelcast.internal.util.ConstructorFunction in project hazelcast by hazelcast.

the class ManagementDataSerializerHook method createFactory.

@Override
@SuppressWarnings("unchecked")
public DataSerializableFactory createFactory() {
    ConstructorFunction<Integer, IdentifiedDataSerializable>[] constructors = new ConstructorFunction[LEN];
    constructors[UPDATE_MAP_CONFIG] = arg -> new UpdateMapConfigOperation();
    constructors[SET_LICENSE] = arg -> new SetLicenseOperation();
    constructors[CHANGE_CLUSTER_STATE] = arg -> new ChangeClusterStateOperation();
    constructors[UPDATE_PERMISSION_CONFIG_OPERATION] = arg -> new UpdatePermissionConfigOperation();
    constructors[RELOAD_CONFIG_OPERATION] = arg -> new ReloadConfigOperation();
    constructors[UPDATE_CONFIG_OPERATION] = arg -> new UpdateConfigOperation();
    return new ArrayDataSerializableFactory(constructors);
}
Also used : UpdatePermissionConfigOperation(com.hazelcast.internal.management.operation.UpdatePermissionConfigOperation) SetLicenseOperation(com.hazelcast.internal.management.operation.SetLicenseOperation) ReloadConfigOperation(com.hazelcast.internal.management.operation.ReloadConfigOperation) UpdateConfigOperation(com.hazelcast.internal.management.operation.UpdateConfigOperation) UpdateMapConfigOperation(com.hazelcast.internal.management.operation.UpdateMapConfigOperation) ArrayDataSerializableFactory(com.hazelcast.internal.serialization.impl.ArrayDataSerializableFactory) ConstructorFunction(com.hazelcast.internal.util.ConstructorFunction) ChangeClusterStateOperation(com.hazelcast.internal.management.operation.ChangeClusterStateOperation)

Aggregations

ConstructorFunction (com.hazelcast.internal.util.ConstructorFunction)20 ArrayDataSerializableFactory (com.hazelcast.internal.serialization.impl.ArrayDataSerializableFactory)16 IdentifiedDataSerializable (com.hazelcast.nio.serialization.IdentifiedDataSerializable)5 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)3 QuickTest (com.hazelcast.test.annotation.QuickTest)3 Test (org.junit.Test)3 VersionAwareConstructorFunction (com.hazelcast.internal.util.VersionAwareConstructorFunction)2 MemberVersion (com.hazelcast.version.MemberVersion)2 Version (com.hazelcast.version.Version)2 HazelcastExpiryPolicy (com.hazelcast.cache.HazelcastExpiryPolicy)1 CachePartitionLostEventFilter (com.hazelcast.cache.impl.event.CachePartitionLostEventFilter)1 CacheEventJournalSubscribeOperation (com.hazelcast.cache.impl.journal.CacheEventJournalSubscribeOperation)1 InternalEventJournalCacheEvent (com.hazelcast.cache.impl.journal.InternalEventJournalCacheEvent)1 DefaultCacheEntryView (com.hazelcast.cache.impl.merge.entry.DefaultCacheEntryView)1 AddCacheConfigOperation (com.hazelcast.cache.impl.operation.AddCacheConfigOperation)1 CacheBackupEntryProcessorOperation (com.hazelcast.cache.impl.operation.CacheBackupEntryProcessorOperation)1 CacheClearBackupOperation (com.hazelcast.cache.impl.operation.CacheClearBackupOperation)1 CacheClearOperation (com.hazelcast.cache.impl.operation.CacheClearOperation)1 CacheClearOperationFactory (com.hazelcast.cache.impl.operation.CacheClearOperationFactory)1 CacheContainsKeyOperation (com.hazelcast.cache.impl.operation.CacheContainsKeyOperation)1