Skip to content

Commit

Permalink
removes depreceated import syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafaiman committed Apr 13, 2016
1 parent 0b9d261 commit 3800742
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions src/DistributedObject.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Promise = Q.Promise;
import * as Q from 'q';
export interface DistributedObject {
/*
* Returns the key of the partition that this DistributedObject is assigned to.
Expand All @@ -20,5 +20,5 @@ export interface DistributedObject {
* Destroys this object cluster-wide.
* Clears all resources taken for this object.
*/
destroy() : Promise<void>;
destroy() : Q.Promise<void>;
}
2 changes: 1 addition & 1 deletion src/HazelcastClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {InvocationService, ListenerService} from './invocation/InvocationService
import ClientConnectionManager = require('./invocation/ClientConnectionManager');
import {ClientConfig} from './Config';
import ProxyManager = require('./proxy/ProxyManager');
import Q = require('q');
import * as Q from 'q';
import {IMap} from './IMap';
import {JsonSerializationService} from './serialization/SerializationService';
import PartitionService = require('./PartitionService');
Expand Down
2 changes: 1 addition & 1 deletion src/Heartbeat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {ClientPingCodec} from './codec/ClientPingCodec';
import HazelcastClient from './HazelcastClient';
import ClientConnection = require('./invocation/ClientConnection');
import {ConnectionHeartbeatListener} from './ConnectionHeartbeatListener';
import Q = require('q');
import * as Q from 'q';
import {LoggingService} from './LoggingService';
import Address = require('./Address');

Expand Down
18 changes: 9 additions & 9 deletions src/IMap.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Promise = Q.Promise;
import * as Q from 'q';
import {DistributedObject} from './DistributedObject';
export interface IMap<K, V> extends DistributedObject {

Expand All @@ -8,15 +8,15 @@ export interface IMap<K, V> extends DistributedObject {
* @throws {Error} if key is undefined or null
* @return a promise to be resolved to true if the map contains the key, false otherwise.
*/
containsKey(key: K) : Promise<boolean>;
containsKey(key: K) : Q.Promise<boolean>;

/**
* This method return true if this map has key(s) associated with given value
* @throws {Error} if value is undefined or null
* @param value
* @return a promise to be resolved to true if the map has key or keys associated with given value.
*/
containsValue(value: V) : Promise<boolean>;
containsValue(value: V) : Q.Promise<boolean>;

/**
* Associates the specified value with the specified key.
Expand All @@ -29,15 +29,15 @@ export interface IMap<K, V> extends DistributedObject {
* @throws {Error} if specified key or value is undefined or null or ttl is negative.
* @return a promise to be resolved to the old value if there was any, undefined otherwise.
*/
put(key: K, value: V, ttl?: number) : Promise<V>;
put(key: K, value: V, ttl?: number) : Q.Promise<V>;

/**
* Retrieves the value associated with given key.
* @param key
* @throws {Error} if key is undefined or null
* @return a promise to be resolved to the value associated with key, undefined if the key does not exist.
*/
get(key: K) : Promise<V>;
get(key: K) : Q.Promise<V>;

/**
* Removes specified key from map. If optional value is specified, the key is removed only if currently mapped to
Expand All @@ -48,24 +48,24 @@ export interface IMap<K, V> extends DistributedObject {
* @throws {Error} if key is undefined or null
* @return a promise to be resolved to the value associated with key, undefined if the key did not exist before.
*/
remove(key: K, value?: V) : Promise<V>;
remove(key: K, value?: V) : Q.Promise<V>;

/**
* Retrieves the number of elements in map
* @return a promise to be resolved to the number of elements in map
*/
size() : Promise<number>;
size() : Q.Promise<number>;

/**
* Removes all of the mappings
* @return
*/
clear() : Promise<void>;
clear() : Q.Promise<void>;

/**
* Returns whether this map is empty or not
*/
isEmpty() : Promise<boolean>;
isEmpty() : Q.Promise<boolean>;

/**
*
Expand Down
2 changes: 1 addition & 1 deletion src/PartitionService.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Q = require('q');
import * as Q from 'q';
import GetPartitionsCodec = require('./codec/GetPartitionsCodec');
import ClientMessage = require('./ClientMessage');
import Address = require('./Address');
Expand Down
2 changes: 1 addition & 1 deletion src/invocation/ClientConnection.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import net = require('net');
import Q = require('q');
import * as Q from 'q';
import Address = require('../Address');
import {BitsUtil} from '../BitsUtil';
import {LoggingService} from '../LoggingService';
Expand Down
2 changes: 1 addition & 1 deletion src/invocation/ClientConnectionManager.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Q = require('q');
import * as Q from 'q';

import Address = require('../Address');
import ClientConnection = require('./ClientConnection');
Expand Down
2 changes: 1 addition & 1 deletion src/invocation/ClusterService.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ClientConnection = require('./ClientConnection');
import Address = require('../Address');
import Q = require('q');
import * as Q from 'q';
import {ClientAddMembershipListenerCodec} from '../codec/ClientAddMembershipListenerCodec';
import ClientMessage = require('../ClientMessage');
import {Member} from '../Member';
Expand Down
2 changes: 1 addition & 1 deletion src/invocation/ConnectionAuthenticator.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Q = require('q');
import * as Q from 'q';

import ClientConnection = require('./ClientConnection');
import {InvocationService} from './InvocationService';
Expand Down
2 changes: 1 addition & 1 deletion src/invocation/InvocationService.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ClientConnection = require('./ClientConnection');
import ClientMessage = require('../ClientMessage');
import Q = require('q');
import * as Q from 'q';
import Long = require('long');
import {Data} from '../serialization/Data';
import Address = require('../Address');
Expand Down
2 changes: 1 addition & 1 deletion src/proxy/BaseProxy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {SerializationService} from '../serialization/SerializationService';
import {Data} from '../serialization/Data';
import ClientMessage = require('../ClientMessage');
import Q = require('q');
import * as Q from 'q';
import HazelcastClient from '../HazelcastClient';

export class BaseProxy {
Expand Down
2 changes: 1 addition & 1 deletion src/proxy/Map.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {BaseProxy} from './BaseProxy';
import {IMap} from '../IMap';
import Q = require('q');
import * as Q from 'q';
import {Data} from '../serialization/Data';
import {MapPutCodec} from '../codec/MapPutCodec';
import ClientMessage = require('../ClientMessage');
Expand Down
2 changes: 1 addition & 1 deletion src/proxy/ProxyManager.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Q = require('q');
import * as Q from 'q';
import {DistributedObject} from '../DistributedObject';
import {Map} from './Map';
import {BaseProxy} from './BaseProxy';
Expand Down
2 changes: 1 addition & 1 deletion src/proxy/Set.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {BaseProxy} from '../proxy/BaseProxy';
import {ISet} from '../ISet';
import Q = require('q');
import * as Q from 'q';
export class Set<E> extends BaseProxy implements ISet<E> {
add(entry : E) : Q.Promise<boolean> {
//TODO
Expand Down

0 comments on commit 3800742

Please sign in to comment.